# Get a ranking table by id (v1)

Returns up to 500 rows of a ranking with position, points and previous position. `year` reads a past year of yearly rankings such as UEFA coefficients. Nothing found returns `data: null`.

- Platform: Sofascore
- Request: `GET https://api.toolzerhub.com/v1/sofascore/rankings/table`
- Auth: `x-api-key` header
- Cost: 1 credit per successful request. Failed requests are not billed.
- Page: https://docs.toolzerhub.com/reference/sofascore/rankings/get-sports-ranking-table

| Parameter | In | Required | Type | Description |
| --- | --- | --- | --- | --- |
| `ranking_id` | query | yes | integer | Ranking id, from Get Sports Ranking Types: 1 UEFA countries, 2 FIFA, 5 ATP, 6 WTA, 9 UEFA clubs. |
| `year` | query | no | integer | Year of a yearly ranking, such as UEFA coefficients. |

## Example request

```bash
curl "https://api.toolzerhub.com/v1/sofascore/rankings/table?ranking_id=<ranking_id>" \
  -H "x-api-key: $TOOLZERHUB_API_KEY"
```

Success responses are wrapped as `{ "data": ... }`. Errors return `{ "error": { "code", "status", "message", "retryable", "details" } }`. See https://docs.toolzerhub.com/docs/responses-and-errors.
