Events API

Event History

GET/v1/event/history

Head-to-head matches and the latest matches of each team.

Parameters

Send every parameter in the query string, including token.

Query parameters
NameTypeRequiredDescription
tokenstringRequiredYour API token.
event_idstringRequiredEvent id from the events endpoints.
qtyintegerOptionalNumber of matches, 1 to 20. Default 10.

Request

Call https://api.odds-data-api.com/v1/event/history with your token. The examples read it from the ODDS_DATA_API_TOKEN environment variable.

curl "https://api.odds-data-api.com/v1/event/history?event_id=8204771&qty=5&token=$ODDS_DATA_API_TOKEN"

Response

JSON with success: 1 and results. Values are strings unless shown otherwise. See Response format and R-Pager.

application/json
{
  "success": 1,
  "results": {
    "h2h": [
      {
        "id": "7921440",
        "sport_id": "1",
        "league": {
          "id": "10041282",
          "name": "England Premier League",
          "cc": "gb"
        },
        "home": {
          "id": "10218",
          "name": "Everton",
          "image_id": null,
          "cc": "gb"
        },
        "away": {
          "id": "10204",
          "name": "Brentford",
          "image_id": null,
          "cc": "gb"
        },
        "time": "1776020400",
        "ss": "1-1",
        "time_status": "3"
      }
    ],
    "home": [],
    "away": []
  }
}

Errors

A failed call returns success: 0 with an error code. This endpoint can return:

Error codes
errorMeaning
NOT_FOUND404 Not Found.
AUTHORIZE_FAILEDToken is not provided or is incorrect.
TOO_MANY_REQUESTSAPI rate limit exceeded. See X-RateLimit-Reset.
PERMISSION_DENIEDYour plan does not include this call. Contact support if this is wrong.
PARAM_REQUIREDA required param is missing. Check error_detail.
PARAM_INVALIDA param is invalid. Check error_detail.
Failed call · application/json
{
  "success": 0,
  "error": "PARAM_REQUIRED",
  "error_detail": "event_id"
}

Like every endpoint, it can also return INTERNAL_SERVER_ERROR, METHOD_NOT_ALLOWED and UNDER_MAINTENANCE. See R-Errors.

Try it

GEThttps://api.odds-data-api.com/v1/event/history?event_id=8204771&qty=5&token=YOUR-TOKEN
event_id
8204771
qty
5
token
YOUR-TOKEN (from the dashboard)

Requests run with your own token and count toward your hourly limit.