Events API
Team
/v3/teamTeams of a sport. Tennis players and esoccer pairings are teams too.
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. |
| cc | string | Optional | R-Countries, e.g. 'co' for Colombia. |
| max_id | string | Optional | Only return teams with id < max_id. |
Notes
Data is returned by id DESC. Call without max_id first, then pass the smallest id as max_id until the result is empty.
is_esports is 1 for Esoccer, Ebasketball and other video game teams.
Request
Call https://api.odds-data-api.com/v3/team with your token. The examples read it from the ODDS_DATA_API_TOKEN environment variable.
curl "https://api.odds-data-api.com/v3/team?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.
{
"success": 1,
"pager": {
"min_id": "10204"
},
"results": [
{
"id": "90001",
"name": "Liverpool (Marlin) Esports",
"cc": null,
"image_id": null,
"has_squad": 0,
"is_esports": 1
},
{
"id": "10204",
"name": "Brentford",
"cc": "gb",
"image_id": null,
"has_squad": 1,
"is_esports": 0
}
]
}Errors
A failed call returns success: 0 with an error code. This endpoint can return:
| error | Meaning |
|---|---|
| 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. |
{
"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
https://api.odds-data-api.com/v3/team?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.
