tweetapi.dev

Errors

Status codes, error codes and what to do.

Errors are JSON with a stable code, a human message and the request_id. No error is charged.

{ "error": { "code": "no_credits", "message": "balance is zero; buy a credit pack" }, "request_id": "..." }
StatusCodeMeaningWhat to do
400bad_requesta parameter is missing or malformedfix the request
401missing_key, invalid_keyno key, or a revoked keycheck the header
402no_creditsbalance is zerobuy a pack
403access_deniedX does not serve this object to the reading sessiontry later, or a different object
403product_unavailablesearch product not available, for example Topuse Latest
404not_foundno such user or tweet, or it is protectednothing
429rate_limitedover your requests-per-second limitwait retry-after seconds
503upstream_rate_limited, no_account, busyX or our pool is saturated right nowretry after retry-after seconds, with backoff
502upstream_error, query_id_stale, request_rejectedX changed something on its sideretry once; if it persists we are already paged
500internalour bugsend us the request_id

Retry policy we recommend

Retry 503 and 502 up to three times with 2, 4 and 8 seconds between attempts. Do not retry 4xx. Because failed requests are free, retries never cost credits.

On this page