Home/Tools/firecrawl-aisdk

crawlTool

firecrawl-aisdk

Start a crawl job to extract content from multiple related pages on a website. Best for: Comprehensive content extraction from multiple pages with depth control. Note: This is an asynchronous operation that returns a job ID. Use pollTool to get results. Example use cases: - Crawl an entire blog section - Extract all documentation pages - Scrape product catalog with pagination - Comprehensive site analysis

by firecrawl

search
v0.10.0
MIT

Interactive Playground

Test firecrawl-aisdk (crawlTool) with AI-powered execution

0/2000 characters

Installation & Usage

Install this tool and use it with the AI SDK

1. Install the package

npm install firecrawl-aisdk
pnpm add firecrawl-aisdk
yarn add firecrawl-aisdk
bun add firecrawl-aisdk
deno add npm:firecrawl-aisdk

2. Import the tool

import { crawlTool } from 'firecrawl-aisdk';

3. Use with AI SDK

import { generateText } from 'ai';
import { openai } from '@ai-sdk/openai';
import { crawlTool } from 'firecrawl-aisdk';

const result = await generateText({
  model: openai('gpt-4o'),
  tools: { crawlTool },
  prompt: 'Your prompt here...',
});

console.log(result.text);

AI Agent Integration

How AI agents can use this tool

Use Case

Use when you need to crawl and extract data from entire websites

Examples

  • Crawl documentation sites
  • Extract all articles from a blog
  • Build knowledge base from website

Signature

(url: string, delay?: number, limit?: number, prompt?: string, sitemap?: string, webhook?: { url: string; events: string[]; headers: Record<string, unknown>; metadata: Record<string, unknown> }, excludePaths?: string[], includePaths?: string[], scrapeOptions?: { proxy: string; maxAge: number; mobile: boolean; actions: { key: string; text: string; type: string; script: string; fullPage: boolean }[]; formats: {  }[] }, maxConcurrency?: number, allowSubdomains?: boolean, crawlEntireDomain?: bool...

Tags

ai
ai-sdk
aisdk
best
content
crawl
extract
firecrawl
job
llm
multiple
pages
related
search
start
vercel
web-scraping
web-search
website

Parameters

Available configuration options

Auto-extracted
url
Required
Type: string

The starting URL to crawl from

limit
Optional
Type: integer

Maximum number of pages to crawl

maxDiscoveryDepth
Optional
Type: integer

Maximum depth to crawl based on discovery order. Root site and sitemapped pages have depth 0

allowExternalLinks
Optional
Type: boolean

Allow crawling external links

allowSubdomains
Optional
Type: boolean

Allow crawling subdomains

crawlEntireDomain
Optional
Type: boolean

Crawl the entire domain, not just child pages of the starting URL

includePaths
Optional
Type: array

Only crawl URLs matching these path patterns

excludePaths
Optional
Type: array

Exclude URLs matching these path patterns

ignoreQueryParameters
Optional
Type: boolean

Do not re-scrape the same path with different (or none) query parameters

sitemap
Optional
Type: string

Sitemap handling: include (default) or skip

prompt
Optional
Type: string

Natural language prompt to guide the crawler (e.g., "Only crawl blog posts and docs")

delay
Optional
Type: number

Delay in seconds between requests

maxConcurrency
Optional
Type: integer

Maximum number of concurrent requests

scrapeOptions
Optional
Type: object

Options for scraping crawled pages

webhook
Optional
Type: object

Webhook config to receive crawl results

zeroDataRetention
Optional
Type: boolean

Enable zero data retention. Contact help@firecrawl.dev to enable this feature

Schema extracted: 3/1/2026, 1:19:34 AM

Statistics

Downloads/month

8,908

GitHub Stars

0

Quality Score

87%

Bundle Size

NPM Keywords

ai
ai-sdk
vercel
firecrawl
web-scraping
web-search
tools
llm

Maintainers

hello_sideguide(hello@sideguide.dev)

Frameworks

vercel-ai