Home/Tools/firecrawl-aisdk

scrapeTool

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

search
v0.10.0
MIT

Interactive Playground

Test firecrawl-aisdk (scrapeTool) 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 { scrapeTool } from 'firecrawl-aisdk';

3. Use with AI SDK

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);

AI Agent Integration

How AI agents can use this tool

Use Case

Use when you need to convert web pages to clean, structured markdown

Examples

  • Scrape documentation pages
  • Extract article content
  • Convert web pages to markdown

Signature

(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...

Tags

advanced
ai
ai-sdk
aisdk
best
content
firecrawl
llm
options
page
scrape
search
single
url
vercel
web-scraping
web-search

Parameters

Available configuration options

Auto-extracted
url
Required
Type: string

The URL to scrape content from

formats
Optional
Type: array

Output formats for the scraped content

parsers
Optional
Type: array

Parsers to use for processing content (e.g., PDF parsing)

onlyMainContent
Optional
Type: boolean

Extract only the main content, removing headers, footers, and navigation

includeTags
Optional
Type: array

HTML tags to include in the output

excludeTags
Optional
Type: array

HTML tags to exclude from the output

waitFor
Optional
Type: number

Time in milliseconds to wait before scraping

actions
Optional
Type: array

Browser actions to perform before scraping (click, scroll, type, wait, etc.)

mobile
Optional
Type: boolean

Emulate mobile device

skipTlsVerification
Optional
Type: boolean

Skip TLS certificate verification

removeBase64Images
Optional
Type: boolean

Remove base64 encoded images from the output

location
Optional
Type: object

Location settings for the scraping request

storeInCache
Optional
Type: boolean

Store the scraped content in cache

maxAge
Optional
Type: number

Maximum age of cached content in milliseconds. Default: 172800000 (2 days)

headers
Optional
Type: object

Custom headers to send with the request (cookies, user-agent, etc.)

blockAds
Optional
Type: boolean

Enable ad-blocking and cookie popup blocking. Default: true

proxy
Optional
Type: string

Proxy type: basic (fast), stealth (reliable, 5 credits), auto (retry with stealth). Default: auto

zeroDataRetention
Optional
Type: boolean

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

timeout
Optional
Type: number

Timeout in milliseconds. Default: 60000

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

Statistics

Downloads/month

8,908

GitHub Stars

0

Quality Score

90%

Bundle Size

NPM Keywords

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

Maintainers

hello_sideguide(hello@sideguide.dev)

Frameworks

vercel-ai