The Run object
idstringrequiredrun_ followed by 26 characters; results are kept 24 hours.
statusstringrequiredpartial (query): an answer, but not all of what was asked.
runningcompletedpartialfailed
methodobjectThe method and the version that ran.
Show child attributesHide child attributes
idstringslugstring or nullversionintegerlatest_versionintegerPOST /v1/runs: the method’s newest version.
dataJSON valueThe result, shaped by the method’s output_schema (query: by your output_schema when you send one).
noticestringA completed run that came back empty or incomplete while the version is under repair: it cost nothing, and when the repair is back at the latest.
emptybooleanThe site answered and has nothing for this input (still a success).
rawJSON valueWith include_raw: the site’s own response.
truncatedbooleanThe answer is not complete: the site had more than the run could read, or the output was over 10 MB and its longest list was cut. missing says what.
missingarray of stringWhat the answer lacks, in plain words (a source that failed, items that could not be read, pages not read). Only when something is.
costobjectShow child attributesHide child attributes
creditsinteger
duration_msintegersourcestringquery: methods answered, or a live web search did.
methodslive
stepsarray of objectquery: the method calls made (method: id, slug and the version that ran) and their status.
sourcesarray of objectquery, live answers: the pages the data came from.
uncoveredarray of stringquery: the things asked for that no method provides yet, answered from the live web beside the method calls.
created_atstringrunning only.
Run a method or a query
Two ways to run. With method (manual): runs that method with inputs that fit its input_schema (1 credit). With query (auto): Fous finds read methods, fills their inputs, runs up to three and returns the data, shaped by output_schema when you send one; when no method fits, it answers from the live web (source "live", sources named). A query costs 5 credits, nothing when it has no answer (404 not_found with run_id); status is partial when not all of what was asked was found; one the request check turns away answers 422 request_refused. Both wait up to wait seconds (default 30). A run still going then answers 202 with status "running" and goes on: read it with GET /v1/runs/{id}, or stop it with POST /v1/runs/{id}/cancel (nothing is charged). A query ends within 3 minutes. Hanging up before any answer stops a query; after a 202 it goes on.
Request body
Required, JSON. One of:
Run a method
methodstringrequiredThe method’s id (mth_…) or slug (<domain>/<name>); add @N to run version N instead of the one your organization uses (its first run sets it).
inputobjectFits the method’s input_schema; an input sent as null counts as not sent.
connectionstringA conn_ id, when the method needs an account and you want one other than the default.
include_rawbooleanAlso return the site’s own response as raw.
waitintegerSeconds to wait for the answer, 0 to 60 (default 30); a longer run answers 202 and goes on.
Send a query
querystringrequiredThe data you want, in plain words.
output_schemaobjectA JSON Schema object (type object) for the answer’s shape.
platformstringLimit it to one site.
waitintegerSeconds to wait for the answer, 0 to 60 (default 30); a longer query answers 202 and goes on.
Returns
A Run object.
- 200Completed (data may be empty: true when the site has nothing).
- 202Still running. The same Run, with status "running".
Errors
| Status | Code | When |
|---|---|---|
| 400 | invalid_request | Both or neither of method and query, a body that does not fit, or an output_schema that is not an object |
| 402 | insufficient_credits | Not enough credits |
| 403 | connection_required | The method needs a connected account |
| 404 | not_found | No such method or version, or a query that found no answer (with run_id and steps) |
| 422 | invalid_inputrequest_refused | The input does not fit (invalid_input), or the request check turned a query away (request_refused) |
| 429 | rate_limited | Too many requests |
| 503 | method_repairingupstream_errorupstream_blockedupstream_timeoutservice_unavailable | The site failed, refused the request or did not answer in time (upstream_error, upstream_blocked, upstream_timeout), the version is under repair (method_repairing, with Retry-After), or billing is briefly unavailable (service_unavailable) |
Get a run
Status and result of a run (a method’s or a query’s), kept 24 hours. Free. A failed run answers with its own status and error, which carries run_id (and for a query its steps).
Path parameters
idstringrequired
Query parameters
waitintegerdefault0Seconds to hold the answer while it is still running, 0 to 60.
Errors
| Status | Code | When |
|---|---|---|
| 403 | connection_required | The run needed a connected account |
| 404 | not_found | Unknown or expired, or a query that found no answer (with its run_id) |
| 409 | conflict | The run was stopped (reason stopped) |
| 422 | invalid_input | The site refused the input |
| 503 | upstream_errorupstream_blockedupstream_timeoutmethod_unavailable | The site failed, refused the request or did not answer in time (upstream_error, upstream_blocked, upstream_timeout), or the method is broken (method_unavailable) |
Cancel a run
Cancels a run (a method’s or a query’s) that is still going: nothing is charged, reading it afterwards answers 409 conflict with reason "stopped", and what the site answers after that is dropped. Free.
Path parameters
idstringrequired
Returns
- 200Stopped.
The answer has these fields:
idstringstoppedboolean