Scraping API
Help center

Use DataFuel from AI agents and IDEs

Connect Claude Code, Cursor, VS Code or any MCP client to the DataFuel MCP server with one command, or hand an agent the skill file.

The same API is exposed as a Model Context Protocol server for agents and AI IDEs. It is streamable HTTP, stateless, and authenticates with the same X-API-Key header (or Authorization: Bearer). Every tool call is billed exactly like its REST counterpart.

Endpoint: https://scraping-api.datafuel.ai/mcp

Set it up with one command

Shell
npx -y @datafuel/mcp init

It asks for your API key, checks it, finds the MCP clients installed on your machine and adds DataFuel to the ones you pick, without touching your other servers. Restart the clients afterwards. It needs Node.js 20.3 or later.

Supported clients:

ClientWhere it is configured
Claude Codeclaude mcp add at user scope
Cursor~/.cursor/mcp.json
VS Codeyour user mcp.json. VS Code asks for the key when the server first starts, so it is not stored in the file.
Windsurf (Devin Desktop)~/.config/devin/mcp_config.json, or ~/.codeium/windsurf/mcp_config.json
Claude Desktopclaude_desktop_config.json, through a small local proxy
Codex CLI~/.codex/config.toml
Gemini CLI~/.gemini/settings.json

Useful options:

  • --client cursor,codex sets up only those clients, -y skips the questions.
  • --project writes the current project’s config instead of your user config. The key-holding file is added to .gitignore, and a file that git already tracks is refused so the key is never committed.
  • For Claude Code, init can also install the DataFuel skill (see below).
  • npx -y @datafuel/mcp doctor --api-key df_key_your_key_here checks the key and shows where DataFuel is configured, and npx -y @datafuel/mcp remove takes it out again.

The command writes your key into the client’s config file (except for VS Code). For Claude Code it passes the key to claude mcp add, so it is briefly visible in your machine’s process list while that runs.

Manual setup

To configure a client yourself, or one the command does not support, add the server by hand.

Claude Code:

Shell
claude mcp add --transport http datafuel https://scraping-api.datafuel.ai/mcp \
  --header "X-API-Key: df_key_your_key_here"

Cursor and other clients that connect over HTTP, in the client’s MCP configuration (mcp.json or equivalent; some clients call the field serverUrl or httpUrl instead of url, and VS Code uses servers instead of mcpServers and needs "type": "http"):

JSON
{
  "mcpServers": {
    "datafuel": {
      "url": "https://scraping-api.datafuel.ai/mcp",
      "headers": { "X-API-Key": "df_key_your_key_here" }
    }
  }
}

Clients that can only start a local command, such as Claude Desktop, run the proxy from the same package:

JSON
{
  "mcpServers": {
    "datafuel": {
      "command": "npx",
      "args": ["-y", "@datafuel/mcp"],
      "env": { "DATAFUEL_API_KEY": "df_key_your_key_here" }
    }
  }
}

Tools

ToolWhat it doesREST equivalent
scrapeRun one task and wait for the result. type (unlocker or llm_scraping) and attributes as in POST /task.POST /task
get_taskFetch a task and its result by id.GET /task/{id}
mapDiscover the URLs of a site. Flat inputs: url, search, limit, sitemap, include_subdomains, ignore_sitemap, sitemap_only, proxy_type, proxy_country.POST /map
create_jobQueue a batch. Plural targets in attributes (urls or prompts, at least two).POST /job
get_jobJob status and counters.GET /job/{id}
get_job_resultsPer-task results of a job.GET /job/{id}/results
cancel_jobCancel a job or crawl. Tasks not started yet are refunded.POST /job/{id}/cancel
crawlStart a crawl. attributes is the crawl config plus unlocker options. Returns job_id.POST /crawl
get_crawlCrawl status, page counters, stop reason.GET /crawl/{id}
get_crawl_resultsPage through crawled pages. Pass next_cursor back as cursor.GET /crawl/{id}/results
get_balanceRemaining credits.GET /users/@me/balance
list_jobsYour jobs and crawls, newest first. Filter by status, type and start_date / end_date; pass next_cursor back as cursor.GET /job
list_tasksYour tasks, newest first, with the same filters plus job_id. No result payload: use get_task.GET /task
get_analyticsUsage totals, time series and breakdowns by task type, target and status code over a date range.GET /task/analytics/dashboard

scrape and map block until the result is ready, up to ten minutes. The job and crawl tools return immediately and are polled.

Differences from REST: the tools default include_images to false for markdown output, take extract_selector and extract_regex as plain objects (the REST API wants JSON-encoded strings), and do not offer SERP.

Give an agent the skill file

For agents that call the REST API directly, DataFuel publishes a skill file that explains endpoint choice, request shapes, the result envelope and error handling in a form written for models:

  • https://scraping-api.datafuel.ai/skill.md
  • https://scraping-api.datafuel.ai/llms.txt (same content)

Drop it into your agent’s context or skills directory. npx -y @datafuel/mcp init installs it for Claude Code in ~/.claude/skills/datafuel/. The full machine-readable schema is at https://scraping-api.datafuel.ai/docs/openapi.yaml.

Keep the key out of prompts

Configure the key in the MCP client or in the agent’s environment. Never paste it into a chat message; transcripts get logged and shared.