Which endpoint do I use?
Task, job, map or crawl. Pick by the shape of the work, not by the size of the site.
Written By Carmine Cella
Last updated About 3 hours ago
DataFuel has four write endpoints. They share one request envelope (type, proxy settings, attributes) and one result format, so switching between them is cheap. Pick by what you have and what you need.
Synchronous endpoints hold the connection and return the result in the response. Asynchronous ones return an id at once; you poll for status and then fetch results.
Rules of thumb
- Start with a task on the request engine (
js_renderingoff). It is the cheapest and fastest option and keeps the exact URL you asked for. - Turn
js_renderingon only when you have to. Signs you need it: the result is empty,redirectedis true and you wanted the original filtered URL, or/mapcame back withno_links_on_page. Browser pricing applies. - Discover before you crawl.
/mapcosts one credit and tells you how big a section is. Then/crawlwithinclude_pathsand amax_pagesyou can afford. - Use a job when you already know the URLs. It is cheaper and more predictable than a crawl.
- Never loop
/taskover a list you got from/map. That is a job. - Send an
Idempotency-Keyon every write. A retry with the same key attaches to the running task instead of charging twice. See Retry safely with idempotency keys.
The request envelope
Every write looks the same:
{ "type": "unlocker", "proxy_type": "Basic", "proxy_country": "US", "attributes": { "url": "https://example.com/p/1", "result_format": "markdown" }}typepicks the engine:unlockerfor pages,llm_scrapingfor AI engines. Map and crawl have their own routes and do not take atype.proxy_typeisBasicorPremium;proxy_countryis an ISO country code. Premium routes through residential IPs and costs ten times more.attributesis engine-specific:urland result options for unlocker,promptandenginefor LLM scraping.
Each of the four endpoints has its own guide: Scrape a single page, Scrape a list of URLs, Map the URLs of a site, Crawl a site.
What can be switched off
Task types and LLM engines can be disabled at runtime by DataFuel operators, for example when an upstream AI engine is down. GET /api/v1/capabilities (no key needed) lists what is on and why anything is off. A call to a disabled module answers 503 with code MODULE_UNAVAILABLE or ENGINE_UNAVAILABLE and charges nothing. Check capabilities once before a large batch or an llm_scraping call.