AwardDB
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

Statuserror.codeMeaning
400bad_requestInvalid or missing query parameter / path value.
401api_key_requiredNo (decodable) Authorization: Bearer header on a data endpoint.
401invalid_api_keyThe key is not recognized.
401api_key_revokedThe key was revoked or rotated away.
401api_key_suspendedThe account owning the key is blocked.
401unauthorizedGeneric authentication failure.
403entitlement_requiredDownload not included in the key's tier.
403forbiddenGeneric access denied.
404not_foundUnknown id, slug, organization or dataset.
405method_not_allowedMethod not supported (the API is GET-only).
429rate_limitedPer-minute limit exceeded (Retry-After set).
429daily_limit_exceededDaily request cap used up; resets 00:00 UTC (Retry-After set).
429export_quota_exceededDaily export byte cap used up; resets 00:00 UTC (Retry-After set).
500internalUnexpected server error.