The RunList object
runsarray of objectrequiredShow child attributesHide child attributes
idstringrequiredstatusstringrequiredrunningcompletedfailedcanceledmethodobject or nullrequiredThe method and version that ran; null when it no longer exists.
Show child attributesHide child attributes
idstringslugstring or nullversioninteger or null
created_atstringrequiredcompleted_atstring or nullrequiredcreditsintegerrequiredWhat it was charged, in credits.
duration_msinteger or nullexpiredbooleanIts input and result are gone: both are null.
inputJSON valueWhat it was given, until it expires.
dataJSON valueIts result, until it expires.
errorErrorA failed or canceled run, until its input and result expire.
has_morebooleanrequiredMore runs are older: send before with the last run’s id.
The Run object
idstringrequiredrun_ followed by 26 characters. Its record stays readable for 30 days on every plan; its input and result expire after the plan’s run_history_hours (Free 24 hours).
statusstringrequiredA failed or canceled run has error and no data. POST /v1/runs and GET /v1/runs/{id} answer a failed or canceled run with the error itself, at its status (403, 409, 422, 503…); the run list and POST /v1/runs/{id}/cancel show it as this object.
runningcompletedfailedcanceledmethodobjectThe method and the version that ran.
Show child attributesHide child attributes
idstringslugstring or nullversionintegerlatest_versionintegerThe method’s newest version.
errorErrorA failed or canceled run: its error object (code, message, next_step, run_id, and whatever the code carries). A canceled run has code conflict with reason stopped.
dataJSON valueThe result, shaped by the method’s output_schema. null once expired.
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.
creditsintegerrequiredWhat it was charged, in credits.
costobjectDeprecated: read credits. The same figure, as runs reported it before credits; on every run that ended.
Show child attributesHide child attributes
creditsinteger
duration_msinteger or nullexpiredbooleanThe run’s input and result are gone (the plan’s run_history_hours passed): data is null, and its record stays for 30 days.
created_atstringrequiredcompleted_atstring or nullrequired
List runs
Your organization’s runs of the past 30 days, on every plan, newest first; a run still going always shows. Each has its input and result (a failed one its error) until the plan’s run_history_hours pass (Free 24 hours, Starter 7 days, Pro 14 days, Business and Enterprise 30 days); after that it has expired: true and both are null. Free.
Query parameters
limitintegerdefault20beforestringOnly runs older than this: an ISO time, or a run id (the last one of the page before).
methodstringOnly the runs of this method (its id or slug).
statusstringOnly the runs in this status.
runningcompletedfailedcanceled
Errors
| Status | Code | When |
|---|---|---|
| 400 | invalid_request | limit, before or status is not one |
Run a method
Runs a method with inputs that fit its input_schema (1 credit) and waits 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 run that fails while you wait answers with its error, as GET /v1/runs/{id} does. Send an Idempotency-Key header to make the call safe to repeat: the same key with the same request, within 24 hours, answers with the run it first started, and is charged once.
Headers
Idempotency-KeystringA string you choose per run. A retry with the same key and the same request (method, input, connection, include_raw) within 24 hours answers with the run the first call started, and is charged once. The same key with another request is a new run, and so is a call after 24 hours. A run refused before it started (a limit, the input, credits) uses no key. Empty: no key.
Request body
Required, JSON.
methodstringrequiredThe method’s id (mth_…) or slug (<domain>/<name>); add @N to run version N instead of the current one.
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.
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 | No method, or a body that does not fit |
| 402 | insufficient_credits | Not enough credits left |
| 403 | connection_required | The method needs a connected account |
| 404 | not_found | No such method or version, or (param connection) no such connection on its site |
| 422 | invalid_input | The input does not fit |
| 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 site does not serve the country the run left from (upstream_geo_blocked), a run moved more data than a run may (run_traffic_limit, not charged), 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 workflow run’s id, wfr_…, answers that WorkflowRun with its steps). Free. Its record (id, method, status, cost, duration_ms, created_at) stays readable for 30 days on every plan; an older run answers 404. Its input and result expire after the plan’s run_history_hours (Free 24 hours, Starter 7 days, Pro 14 days, Business and Enterprise 30 days); after that a completed run answers with expired: true and data: null. 200 with the Run object once it completed, 202 while it runs; a failed or canceled run answers with its error at its status (403, 409, 422, 503…), as POST /v1/runs does. A failed run’s input and failure detail are kept 30 days, to debug it and repair the method, and are not shown past the plan’s run history.
Path parameters
idstringrequired
Query parameters
waitintegerdefault0Seconds to hold the answer while it is still running, 0 to 60.
Errors
| Status | Code | When |
|---|---|---|
| 404 | not_found | No such run, or one older than the 30 days a run stays readable |
| 409 | conflict | The run was canceled |
| 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 site does not serve the country the run left from (upstream_geo_blocked), a run moved more data than a run may (run_traffic_limit, not charged), the version is under repair (method_repairing, with Retry-After), or billing is briefly unavailable (service_unavailable) |
Cancel a run
A workflow run’s id (wfr_…) cancels that run. Cancels a run that is still going: nothing is charged, and what the site answers after that is dropped. Answers with the Run object, status canceled. Free.
Path parameters
idstringrequired