# SportsData API API

> SportsData API API on Apizie: 15 endpoints (Retrieves a list of competitions for a given class id., Retrieves a list of events for a given class id., Retrieves a specific competition, Retrieves a list of events for a given competition id., …) returned as clean JSON through one API key. 15 endpoints are live now. Call it over REST at https://zieapi.vercel.app/v1/entertainment:whapi-sportsdata/{endpoint} or from Claude, ChatGPT and Cursor through the Apizie MCP server. Free plan: 1,000 requests a month.

- Project key: `entertainment:whapi-sportsdata`
- Category: Entertainment
- Status: live
- Source: http://developer.williamhill.com
- Page: https://zieapi.vercel.app/api/entertainment/whapi-sportsdata
- OpenAPI: https://zieapi.vercel.app/api/entertainment/whapi-sportsdata/openapi.json

The William Hill SportsData REST API is a collection of GET methods to provide William Hill product data such as sport, competition, event, market and selection data (including prices).

## Endpoints

### Retrieves a list of competitions for a given class id.
`GET https://zieapi.vercel.app/v1/entertainment:whapi-sportsdata/get-competitions-for-class`

| Parameter | Type | Required | Description |
|---|---|---|---|
| apiKey | string | yes | Your API Key available from your developer portal |
| classId | string | yes | The class id to retrieve information for. |
| isPublished | string | no | Specify whether only active entities should be returned, according to the William Hill definition of active |
| fields | array | no | Specify an absolute field list to return (Comma-Separated List) |
| include | array | no | Specify fields in addition to the default to return (Comma-Separated List) |
| exclude | array | no | Specify fields from the default to exclude (Comma-Separated List) |
| displayed | string | no | Specify whether to return displayed entities or not |
| channel | string | no | Specify a channel filter and only results from that channel will be returned |
| status | string | no | Specify a status to filter results by. This is currently A (active) or S (suspended) |
| sort | string | no | The field to order the response by, followed by the order. For example: name,desc |
| offset | integer | no | Skip over a number of elements by specifying a start value for the query |
| limit | integer | no | Specify the number of results to return |
| culture | string | no | Code used to return responses in language other than English, acceptable values are… |

### Retrieves a list of events for a given class id.
`GET https://zieapi.vercel.app/v1/entertainment:whapi-sportsdata/get-events-for-class`

| Parameter | Type | Required | Description |
|---|---|---|---|
| apiKey | string | yes | Your API Key available from your developer portal |
| classId | string | yes | The class id to retrieve information for. |
| isPublished | string | no | Specify whether only active entities should be returned, according to the William Hill definition of active |
| fields | array | no | Specify an absolute field list to return (Comma-Separated List) |
| include | array | no | Specify fields in addition to the default to return (Comma-Separated List) |
| exclude | array | no | Specify fields from the default to exclude (Comma-Separated List) |
| displayed | string | no | Specify whether to return displayed entities or not |
| channel | string | no | Specify a channel filter and only results from that channel will be returned |
| settled | boolean | no | Specify wether only settled entities should be returned |
| includeEmpty | boolean | no | When declared as false it should exclude markets and events that have no selections / markets |
| status | string | no | Specify a status to filter results by. This is currently A (active) or S (suspended) |
| sort | string | no | The field to order the response by, followed by the order. For example: name,desc |
| offset | integer | no | Skip over a number of elements by specifying a start value for the query |
| limit | integer | no | Specify the number of results to return |
| headlineSummary | boolean | no | Return only headline markets (Markets with the lowest display order) Either 1 InPlay and 1 Pre-Match, or the amount specified in… |
| includeAllDescendants | boolean | no | Include every descendant in the below heirarchy |
| isInPlay | boolean | no | Show only events that are in-play |
| marketCount | integer | no | Specify the number of markets to return when requesting headlineSummary. This count of InPlay and Pre-Match markets will be returned.For… |
| date | string | no | Return only events for the specified date (yyyy-MM-dd). |
| dateFrom | string | no | The UTC datetime from the events to be returned. (yyyy-MM-ddTHH:mm:ss) |
| dateTo | string | no | The UTC datetime TO the events to be returned. (yyyy-MM-ddTHH:mm:ss) |
| eventSort | string | no | Filter event by event sort |
| culture | string | no | Code used to return responses in language other than English, acceptable values are… |
| marketPublished | string | no | Specify whether only active entities should be returned, according to the William Hill definition of active |
| marketStatus | string | no | Specify a status to filter results by. This is currently A (active) or S (suspended) |
| marketDisplayed | string | no | Specify whether to return displayed entities or not |
| marketChannel | string | no | Specify a channel filter and only results from that channel will be returned |
| marketSort | string | no | Filter by market sort (e.g. MR (match result) -- (Outright)). |
| marketEW | string | no | Specify whether to return markets with each way betting or those without |
| selectionStatus | string | no | Specify a status to filter results by. This is currently A (active) or S (suspended) |
| selectionChannel | string | no | Specify a channel filter and only results from that channel will be returned |
| selectionPublished | string | no | Specify whether only active entities should be returned, according to the William Hill definition of active |

### Retrieves a specific competition
`GET https://zieapi.vercel.app/v1/entertainment:whapi-sportsdata/get-competition`

| Parameter | Type | Required | Description |
|---|---|---|---|
| apiKey | string | yes | Your API Key available from your developer portal |
| competitionId | string | yes | The competition id to retrieve information for. |
| fields | array | no | Specify an absolute field list to return (Comma-Separated List) |
| include | array | no | Specify fields in addition to the default to return (Comma-Separated List) |
| exclude | array | no | Specify fields from the default to exclude (Comma-Separated List) |
| culture | string | no | Code used to return responses in language other than English, acceptable values are… |

### Retrieves a list of events for a given competition id.
`GET https://zieapi.vercel.app/v1/entertainment:whapi-sportsdata/get-events-for-competition`

| Parameter | Type | Required | Description |
|---|---|---|---|
| apiKey | string | yes | Your API Key available from your developer portal |
| competitionId | string | yes | The competition id to retrieve information for. |
| isPublished | string | no | Specify whether only active entities should be returned, according to the William Hill definition of active |
| fields | array | no | Specify an absolute field list to return (Comma-Separated List) |
| include | array | no | Specify fields in addition to the default to return (Comma-Separated List) |
| exclude | array | no | Specify fields from the default to exclude (Comma-Separated List) |
| displayed | string | no | Specify whether to return displayed entities or not |
| channel | string | no | Specify a channel filter and only results from that channel will be returned |
| settled | boolean | no | Specify wether only settled entities should be returned |
| includeEmpty | boolean | no | When declared as false it should exclude markets and events that have no selections / markets |
| status | string | no | Specify a status to filter results by. This is currently A (active) or S (suspended) |
| sort | string | no | The field to order the response by, followed by the order. For example: name,desc |
| offset | integer | no | Skip over a number of elements by specifying a start value for the query |
| limit | integer | no | Specify the number of results to return |
| headlineSummary | boolean | no | Return only headline markets (Markets with the lowest display order) Either 1 InPlay and 1 Pre-Match, or the amount specified in… |
| includeAllDescendants | boolean | no | Include every descendant in the below heirarchy |
| isInPlay | boolean | no | Show only events that are in-play |
| marketCount | integer | no | Specify the number of markets to return when requesting headlineSummary. This count of InPlay and Pre-Match markets will be returned.For… |
| date | string | no | Return only events for the specified date (yyyy-MM-dd). |
| dateFrom | string | no | The UTC datetime from the events to be returned. (yyyy-MM-ddTHH:mm:ss) |
| dateTo | string | no | The UTC datetime TO the events to be returned. (yyyy-MM-ddTHH:mm:ss) |
| marketGroupId | string | no | Filter by marketGroupId (e.g. OB_MG1276585). |
| eventSort | string | no | Filter event by event sort |
| culture | string | no | Code used to return responses in language other than English, acceptable values are… |
| marketPublished | string | no | Specify whether only active entities should be returned, according to the William Hill definition of active |
| marketStatus | string | no | Specify a status to filter results by. This is currently A (active) or S (suspended) |
| marketDisplayed | string | no | Specify whether to return displayed entities or not |
| marketChannel | string | no | Specify a channel filter and only results from that channel will be returned |
| marketSort | string | no | Filter by market sort (e.g. MR (match result) -- (Outright)). |
| marketEW | string | no | Specify whether to return markets with each way betting or those without |
| selectionStatus | string | no | Specify a status to filter results by. This is currently A (active) or S (suspended) |
| selectionChannel | string | no | Specify a channel filter and only results from that channel will be returned |
| selectionPublished | string | no | Specify whether only active entities should be returned, according to the William Hill definition of active |

### Retrieves a list of market groups for a given competition id
`GET https://zieapi.vercel.app/v1/entertainment:whapi-sportsdata/get-market-groups-for-competition`

| Parameter | Type | Required | Description |
|---|---|---|---|
| apiKey | string | yes | Your API Key available from your developer portal |
| competitionId | string | yes | The competition id to retrieve information for. |
| fields | array | no | Specify an absolute field list to return (Comma-Separated List) |
| include | array | no | Specify fields in addition to the default to return (Comma-Separated List) |
| exclude | array | no | Specify fields from the default to exclude (Comma-Separated List) |
| sort | string | no | The field to order the response by, followed by the order. For example: name,desc |
| offset | integer | no | Skip over a number of elements by specifying a start value for the query |
| limit | integer | no | Specify the number of results to return |
| culture | string | no | Code used to return responses in language other than English, acceptable values are… |
| name | string | no | Filter by market group name |

### Retrieves a list of events/markets/selections where markets within said event match selected sort/groupId
`GET https://zieapi.vercel.app/v1/entertainment:whapi-sportsdata/get-markets-by-group-id`

| Parameter | Type | Required | Description |
|---|---|---|---|
| apiKey | string | yes | Your API Key available from your developer portal |
| competitionId | string | yes | The competition id to retrieve information for. |
| fields | array | no | Specify an absolute field list to return (Comma-Separated List) |
| include | array | no | Specify fields in addition to the default to return (Comma-Separated List) |
| exclude | array | no | Specify fields from the default to exclude (Comma-Separated List) |
| marketSort | string | yes | Filter by market sort (e.g. MR (match result) -- (Outright)). |
| marketGroupId | string | yes | Filter by marketGroupId (e.g. OB_MG1276585). |

### Retrieves a list of events for the provided IDs.
`GET https://zieapi.vercel.app/v1/entertainment:whapi-sportsdata/get-events`

| Parameter | Type | Required | Description |
|---|---|---|---|
| apiKey | string | yes | Your API Key available from your developer portal |
| ids | array | no | A comma-separated list of selectionIds |
| isPublished | string | no | Specify whether only active entities should be returned, according to the William Hill definition of active |
| includeAllDescendants | boolean | no | Include every descendant in the below heirarchy |
| fields | array | no | Specify an absolute field list to return (Comma-Separated List) |
| include | array | no | Specify fields in addition to the default to return (Comma-Separated List) |
| exclude | array | no | Specify fields from the default to exclude (Comma-Separated List) |
| channel | string | no | Specify a channel filter and only results from that channel will be returned |
| settled | boolean | no | Specify wether only settled entities should be returned |
| includeEmpty | boolean | no | When declared as false it should exclude markets and events that have no selections / markets |
| headlineSummary | boolean | no | Return only headline markets (Markets with the lowest display order) Either 1 InPlay and 1 Pre-Match, or the amount specified in… |
| marketCount | integer | no | Specify the number of markets to return when requesting headlineSummary. This count of InPlay and Pre-Match markets will be returned.For… |
| sort | string | no | The field to order the response by, followed by the order. For example: name,desc |
| offset | integer | no | Skip over a number of elements by specifying a start value for the query |
| limit | integer | no | Specify the number of results to return |
| marketIds | array | no | Comma-seaerated list of market IDs to filter by |
| culture | string | no | Code used to return responses in language other than English, acceptable values are… |
| marketPublished | string | no | Specify whether only active entities should be returned, according to the William Hill definition of active |
| marketStatus | string | no | Specify a status to filter results by. This is currently A (active) or S (suspended) |
| marketDisplayed | string | no | Specify whether to return displayed entities or not |
| marketChannel | string | no | Specify a channel filter and only results from that channel will be returned |
| marketSort | string | no | Filter by market sort (e.g. MR (match result) -- (Outright)). |
| marketEW | string | no | Specify whether to return markets with each way betting or those without |
| selectionStatus | string | no | Specify a status to filter results by. This is currently A (active) or S (suspended) |
| selectionChannel | string | no | Specify a channel filter and only results from that channel will be returned |
| selectionPublished | string | no | Specify whether only active entities should be returned, according to the William Hill definition of active |

### Retrieves a single event by ID.
`GET https://zieapi.vercel.app/v1/entertainment:whapi-sportsdata/get-event`

| Parameter | Type | Required | Description |
|---|---|---|---|
| apiKey | string | yes | Your API Key available from your developer portal |
| eventId | string | yes | The event ID to retrieve information for. |
| includeAllDescendants | boolean | no | Include every descendant in the below heirarchy |
| fields | array | no | Specify an absolute field list to return (Comma-Separated List) |
| include | array | no | Specify fields in addition to the default to return (Comma-Separated List) |
| exclude | array | no | Specify fields from the default to exclude (Comma-Separated List) |
| headlineSummary | boolean | no | Return only headline markets (Markets with the lowest display order) Either 1 InPlay and 1 Pre-Match, or the amount specified in… |
| marketCount | integer | no | Specify the number of markets to return when requesting headlineSummary. This count of InPlay and Pre-Match markets will be returned.For… |
| marketIds | array | no | Comma-seaerated list of market IDs to filter by |
| includeEmpty | boolean | no | When declared as false it should exclude markets and events that have no selections / markets |
| culture | string | no | Code used to return responses in language other than English, acceptable values are… |
| marketPublished | string | no | Specify whether only active entities should be returned, according to the William Hill definition of active |
| marketStatus | string | no | Specify a status to filter results by. This is currently A (active) or S (suspended) |
| marketDisplayed | string | no | Specify whether to return displayed entities or not |
| marketChannel | string | no | Specify a channel filter and only results from that channel will be returned |
| marketSort | string | no | Filter by market sort (e.g. MR (match result) -- (Outright)). |
| marketEW | string | no | Specify whether to return markets with each way betting or those without |
| selectionStatus | string | no | Specify a status to filter results by. This is currently A (active) or S (suspended) |
| selectionChannel | string | no | Specify a channel filter and only results from that channel will be returned |
| selectionPublished | string | no | Specify whether only active entities should be returned, according to the William Hill definition of active |

### Retrieves competitors for a single event by ID.
`GET https://zieapi.vercel.app/v1/entertainment:whapi-sportsdata/get-event-competitors`

| Parameter | Type | Required | Description |
|---|---|---|---|
| apiKey | string | yes | Your API Key available from your developer portal |
| eventId | string | yes | The event ID to retrieve information for. |
| fields | array | no | Specify an absolute field list to return (Comma-Separated List) |
| include | array | no | Specify fields in addition to the default to return (Comma-Separated List) |
| exclude | array | no | Specify fields from the default to exclude (Comma-Separated List) |

### Gets one or more specific markets
`GET https://zieapi.vercel.app/v1/entertainment:whapi-sportsdata/get-markets`

| Parameter | Type | Required | Description |
|---|---|---|---|
| apiKey | string | yes | Your API Key available from your developer portal |
| eventId | string | yes | The event ID to retrieve information for. |
| ids | array | no | A comma-separated list of selectionIds |
| includeAllDescendants | boolean | no | Include every descendant in the below heirarchy |
| fields | array | no | Specify an absolute field list to return (Comma-Separated List) |
| include | array | no | Specify fields in addition to the default to return (Comma-Separated List) |
| exclude | array | no | Specify fields from the default to exclude (Comma-Separated List) |
| includeEmpty | boolean | no | When declared as false it should exclude markets and events that have no selections / markets |
| culture | string | no | Code used to return responses in language other than English, acceptable values are… |
| marketPublished | string | no | Specify whether only active entities should be returned, according to the William Hill definition of active |
| marketStatus | string | no | Specify a status to filter results by. This is currently A (active) or S (suspended) |
| marketDisplayed | string | no | Specify whether to return displayed entities or not |
| marketChannel | string | no | Specify a channel filter and only results from that channel will be returned |
| marketSort | string | no | Filter by market sort (e.g. MR (match result) -- (Outright)). |
| marketEW | string | no | Specify whether to return markets with each way betting or those without |
| selectionStatus | string | no | Specify a status to filter results by. This is currently A (active) or S (suspended) |
| selectionChannel | string | no | Specify a channel filter and only results from that channel will be returned |
| selectionPublished | string | no | Specify whether only active entities should be returned, according to the William Hill definition of active |

### Gets one or more selections for a market
`GET https://zieapi.vercel.app/v1/entertainment:whapi-sportsdata/get-selections`

| Parameter | Type | Required | Description |
|---|---|---|---|
| apiKey | string | yes | Your API Key available from your developer portal |
| eventId | string | yes | The event ID to retrieve information for. |
| marketId | string | yes | The market id to retrieve information for |
| ids | array | no | A comma-separated list of selectionIds |
| fields | array | no | Specify an absolute field list to return (Comma-Separated List) |
| include | array | no | Specify fields in addition to the default to return (Comma-Separated List) |
| exclude | array | no | Specify fields from the default to exclude (Comma-Separated List) |
| culture | string | no | Code used to return responses in language other than English, acceptable values are… |
| selectionStatus | string | no | Specify a status to filter results by. This is currently A (active) or S (suspended) |
| selectionChannel | string | no | Specify a channel filter and only results from that channel will be returned |
| selectionPublished | string | no | Specify whether only active entities should be returned, according to the William Hill definition of active |

### Gets a list of all sports
`GET https://zieapi.vercel.app/v1/entertainment:whapi-sportsdata/get-sports`

| Parameter | Type | Required | Description |
|---|---|---|---|
| apiKey | string | yes | Your API Key available from your developer portal |
| sort | string | no | The field to order the response by, followed by the order. For example: name,desc |
| offset | integer | no | Skip over a number of elements by specifying a start value for the query |
| isPublished | string | no | Specify whether only active entities should be returned, according to the William Hill definition of active |
| limit | integer | no | Specify the number of results to return |
| fields | array | no | Specify an absolute field list to return (Comma-Separated List) |
| include | array | no | Specify fields in addition to the default to return (Comma-Separated List) |
| exclude | array | no | Specify fields from the default to exclude (Comma-Separated List) |
| culture | string | no | Code used to return responses in language other than English, acceptable values are… |

### Retrieves a list of classes for a given sport id.
`GET https://zieapi.vercel.app/v1/entertainment:whapi-sportsdata/get-classes-for-sport`

| Parameter | Type | Required | Description |
|---|---|---|---|
| apiKey | string | yes | Your API Key available from your developer portal |
| sportId | string | yes | The sport id to retrieve information for. |
| isPublished | string | no | Specify whether only active entities should be returned, according to the William Hill definition of active |
| fields | array | no | Specify an absolute field list to return (Comma-Separated List) |
| include | array | no | Specify fields in addition to the default to return (Comma-Separated List) |
| exclude | array | no | Specify fields from the default to exclude (Comma-Separated List) |
| displayed | string | no | Specify whether to return displayed entities or not |
| channel | string | no | Specify a channel filter and only results from that channel will be returned |
| status | string | no | Specify a status to filter results by. This is currently A (active) or S (suspended) |
| sort | string | no | The field to order the response by, followed by the order. For example: name,desc |
| offset | integer | no | Skip over a number of elements by specifying a start value for the query |
| limit | integer | no | Specify the number of results to return |
| culture | string | no | Code used to return responses in language other than English, acceptable values are… |

### Retrieves a list of competitions for a given sport id.
`GET https://zieapi.vercel.app/v1/entertainment:whapi-sportsdata/get-competitions-for-sport`

| Parameter | Type | Required | Description |
|---|---|---|---|
| apiKey | string | yes | Your API Key available from your developer portal |
| sportId | string | yes | The sport id to retrieve information for. |
| isPublished | string | no | Specify whether only active entities should be returned, according to the William Hill definition of active |
| fields | array | no | Specify an absolute field list to return (Comma-Separated List) |
| include | array | no | Specify fields in addition to the default to return (Comma-Separated List) |
| exclude | array | no | Specify fields from the default to exclude (Comma-Separated List) |
| displayed | string | no | Specify whether to return displayed entities or not |
| channel | string | no | Specify a channel filter and only results from that channel will be returned |
| status | string | no | Specify a status to filter results by. This is currently A (active) or S (suspended) |
| sort | string | no | The field to order the response by, followed by the order. For example: name,desc |
| offset | integer | no | Skip over a number of elements by specifying a start value for the query |
| limit | integer | no | Specify the number of results to return |
| culture | string | no | Code used to return responses in language other than English, acceptable values are… |

### Retrieves a weighted list of Selections.
`GET https://zieapi.vercel.app/v1/entertainment:whapi-sportsdata/get-top-bets`

| Parameter | Type | Required | Description |
|---|---|---|---|
| apiKey | string | yes | Your API Key available from your developer portal |
| sportIds | array | no | A comma-separated list of sportsIds for which to retrieve topBets for |
| competitionIds | array | no | A comma-separated list of competitionIds for which to retrieve topBets for |
| limit | integer | no | Specify the number of results to return |
| fields | array | no | Specify an absolute field list to return (Comma-Separated List) |
| include | array | no | Specify fields in addition to the default to return (Comma-Separated List) |
| exclude | array | no | Specify fields from the default to exclude (Comma-Separated List) |
| param_topBetEventId | string | no | The event ID to retrieve top bet information for. Multiple events up to 5 may be used |
| sortName | string | no | The market sort code used to further filter event results. Please note this can only be used with event id(s). |
| culture | string | no | Code used to return responses in language other than English, acceptable values are… |
| Locale | string | no | Code used to select a set of top bets settings, default is "whapi" which allows events set in far future to be included, setting the value… |

## Example
```
curl "https://zieapi.vercel.app/v1/entertainment:whapi-sportsdata/get-competitions-for-class" \
  -H "x-api-key: $APIZIE_KEY"
```

## FAQ

### How do I call the SportsData API API?
Create a free Apizie key, then send GET https://zieapi.vercel.app/v1/entertainment:whapi-sportsdata/get-competitions-for-class with the header x-api-key. Every endpoint returns { project, data, timestamp }.

### Is the SportsData API API free on Apizie?
Yes. The Free plan includes 1,000 requests a month at 100 requests a minute, no credit card.

### Can AI agents use the SportsData API API?
Yes. Add the Apizie MCP server (https://zieapi.vercel.app/mcp) to Claude, ChatGPT, Cursor or VS Code, then ask in plain language. The agent calls run_scraper with project key entertainment:whapi-sportsdata.

### What is the status of the SportsData API API?
Live: works with just an Apizie key
