state says whether a run finished. The outcome code says what it found. It is the only field you should branch on.
It is outcome_code in a retrieve-data answer and task_status in a webhook. The codes are the same. outcome_code is null until the run is final.
A failed run still answers HTTP 200 on
retrieve-data. HTTP errors are for refused requests only (see Errors). The run’s outcome is always in this code.
What they mean depends on the type:
For Google Maps, send the place’s own link, such as its
place_id link. A name link whose map point is off can land on a search instead. For Booking.com, send the hotel’s page link as Booking shows it; a link built from the hotel’s name can open a city list or “page not found”. Every other bad link is still 500.
A hotel with no reviews and a company with no open roles are facts about the world, not failed scrapes.
reason and details
reasonis a short summary fixed per code. It is safe to show your own users.detailsdescribes this run, for exampleCollected 2000 reviews from yelp.com.
status in the webhook
The webhook’s status is success or failed. A failure uses the same shape as a success, with empty result links. Branch on task_status, not on status.
