firecrawl-aisdk
Scrape content from a single URL with advanced options. Best for: Single page content extraction when you know the exact URL. Returns: Content in specified formats (markdown, html, rawHtml, screenshot, or links). Example use cases: - Extract article content from a blog post - Get product information from an e-commerce page - Scrape documentation from a specific page
by firecrawl
Test firecrawl-aisdk (scrapeTool) 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 { scrapeTool } from 'firecrawl-aisdk';import { generateText } from 'ai';
import { openai } from '@ai-sdk/openai';
import { scrapeTool } from 'firecrawl-aisdk';
const result = await generateText({
model: openai('gpt-4o'),
tools: { scrapeTool },
prompt: 'Your prompt here...',
});
console.log(result.text);How AI agents can use this tool
Use when you need to convert web pages to clean, structured markdown
(url: string, proxy?: string, maxAge?: number, mobile?: boolean, actions?: { key: string; text: string; type: string; script: string; fullPage: boolean }[], formats?: { }[], headers?: Record<string, unknown>, parsers?: { }[], timeout?: number, waitFor?: number, blockAds?: boolean, location?: { country: string; languages: string[] }, excludeTags?: string[], includeTags?: string[], storeInCache?: boolean, onlyMainContent?: boolean, zeroDataRetention?: boolean, removeBase64Images?: boolean, sk...Available configuration options
urlstringThe URL to scrape content from
formatsarrayOutput formats for the scraped content
parsersarrayParsers to use for processing content (e.g., PDF parsing)
onlyMainContentbooleanExtract only the main content, removing headers, footers, and navigation
includeTagsarrayHTML tags to include in the output
excludeTagsarrayHTML tags to exclude from the output
waitFornumberTime in milliseconds to wait before scraping
actionsarrayBrowser actions to perform before scraping (click, scroll, type, wait, etc.)
mobilebooleanEmulate mobile device
skipTlsVerificationbooleanSkip TLS certificate verification
removeBase64ImagesbooleanRemove base64 encoded images from the output
locationobjectLocation settings for the scraping request
storeInCachebooleanStore the scraped content in cache
maxAgenumberMaximum age of cached content in milliseconds. Default: 172800000 (2 days)
headersobjectCustom headers to send with the request (cookies, user-agent, etc.)
blockAdsbooleanEnable ad-blocking and cookie popup blocking. Default: true
proxystringProxy type: basic (fast), stealth (reliable, 5 credits), auto (retry with stealth). Default: auto
zeroDataRetentionbooleanEnable zero data retention. Contact help@firecrawl.dev to enable this feature
timeoutnumberTimeout in milliseconds. Default: 60000
Schema extracted: 3/1/2026, 1:19:34 AM
Downloads/month
8,908
GitHub Stars
0
Quality Score