A run is asynchronous

A scrape is not a request that returns data. It is a job you submit and collect later.
Use the webhook if you can. It tells you the moment a run finishes, and costs you no requests while you wait.

Requests and tasks

One request can cover several publishers. Its publishers map has one entry per publisher, and each entry becomes one task with its own task_id.
Each task finishes on its own and sends its own webhook.

The ids

Repeating an id

  • reviews: every request starts a new run, even with the same external_request_id. retrieve-data answers with the newest one. Use a new id per run, for example the business and the date.
  • Every other type: sending the same external_request_id again while the first run is still going returns the existing task, with "duplicate": true. No second run starts. Once that run has finished, the same id starts a new one.

The states of a task

state says whether the run finished. outcome_code says what it found.

Strict requests

Unknown fields are refused. A field an entry or its scope does not take, such as a misspelt categoriez, is a 422 naming it, and no task is created. A typo never turns into a run that quietly ignores it.