Events API
Tennis Ranking
GET
/v1/tennis/rankingTennis rankings. Each id is the player's team id.
Parameters
Send every parameter in the query string, including token.
| Name | Type | Required | Description |
|---|---|---|---|
| token | string | Required | Your API token. |
| type_id | integer | Optional | 1 singles men, 2 doubles men, 3 singles women, 4 doubles women. |
Request
Call https://api.odds-data-api.com/v1/tennis/ranking with your token. The examples read it from the ODDS_DATA_API_TOKEN environment variable.
curl "https://api.odds-data-api.com/v1/tennis/ranking?type_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,
"results": [
{
"id": "30001",
"name": "Jannik Sinner",
"cc": "it",
"ranking": "1",
"points": "11250"
},
{
"id": "30002",
"name": "Carlos Alcaraz",
"cc": "es",
"ranking": "2",
"points": "9820"
}
]
}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_INVALID | A param is invalid. Check error_detail. |
Failed call · application/json
{
"success": 0,
"error": "AUTHORIZE_FAILED"
}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/v1/tennis/ranking?type_id=1&token=YOUR-TOKEN- type_id
- 1
- token
- YOUR-TOKEN (from the dashboard)
Requests run with your own token and count toward your hourly limit.
