diff --git a/apps/docs/content/docs/en/tools/exa.mdx b/apps/docs/content/docs/en/tools/exa.mdx index f36ca6c832b..f53c239ae62 100644 --- a/apps/docs/content/docs/en/tools/exa.mdx +++ b/apps/docs/content/docs/en/tools/exa.mdx @@ -54,6 +54,10 @@ Search the web using Exa AI. Returns relevant search results with titles, URLs, | `highlights` | boolean | No | Include highlighted snippets in results \(default: false\) | | `summary` | boolean | No | Include AI-generated summaries in results \(default: false\) | | `livecrawl` | string | No | Live crawling mode: never \(default\), fallback, always, or preferred \(always try livecrawl, fall back to cache if fails\) | +| `startCrawlDate` | string | No | Only include results crawled on or after this ISO 8601 date \(e.g., "2024-01-01" or "2024-01-01T00:00:00.000Z"\) | +| `endCrawlDate` | string | No | Only include results crawled on or before this ISO 8601 date | +| `startPublishedDate` | string | No | Only include results published on or after this ISO 8601 date | +| `endPublishedDate` | string | No | Only include results published on or before this ISO 8601 date | | `apiKey` | string | Yes | Exa AI API Key | | `pricing` | custom | No | No description | | `metadata` | string | No | No description | diff --git a/apps/sim/blocks/blocks/exa.ts b/apps/sim/blocks/blocks/exa.ts index 483dba64584..5ff50106e08 100644 --- a/apps/sim/blocks/blocks/exa.ts +++ b/apps/sim/blocks/blocks/exa.ts @@ -136,6 +136,38 @@ export const ExaBlock: BlockConfig = { condition: { field: 'operation', value: 'exa_search' }, mode: 'advanced', }, + { + id: 'startPublishedDate', + title: 'Start Published Date', + type: 'short-input', + placeholder: '2024-01-01 or 2024-01-01T00:00:00.000Z', + condition: { field: 'operation', value: 'exa_search' }, + mode: 'advanced', + }, + { + id: 'endPublishedDate', + title: 'End Published Date', + type: 'short-input', + placeholder: '2024-12-31 or 2024-12-31T23:59:59.999Z', + condition: { field: 'operation', value: 'exa_search' }, + mode: 'advanced', + }, + { + id: 'startCrawlDate', + title: 'Start Crawl Date', + type: 'short-input', + placeholder: '2024-01-01 or 2024-01-01T00:00:00.000Z', + condition: { field: 'operation', value: 'exa_search' }, + mode: 'advanced', + }, + { + id: 'endCrawlDate', + title: 'End Crawl Date', + type: 'short-input', + placeholder: '2024-12-31 or 2024-12-31T23:59:59.999Z', + condition: { field: 'operation', value: 'exa_search' }, + mode: 'advanced', + }, // Get Contents operation inputs { id: 'urls', @@ -385,6 +417,10 @@ export const ExaBlock: BlockConfig = { highlights: { type: 'boolean', description: 'Include highlights' }, summary: { type: 'boolean', description: 'Include summary' }, livecrawl: { type: 'string', description: 'Live crawl mode' }, + startCrawlDate: { type: 'string', description: 'Earliest crawl date (ISO 8601)' }, + endCrawlDate: { type: 'string', description: 'Latest crawl date (ISO 8601)' }, + startPublishedDate: { type: 'string', description: 'Earliest published date (ISO 8601)' }, + endPublishedDate: { type: 'string', description: 'Latest published date (ISO 8601)' }, // Get Contents operation urls: { type: 'string', description: 'URLs to retrieve' }, summaryQuery: { type: 'string', description: 'Summary query guidance' }, diff --git a/apps/sim/tools/exa/search.ts b/apps/sim/tools/exa/search.ts index c0dfe2baf2f..d1a09739ede 100644 --- a/apps/sim/tools/exa/search.ts +++ b/apps/sim/tools/exa/search.ts @@ -79,6 +79,31 @@ export const searchTool: ToolConfig = { description: 'Live crawling mode: never (default), fallback, always, or preferred (always try livecrawl, fall back to cache if fails)', }, + startCrawlDate: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: + 'Only include results crawled on or after this ISO 8601 date (e.g., "2024-01-01" or "2024-01-01T00:00:00.000Z")', + }, + endCrawlDate: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: 'Only include results crawled on or before this ISO 8601 date', + }, + startPublishedDate: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: 'Only include results published on or after this ISO 8601 date', + }, + endPublishedDate: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: 'Only include results published on or before this ISO 8601 date', + }, apiKey: { type: 'string', required: true, @@ -140,6 +165,12 @@ export const searchTool: ToolConfig = { // Category filtering if (params.category) body.category = params.category + // Date filtering + if (params.startCrawlDate) body.startCrawlDate = params.startCrawlDate + if (params.endCrawlDate) body.endCrawlDate = params.endCrawlDate + if (params.startPublishedDate) body.startPublishedDate = params.startPublishedDate + if (params.endPublishedDate) body.endPublishedDate = params.endPublishedDate + // Build contents object for content options const contents: Record = {} diff --git a/apps/sim/tools/exa/types.ts b/apps/sim/tools/exa/types.ts index f633272a1af..fa4d408e68b 100644 --- a/apps/sim/tools/exa/types.ts +++ b/apps/sim/tools/exa/types.ts @@ -37,6 +37,11 @@ export interface ExaSearchParams extends ExaBaseParams { summary?: boolean | { query?: string } // Live crawl mode livecrawl?: 'always' | 'fallback' | 'never' + // Date filters (ISO 8601) + startCrawlDate?: string + endCrawlDate?: string + startPublishedDate?: string + endPublishedDate?: string } export interface ExaSearchResult {