오류
One error shape for every endpoint. It says whether you were charged and whether to retry. Branch on code, never on message: message is a fixed sentence per code, and what exactly was wrong is in problems and param.
| 코드 | HTTP | 청구액 | 재시도 | 의미 | 조치 방법 |
|---|---|---|---|---|---|
invalid_params | 400 | 아니요 | after a fix | A parameter is missing, has the wrong type or value, or the method is wrong. problems lists each one; param names the first. | Fix what problems says, then send the request again. |
max_price_exceeded | 400 | 아니요 | after a fix | The most this call could cost (required) is above X-Max-Price (or max_price), so it did not run. | Raise the cap to at least required, ask for fewer items, or leave the cap out. |
cursor_invalid | 400 | 아니요 | 아니요 | The cursor is not one this API issued, or it was issued to another account. | Send page.next_cursor exactly as it came, or start the listing again without a cursor. |
cursor_mismatch | 400 | 아니요 | after a fix | The cursor was sent to another endpoint, or with other parameters than the page it came from (view and fields may change). | Resend with the endpoint and parameters of the page it came from. |
unauthorized | 401 | 아니요 | 아니요 | The key is missing, malformed, revoked, disabled or expired (reason says which when known). | Send Authorization: Bearer <key> with a live key; next_step says where to get one. |
insufficient_balance | 402 | 아니요 | after a fix | The balance (available) cannot cover the most this call could cost (required). | Top up at top_up_url, then send the same request again, unchanged. |
key_budget_exceeded | 402 | 아니요 | after a fix | This call would take the key past its daily, monthly or total spending limit (reason says which). | Wait for the day or month to turn (UTC), raise the limit in the console, or use another key. |
account_suspended | 403 | 아니요 | 아니요 | The account this key belongs to is suspended, so none of its keys work. | hello@okdata.online으로 문의하세요. |
key_scope_denied | 403 | 아니요 | 아니요 | This key may not call this endpoint (its scope leaves it out). | Use a key whose scope includes it, or widen the scope in the console. |
unknown_endpoint | 404 | 아니요 | 아니요 | No endpoint lives at that path. When the path is close to one that does, moved_to (or suggestion) names it. | Use moved_to when given; otherwise check the id against the catalog (the path is the id with dots turned into slashes under /v1). |
not_found | 404 | once, if it reached the platform | 아니요 | The post, account or page does not exist or is not public. When the lookup reached the platform and was billed, or the endpoint's charge_when_not_found is above 0, this answer is charged: the body then says charged: true and amount. | 최종 응답이며, 재시도해도 바뀌지 않습니다. |
result_not_found | 404 | 아니요 | 아니요 | No kept result for this request ID on this account (it failed, or was never made). | Check the request ID; only successful calls keep a result. |
idempotency_conflict | 409 | 아니요 | after a fix | This Idempotency-Key was used in the last 24 h for a different request. | 새 요청에는 새 키를 사용하세요. |
call_in_progress | 409 | 아니요 | 동일한 Idempotency-Key로 | 이 Idempotency-Key를 사용한 호출이 아직 실행 중입니다. | Retry in a moment with the same key; you get its result, charged once. |
cursor_expired | 410 | 아니요 | 아니요 | The cursor is older than the endpoint's cursor lifetime (page.cursor_expires_at said when). | Start the listing again without a cursor, and skip the ids you already have. |
result_expired | 410 | 아니요 | 아니요 | The result is older than 24 hours and was deleted. | 엔드포인트를 다시 호출합니다(정상 과금). |
rate_limited | 429 | 아니요 | yes | The account sent too many requests this minute (reason: rate) or has too many calls running (reason: concurrency). | Wait retry_after_seconds (or for a running call to end), then send the same request. |
cost_cap_exceeded | 429 | 아니요 | yes | 계정이 일일 지출 한도에 도달했습니다. | Wait retry_after_seconds (the next UTC day), or write to us to raise it. |
uncharged_cost_limit | 429 | 아니요 | yes | 오늘 과금되지 않은 호출(결과 없음)이 너무 많습니다. | Check the ids you send; it opens again at the next UTC day. |
settlement_unknown | 500 | unknown until looked up | 동일한 Idempotency-Key로 | The data came back, but the charge could not be confirmed. | Resend with the same Idempotency-Key to get the result without paying again, or look it up at /v1/calls/{request_id}. |
internal_error | 500 | 아니요 | yes | Something went wrong on our side; nothing was charged. | 백오프를 두고 재시도하세요. |
fetch_failed | 502 | once, if it reached the platform | yes | The request failed even after we retried automatically on our side. If it reached the platform and the request was billed, it is charged once at the endpoint's price (charged: true and amount); otherwise nothing is charged. | Retry with backoff; check the status page if it persists. |
cursor_unavailable | 502 | 아니요 | yes | A cursor can only be continued the same way the previous page was served, and that is not available right now. | Retry later with the same cursor, or start the listing again without one. |
busy | 503 | once, if it reached the platform | yes | This endpoint is at capacity right now. If the request reached the platform and was billed, it is charged once at the endpoint's price (charged: true and amount); otherwise nothing is charged. | 백오프를 두고 재시도하세요. |
capability_paused | 503 | 아니요 | yes | 이 엔드포인트는 현재 일시 중지되어 실행되지 않았습니다. | /v1/catalog/status를 확인하고 복구되면 다시 시도하세요. |
timeout | 504 | once, if it reached the platform | yes | The data did not come back in time. If the request had reached the platform and was billed, it is charged once at the endpoint's price (charged: true and amount); otherwise the hold is released. | 백오프를 두고 재시도하세요. |
안전하게 재시도하기
Send an Idempotency-Key with every call. The same key with the same request within 24 hours returns the stored result with meta.replayed: true and no new charge, so resending a call whose answer got lost never pays twice for the same result. The same key with a different request returns 409 idempotency_conflict.