APILegacy
Legacy API. These endpoints keep working. New integrations should use the current API.
Account

api_stats

GET/api_stats

Legacy. Use GET /runs/summary for new work.

Retrieve API usage statistics for the current account. Returns counts of API runs grouped by status.

Pass detailed=true to include run-level detail (run_key and app URL) for active runs (pending, enqueued, processing).

Query parameters

detailedboolean

Set to true to include run-level detail for active statuses

Default false

Responses

200API stats retrieved successfully
request_statusstringrequired
One of success
messagestringrequired
statsApiStatsCountsrequired

Run counts grouped by status. Additional status keys use the same shape as the examples below.

Attributes
pendingobject
Attributes
countinteger
detailarray of object
Attributes
run_keystring
urlstring uri
enqueuedobject
Attributes
countinteger
processingobject
Attributes
countinteger
detailarray of object
Attributes
run_keystring
urlstring uri
successobject
Attributes
countinteger
stoppedobject
Attributes
countinteger
failedobject

Example of another status key

Attributes
countinteger
401Unauthorized - invalid or missing API key
request_statusstringrequired

Status of the request

One of error
messagestringrequired

Human-readable error message

errorsarray of string

List of specific error details

error_typestringrequired

Stable, snake_case error identifier. duplicate_run / duplicate_run_key are 409 conflicts from starting a run; credit_limit / insufficient_credits are billing failures; the plan_* / discovery_* / invalid_* / locked values are specific to extraction plan endpoints.

One of bad_request validation not_found gone unauthorized forbidden conflict duplicate_run duplicate_run_key credit_limit insufficient_credits invalid_json invalid_json_structure missing_parameter unprocessable_entity locked plan_not_ready run_already_in_progress discovery_in_progress invalid_variables invalid_output_record_json_schema extraction_plan_creation_not_enabled internal_server_error service_unavailable
403Forbidden - API access not enabled for account
request_statusstringrequired

Status of the request

One of error
messagestringrequired

Human-readable error message

errorsarray of string

List of specific error details

error_typestringrequired

Stable, snake_case error identifier. duplicate_run / duplicate_run_key are 409 conflicts from starting a run; credit_limit / insufficient_credits are billing failures; the plan_* / discovery_* / invalid_* / locked values are specific to extraction plan endpoints.

One of bad_request validation not_found gone unauthorized forbidden conflict duplicate_run duplicate_run_key credit_limit insufficient_credits invalid_json invalid_json_structure missing_parameter unprocessable_entity locked plan_not_ready run_already_in_progress discovery_in_progress invalid_variables invalid_output_record_json_schema extraction_plan_creation_not_enabled internal_server_error service_unavailable