Table tennis head to head API
Head to headEvery meeting between two players.
A list you will want once and then keep: it changes rarely. Ids in it open their own endpoints.
It needs player and opponent. Leave one out and the answer names it, before any data is read.
Try it
Your key stays in this browser and is filled in on every docs page.
{
"data": [],
"meta": {
"sport": "table-tennis",
"endpoint": "/head-to-head",
"count": 0,
"page": 1,
"per_page": 50,
"total": 0,
"total_pages": 1,
"next_cursor": null,
"next_page": null,
"prev_page": null,
"cached": false,
"age_seconds": 0
}
}Parameters
Query values this call takes. Anything else is refused with bad_param and the list it accepts.
| Name | Type | What it does | |
|---|---|---|---|
| player | id | required | A player, by their id. |
| opponent | id | required | The other side, by its id. |
Returns
The fields of data are listed here from a real answer as soon as one is held. Every answer also carries meta.
| meta | What it holds |
|---|---|
| sport, endpoint | What you asked |
| count | Rows in this answer |
| page, per_page, total, next_cursor | Where you are in a paged list, when it is paged |
| as_of | When the data was built |
| cached, age_seconds | Whether this is a stored copy, and its age |
| access | On the free key: what it reads, and the plan that opens the rest |
Errors
Codes this call can give. Each is explained in Errors.
| Status | Code | When |
|---|---|---|
| 401 | no_key | No key sent, or not in a form we read |
| 401 | bad_key | A key we do not know |
| 403 | plan | The free key asked for a date other than yesterday |
| 404 | not_found | An id we never issued for table tennis |
| 422 | bad_param | A value this call does not take, or a required one missing |
| 429 | rate | Over the calls a minute for your plan |
| 503 | upstream | The data is not answering; retry after Retry-After |
The free key reads yesterday. The Table tennis plan opens live, fixtures and every date held, for $19 a month.
Add Table tennis