Read the result envelope

Every result carries metadata next to the content. Check it before you trust the data.

Written By Carmine Cella

Last updated About 3 hours ago

Every task, job task, map call and crawl page returns the page content under result and a set of metadata fields next to it. A 200 from DataFuel means the fetch ran, not that the target answered what you wanted. Read the envelope first.

The fields

FieldMeaning
statuscompleted, failed, pending or processing. Only completed results carry content.
status_codeThe HTTP status the target site answered. A 200 can still be a soft error page. A 404 still completes and bills.
final_urlWhere the content came from after redirects.
redirectedTrue when final_url differs from the URL you asked for. Filtered listing URLs often redirect to a canonical page; switch on js_rendering if you need the filtered view.
blockedTrue when the target answered 403, 429 or 503, or showed an anti-bot wall. The task is failed and refunded.
protectionWhich anti-bot system was detected, when blocked is true.
credits_usedWhat this task cost. 0 when it failed.
errorEngine detail when status is failed.

result.data is a string for html and markdown, an object for json, extract_selector and AI output.

Common situations

blocked: true. The site refused the request. Retry with js_rendering: true or proxy_type: Premium. Nothing was charged for the blocked attempt.

status: failed, blocked: false. Usually a timeout or proxy error. Retry once with a new Idempotency-Key; the old key would replay the stored failure. If it fails again, switch engine or proxy plan.

status_code: 200, content looks wrong. Some sites answer 200 with a login wall or a consent page. Look at final_url and the first lines of result.data. wait_for_selector with the browser engine often fixes it.

redirected: true. Compare final_url to what you sent. If a query string was dropped, the site canonicalised it and you need the browser engine to keep the filtered view.

status_code: 404. The page does not exist. This is a completed task and it is billed, because the fetch succeeded.

Example

{  "id": "task_…",  "status": "completed",  "status_code": 200,  "final_url": "https://example.com/product/123",  "redirected": false,  "blocked": false,  "credits_used": 1,  "result": {    "data": "# Example product\n\nPrice: 19.99 …"  }}