API documentation pages
Errors & troubleshooting
All errors are JSON: {"error": {"code", "message"}}
(plus a docs pointer on authentication, entitlement and quota errors).
Examples
# No key on a data endpoint
curl -s https://awarddb.com/api/v1/organizations
# 401 WWW-Authenticate: Bearer realm="AwardDB"
{ "error": { "code": "api_key_required",
"message": "This endpoint requires an AwardDB API key. Send it as 'Authorization: Bearer awdb_…'. Free keys are available at /register — no payment required.",
"docs": "/api/docs#authentication" } }
# Unknown / revoked / suspended keys
curl -s https://awarddb.com/api/v1/organizations -H "Authorization: Bearer awdb_nope"
# 401 { "error": { "code": "invalid_api_key", … } }
# 401 { "error": { "code": "api_key_revoked", … } } (revoked/rotated key)
# 401 { "error": { "code": "api_key_suspended", … } } (blocked account)
# Quota and entitlement
curl -s https://awarddb.com/api/v1/exports/works -H "Authorization: Bearer $FREE_KEY"
# 403 { "error": { "code": "entitlement_required", … } }
# 429 { "error": { "code": "rate_limited", … } } + Retry-After
# 429 { "error": { "code": "daily_limit_exceeded", … } } + Retry-After
# 429 { "error": { "code": "export_quota_exceeded", … } } + Retry-After
# Request-shape and lookup errors
curl -s "https://awarddb.com/api/v1/works/does-not-exist" -H "Authorization: Bearer $AWARDDB_KEY"
{ "error": { "code": "not_found", "message": "work 'does-not-exist' not found" } } # 404
curl -s "https://awarddb.com/api/v1/works?per_page=999999" -H "Authorization: Bearer $AWARDDB_KEY"
{ "error": { "code": "bad_request", "message": "per_page must be between 1 and 200" } } # 400
curl -s "https://awarddb.com/api/v1/search" -H "Authorization: Bearer $AWARDDB_KEY"
{ "error": { "code": "bad_request", "message": "q is required" } } # 400
The "docs": "/api/docs#authentication" pointer in the
first example is the stable address API clients can rely on; it lands on the
Authentication page of these docs.
All error codes
| Status | error.code | Meaning |
|---|---|---|
| 400 | bad_request | Invalid or missing query parameter / path value. |
| 401 | api_key_required | No (decodable) Authorization: Bearer header on a data endpoint. |
| 401 | invalid_api_key | The key is not recognized. |
| 401 | api_key_revoked | The key was revoked or rotated away. |
| 401 | api_key_suspended | The account owning the key is blocked. |
| 401 | unauthorized | Generic authentication failure. |
| 403 | entitlement_required | Download not included in the key's tier. |
| 403 | forbidden | Generic access denied. |
| 404 | not_found | Unknown id, slug, organization or dataset. |
| 405 | method_not_allowed | Method not supported (the API is GET-only). |
| 429 | rate_limited | Per-minute limit exceeded (Retry-After set). |
| 429 | daily_limit_exceeded | Daily request cap used up; resets 00:00 UTC (Retry-After set). |
| 429 | export_quota_exceeded | Daily export byte cap used up; resets 00:00 UTC (Retry-After set). |
| 500 | internal | Unexpected server error. |