Skip to main content
Execute a data endpoint and retrieve results. For providers which are executed synchronously (e.g. People Data Labs), they return the results immediately; for others (e.g. Apify), the server will return 202 with a run ID and processes the request in the background.

Usage

Flags

Examples

Run with wait

Input from file

With query and path parameters

With custom timeout

Output

Sync providers

For sync providers, the result is returned immediately - no polling needed:

Async providers

For async providers, the run starts in the background. Poll with monid runs get or use --wait:
With --wait, the CLI polls automatically until the run completes:

Provider errors

If the provider returned an error, the run is shown as a run (with status, provider HTTP status, and error body under Output) and exits 1. This is true on both the sync path and after --wait:

Infrastructure errors

If Monid itself failed to execute the run, the status is FAILED:

Status vs Provider HTTP Status

Every completed run has two independent indicators:
  • Status: COMPLETED + Response: HTTP 200 = success, data returned
  • Status: COMPLETED + Response: HTTP 404 = run finished, but provider found no data
  • Status: COMPLETED + Response: HTTP 500 = run finished, but provider had an error
  • Status: FAILED = infrastructure error (our fault), no provider response
  • Status: BLOCKED = rejected by a control gate before execution, no provider response
  • Status: STOPPED = stopped by request before completing, zero-billed
  • Status: TIMED_OUT = the run timed out before completing
See the full run status table in monid runs get. Provider errors (non-2xx responses) are not charged.

Exit Codes

Wait Timeouts

When --wait times out, the CLI names the run and how to resume it:
In --json mode, the timeout error carries error.runId and error.status.

Next Steps