# Web Scraping APIs

> Turn web pages into clean, LLM-ready content: scrape a URL, crawl a site, batch-scrape pages, map a domain or extract content with Firecrawl, Exa and Tavily.

Source: https://www.sandbase.ai/apis/web-scraping

## APIs

- [Firecrawl Page Scraper](https://www.sandbase.ai/apis/firecrawl/scrape.md): $0.0075 per call; Scrapes content from target web pages with automatic handling of JavaScript rendering. Returns extracted page data based on specified formats and proxy settings.
- [Firecrawl Crawl](https://www.sandbase.ai/apis/firecrawl/crawl.md): From $0.0075 per call; Crawl an entire website starting from a URL. Discovers and scrapes all reachable pages, returning clean markdown for each. Runs asynchronously — submit the job, then poll for results.
- [Firecrawl Batch Scrape](https://www.sandbase.ai/apis/firecrawl/batch/scrape.md): From $0.0075 per call; Scrape multiple URLs in a single batch job. Submit a list of URLs and poll for results as each page completes.
- [Firecrawl URL Discovery](https://www.sandbase.ai/apis/firecrawl/map.md): $0.0075 per call; Discovers and returns URLs found across a target website. Provide an HTTPS target address and define the maximum link count to map site pages.
- [Exa Contents](https://www.sandbase.ai/apis/exa/contents.md): $0.0045 per call; Extract clean page contents for a list of URLs: full text, highlights, AI summaries and metadata, from cache or with a live crawl.
- [Tavily URL Content Extraction](https://www.sandbase.ai/apis/tavily/extract.md): From $0.0016 per call; Extracts clean text content from specified web pages using their URLs. Supports basic or advanced extraction depth and optional image inclusion.
- [Tavily Site Map](https://www.sandbase.ai/apis/tavily/map.md): From $0.04 per call; Discovers the URL structure of a target website without extracting full page content. Accepts a starting URL, maximum traversal depth, and URL discovery limits.

## Endpoints on this page

The most used endpoints first.

| Endpoint | Provider | What it returns |
| --- | --- | --- |
| Exa Contents | Exa | Extract clean page contents for a list of URLs: full text, highlights, AI summaries and metadata, from cache or with a live crawl |
| Tavily URL Content Extraction | Tavily | Extracts clean text content from specified web pages using their URLs |
| Firecrawl Page Scraper | Firecrawl | Scrapes content from target web pages with automatic handling of JavaScript rendering |
| Firecrawl URL Discovery | Firecrawl | Discovers and returns URLs found across a target website |
| Tavily Site Map | Tavily | Discovers the URL structure of a target website without extracting full page content |
| Firecrawl Crawl | Firecrawl | Crawl an entire website starting from a URL |
| Firecrawl Batch Scrape | Firecrawl | Scrape multiple URLs in a single batch job |

## Overview

### Clean web content for agents and RAG

These endpoints fetch pages and return clean text or Markdown that is ready for an LLM, so you do not have to run headless browsers or HTML parsers yourself.

- **Scrape one page:** Firecrawl Scrape.
- **Crawl or batch:** Firecrawl Crawl and Batch Scrape.
- **Discover URLs:** Firecrawl Map and Tavily Map.
- **Extract content from known URLs:** Exa Contents and Tavily Extract.

To find pages first, use [Web Search APIs](https://www.sandbase.ai/apis/web-search). For structured data from specific sites, see [E-commerce](https://www.sandbase.ai/apis/ecommerce) and [Social Media](https://www.sandbase.ai/apis/social-media) APIs.

## Start using Web Scraping APIs on SandBase

One key, one request pattern, billed per call.

1. **Create an API key** Sign in to the SandBase Console and create a key on the API Keys page. Keep it in an environment variable and never commit it to source control.

```
export SANDBASE_API_KEY="YOUR_SANDBASE_API_KEY"
```

2. **Call an endpoint** POST a JSON body to /v1/api/firecrawl/scrape. Every endpoint on this page uses the same pattern.

```
curl https://api.sandbase.ai/v1/api/firecrawl/scrape \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com", "proxy": "basic"}'
```

3. **Let your agent call it** Connect the SandBase MCP server or CLI so an agent can discover and call these endpoints with your key.

```
npx -y @sandbaseai/cli@latest connect
```

## FAQ

### What format is returned?

Clean Markdown or text, plus metadata. Firecrawl can return other formats; see the endpoint page.

### Can it handle JavaScript-heavy sites?

Firecrawl is built for dynamic pages, but results vary by site. Test your target pages first.

### Scrape or Extract?

Use Firecrawl Scrape for full control of one page. Use Exa Contents or Tavily Extract to pull clean content from a list of URLs.

### Can my agent scrape through MCP?

Yes. Connect the SandBase MCP server and the agent can call these endpoints directly.

## Use it through SandBase

- Base URL: `https://api.sandbase.ai/v1`, with `Authorization: Bearer $SANDBASE_API_KEY`.
- Language models use the OpenAI-compatible `POST /v1/chat/completions`; media models use `POST /v1/run`; data APIs use `POST /v1/api/{vendor}/{endpoint}`.
- AI agents can connect through the SandBase MCP server or CLI: https://www.sandbase.ai/skill.md
- Every model and API page has a Markdown twin at the same URL plus `.md`. Full index: https://www.sandbase.ai/llms.txt
