Make your first request

Get an API key, check your balance and scrape one page in under five minutes.

Written By Carmine Cella

Last updated About 3 hours ago

DataFuel is one API for fetching pages that block plain HTTP clients. You send a URL, DataFuel routes it through anti-bot unlockers and residential proxies, and you get clean Markdown, HTML, JSON or a screenshot back.

Base URL: https://scraping-api.datafuel.ai/api/v1

1. Get your API key

Sign in to the DataFuel dashboard and copy your key from your account settings. Keys start with df_key_. Keep them server-side; never ship one in a browser or mobile app.

2. Check that the key works

curl https://scraping-api.datafuel.ai/api/v1/users/@me/balance \  --header "X-API-Key: df_key_your_key_here"

{ "balance": 4820 }

A 401 means the key is wrong or missing. See Authentication and API keys for details.

3. Scrape a page

curl https://scraping-api.datafuel.ai/api/v1/task \  --request POST \  --header "Content-Type: application/json" \  --header "X-API-Key: df_key_your_key_here" \  --data '{    "type": "unlocker",    "proxy_type": "Basic",    "attributes": {      "url": "https://example.com/",      "result_format": "markdown"    }  }'

POST /task is synchronous: the connection stays open until the page is fetched, then the whole result comes back in one response. Set your HTTP client timeout to 120 seconds or more.

The response has two parts. result.data holds the page content in the format you asked for. The fields next to it (status, status_code, final_url, blocked, credits_used) tell you what happened during the fetch. Read them before trusting the content; see Read the result envelope.

4. Next steps