Documentation / Guides
Errors, sports data API
ErrorsAn error answers with an HTTP status and a short code you can switch on, a message for people, and detail where it helps.
{
"error": {
"code": "plan",
"message": "The free key reads yesterday (2026-11-01). The Football plan reads every date held.",
"detail": { "sport": "football", "add": "https://datasportapi.com/account?add=football" }
}
}
Every code
| Status | Code | What to do |
|---|---|---|
| 401 | no_key | No key was sent, or not in a form we read. Send X-API-Key or Authorization: Bearer. |
| 401 | bad_key | The key is not one of ours, or it was revoked. Check it on your account page. |
| 403 | plan | Your plan does not read this: live or fixtures on the free key, or a date other than yesterday. detail names the plan that does. |
| 404 | not_found | No record has that id in this sport, or nothing matches. Ids come from our own answers. |
| 404 | no_route | No endpoint at that path. detail links the sport's endpoint list. |
| 422 | bad_param | A value this call does not take, a date not written YYYY-MM-DD, or a value it needs is missing. detail lists what it accepts. |
| 429 | rate | Too many calls this minute. Wait Retry-After seconds. |
| 429 | quota | The day's or month's calls are used. detail says when they reset. |
| 500 | server | Something failed our end. Try again shortly; it is logged and looked at. |
| 501 | not_held | This sport does not have this endpoint. It will not change by retrying. |
| 503 | upstream | That data is not answering right now. Try again in a minute; Retry-After says when. |
| 503 | coming | This sport is being connected. It opens to every plan for the sport the moment it does. |
Retrying
Retry rate, upstream and server after the Retry-After seconds. Never retry not_held, bad_param, not_found or plan: the same call gives the same answer.