firecrawl-aisdk
Search the web for URLs, titles, and snippets matching a query. Best for: Discovering relevant pages when you don't know the exact URL. Returns full page content per result — use limit: 2-3 to keep responses small. If a scrape tool is available, prefer search with limit: 2 for discovery, then scrape individual URLs. Supports search operators: site:, inurl:, intitle:, related:, etc. Do NOT pass scrapeOptions unless you specifically need to customize scraping behavior.
by firecrawl
Test firecrawl-aisdk (searchTool) with AI-powered execution
0/2000 characters
Install this tool and use it with the AI SDK
npm install firecrawl-aisdkpnpm add firecrawl-aisdkyarn add firecrawl-aisdkbun add firecrawl-aisdkdeno add npm:firecrawl-aisdkimport { searchTool } from 'firecrawl-aisdk';import { generateText } from 'ai';
import { openai } from '@ai-sdk/openai';
import { searchTool } from 'firecrawl-aisdk';
const result = await generateText({
model: openai('gpt-4o'),
tools: { searchTool },
prompt: 'Your prompt here...',
});
console.log(result.text);(query: string, tbs?: string, limit?: number, country?: string, sources?: { tbs: string; type: string; location: string }[], timeout?: number, location?: string, categories?: { type: string }[], scrapeOptions?: { proxy: string; maxAge: number; mobile: boolean; actions: { key: string; text: string; type: string; script: string; fullPage: boolean }[]; formats: { }[] }, ignoreInvalidURLs?: boolean) => Promise<unknown>Available configuration options
querystringThe search query. Supports operators like site:, inurl:, intitle:, etc.
limitintegerMaximum number of search results to return. Default: 5
sourcesarraySources to search: web, images, news. Each source can have its own tbs and location filter
categoriesarrayFilter by categories: github (repositories), research (academic), pdf (PDFs)
tbsstringTime-based search: qdr:h (hour), qdr:d (day), qdr:w (week), qdr:m (month), qdr:y (year)
locationstringLocation for search results (e.g., "San Francisco,California,United States")
countrystringISO country code for geo-targeting (e.g., "US", "DE"). Default: "US"
timeoutnumberTimeout in milliseconds. Default: 60000
ignoreInvalidURLsbooleanExclude invalid URLs from results. Default: false
scrapeOptionsobjectOptions for scraping the search results
Schema extracted: 3/1/2026, 1:19:34 AM
Downloads/month
8,908
GitHub Stars
0
Quality Score