Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions apps/docs/content/docs/en/tools/exa.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
36 changes: 36 additions & 0 deletions apps/sim/blocks/blocks/exa.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,38 @@ export const ExaBlock: BlockConfig<ExaResponse> = {
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',
Expand Down Expand Up @@ -385,6 +417,10 @@ export const ExaBlock: BlockConfig<ExaResponse> = {
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' },
Expand Down
31 changes: 31 additions & 0 deletions apps/sim/tools/exa/search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,31 @@ export const searchTool: ToolConfig<ExaSearchParams, ExaSearchResponse> = {
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',
},
Comment thread
waleedlatif1 marked this conversation as resolved.
apiKey: {
type: 'string',
required: true,
Expand Down Expand Up @@ -140,6 +165,12 @@ export const searchTool: ToolConfig<ExaSearchParams, ExaSearchResponse> = {
// 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<string, any> = {}

Expand Down
5 changes: 5 additions & 0 deletions apps/sim/tools/exa/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Loading