Events API
Inplay Events
GET
/v3/events/inplayEvery event in play right now, with score and timer.
Parameters
Send every parameter in the query string, including token.
| Name | Type | Required | Description |
|---|---|---|---|
| token | string | Required | Your API token. |
| sport_id | integer | Required | R-SportID. |
| league_id | string | Optional | Only return this league. |
Notes
There is no pager in this API call. We just return all events.
Request
Call https://api.odds-data-api.com/v3/events/inplay with your token. The examples read it from the ODDS_DATA_API_TOKEN environment variable.
curl "https://api.odds-data-api.com/v3/events/inplay?sport_id=1&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,
"pager": {
"page": 1,
"per_page": 1000,
"total": 2
},
"results": [
{
"id": "8204771",
"sport_id": "1",
"time": "1789237200",
"time_status": "1",
"league": {
"id": "10041282",
"name": "England Premier League",
"cc": "gb"
},
"home": {
"id": "10204",
"name": "Brentford",
"image_id": null,
"cc": "gb"
},
"away": {
"id": "10218",
"name": "Everton",
"image_id": null,
"cc": "gb"
},
"ss": "2-1",
"scores": {
"1": {
"home": "1",
"away": "0"
},
"2": {
"home": "2",
"away": "1"
}
},
"timer": {
"tm": 67,
"ts": 12,
"tt": "1",
"ta": 0,
"md": 1
},
"bet365_id": "158204771"
},
{
"id": "8212001",
"sport_id": "1",
"time": "1789241100",
"time_status": "1",
"league": {
"id": "10090001",
"name": "Esoccer Battle - 8 mins play",
"cc": null
},
"home": {
"id": "90001",
"name": "Liverpool (Marlin) Esports",
"image_id": null,
"cc": null
},
"away": {
"id": "90002",
"name": "Real Madrid (Cobalt) Esports",
"image_id": null,
"cc": null
},
"ss": "2-3",
"timer": {
"tm": 5,
"ts": 41,
"tt": "1",
"ta": 0,
"md": 1
},
"bet365_id": "158212001"
}
]
}Errors
A failed call returns success: 0 with an error code. This endpoint can return:
| error | Meaning |
|---|---|
| NOT_FOUND | 404 Not Found. |
| AUTHORIZE_FAILED | Token is not provided or is incorrect. |
| TOO_MANY_REQUESTS | API rate limit exceeded. See X-RateLimit-Reset. |
| PERMISSION_DENIED | Your plan does not include this call. Contact support if this is wrong. |
| PARAM_REQUIRED | A required param is missing. Check error_detail. |
| PARAM_INVALID | A param is invalid. Check error_detail. |
Failed call · application/json
{
"success": 0,
"error": "PARAM_REQUIRED",
"error_detail": "sport_id"
}Like every endpoint, it can also return INTERNAL_SERVER_ERROR, METHOD_NOT_ALLOWED and UNDER_MAINTENANCE. See R-Errors.
Try it
GET
https://api.odds-data-api.com/v3/events/inplay?sport_id=1&token=YOUR-TOKEN- sport_id
- 1
- token
- YOUR-TOKEN (from the dashboard)
Requests run with your own token and count toward your hourly limit.
