Errors
Each error code, its HTTP status, and what a caller does about it.
An error body has these fields:
| Field | Meaning |
|---|---|
code | The error code, from the table below |
message | What went wrong, for a person or an agent to read |
retryable | true when the same call can succeed later |
trace_id | The id of the call. Quote it when you report a problem |
credits_spent | The credits that the call spent before it failed |
Some codes add fields. Over MCP, the tool result has isError: true, and its structured content is the same body.
Codes
| Code | Status | Extra fields | What to do |
|---|---|---|---|
invalid_ref | 400 | Fix the ref. Name an account or a post gives the forms | |
unsupported_platform | 400 | Send a ref of one of the eight platforms | |
unsupported_media_type | 400 | media_type | Do not retry. The post is a long video, and socialdata covers short-form video only |
invalid_argument | 400 | field | Fix the argument that field names. message says what is wrong |
sql_rejected | 400 | Send one SELECT statement, with no SETTINGS clause | |
sql_too_large | 400 | Make the query read fewer rows or less data, or use less memory | |
unauthorized | 401 | Send the API key of an organization in x-api-key | |
forbidden | 403 | Use an organization that may track. Over MCP, authorize again and choose an organization | |
not_found | 404 | target | Do not retry. The platform says that the account or the post does not exist |
not_stored | 404 | target | Call lookup first. For a watchlist, check its name |
private | 404 | target | Do not retry. The account or the post is private |
restricted | 404 | target | Do not retry. The platform restricts the account or the post |
sql_timeout | 408 | Make the query cheaper, then retry | |
ambiguous_handle | 409 | candidates | Choose one of candidates and send its id |
rate_limited | 429 | retry_after_s | Wait retry_after_s seconds, then retry |
budget_exceeded | 429 | limit, resets_at | Wait until resets_at. Credits and limits explains limit |
not_implemented | 501 | Do not retry. The operation is not built yet | |
upstream_failed | 502 | Retry when retryable is true. The platform or the data provider failed, or its answer could not be read | |
search_unavailable | 503 | Retry later. Only search_posts and search_accounts use the search index |
The reference page of each tool lists the codes that the tool can answer.
Retry
Retry only when retryable is true:
- After
rate_limited, waitretry_after_sseconds. - After
budget_exceeded, wait untilresets_at. - After
upstream_failed,search_unavailable, orsql_timeout, wait a few seconds and retry once or twice.
A failed call never costs more than credits_spent says.