# Firecrawl
> Firecrawl tools for the AI SDK. Web scraping, search, crawling, and data extraction for AI applications. Scrape any website into clean markdown, search the web, crawl entire sites, and extract structured data.

- **Package:** firecrawl-aisdk
- **Author:** Firecrawl
- **Tags:** scraping, search, crawling, extraction, web

## Environment Variables
- `FIRECRAWL_API_KEY`

## Included Tools
- **scrapeTool:** Scrape a single URL into clean markdown
- **searchTool:** Search the web and return relevant results
- **mapTool:** Discover and map URLs on a website
- **crawlTool:** Crawl multiple pages from a starting URL
- **batchScrapeTool:** Scrape multiple URLs at once
- **extractTool:** Extract structured data from pages
- **pollTool:** Poll async job status
- **statusTool:** Check the status of a job
- **cancelTool:** Cancel a running job

## Installation
```bash
npm install firecrawl-aisdk
```

## Usage
```typescript
import { generateText, stepCountIs } from 'ai';
import { scrapeTool } from 'firecrawl-aisdk';

const { text } = await generateText({
  model: 'openai/gpt-5-mini',
  prompt: 'Scrape https://firecrawl.dev and summarize what it does',
  tools: {
    scrape: scrapeTool,
  },
  stopWhen: stepCountIs(3),
});

console.log(text);
```

## Links
- [Documentation](https://docs.firecrawl.dev/integrations/ai-sdk)
- [npm](https://www.npmjs.com/package/firecrawl-aisdk)
- [GitHub](https://github.com/firecrawl/firecrawl)

---
[Full Library Index](/library.md)