Documentation / Players
Snooker API: Players: everyone who has played in an event we hold, from 1927 on
Players: everyone who has played in an event we hold, from 1927 on.
GEThttps://api.snookerapi.net/v1/players
Try it
Parameters
| Name | Type | What it is |
|---|---|---|
| q | string | Words in the player's name. |
| country | string | Nationality, e.g. England, China. |
| page | integer | Page number, from 1. |
| cursor | string | The next_cursor from the previous page. |
| per_page | integer | Rows per page. |
Returns
| Field | Type | What it holds |
|---|---|---|
| id | string | The record's own id: stable, and the same in every call. |
| name | string | The name, as we hold it. |
| country | string or null | The country. |
| born | date or null | The date of birth, where it is known. |
Example answer
A real answer, read from the data within the last hour: GET /v1/players?q=Sullivan&per_page=2
{
"data": [
{
"id": "pl_m1j79awf",
"name": "Ronnie O'Sullivan",
"country": "England",
"born": "1975-12-05"
},
{
"id": "pl_xcj1d100",
"name": "Sean O'Sullivan",
"country": "England",
"born": "1994-04-29"
}
],
"meta": {
"plan": "House key",
"count": 2,
"next_cursor": "bzIuMjY0ZmE2",
"page": 1,
"per_page": 2,
"total": 8,
"total_pages": 4,
"next_page": 2,
"prev_page": null
}
}Errors
| Status | Code | When |
|---|---|---|
| 401 | unauthorized | No key, or a key that is not valid. Errors |
| 400 | bad_request | A parameter has the wrong shape. Errors |
| 422 | unknown_parameter | A parameter this call does not take. Errors |
| 429 | rate_limited | Too many calls this minute; wait for Retry-After. Errors |