FORMAT: 1A HOST: https://app.oddsapi.com/api # OddsAPI Welcome to OddsAPI! You can view code examples in the dark area to the right. # Authentication > To authorize, you can use the following ways: ```shell curl "https://app.oddsapi.io/api/v1/odds" -H "apikey: APIKEY" ``` ```shell curl "https://app.oddsapi.io/api/v1/odds?apikey=APIKEY" ``` ```shell curl "https://app.oddsapi.io/api/v1/odds" -F "apikey=APIKEY" ``` OddsAPI uses API keys to allow access to the API. You can register a new API key at our [developer portal](https://app.oddsapi.io/register). OddsAPI looks for the API key in a header that looks like the following (recommended, works with all requests): `apikey: APIKEY` For GET requests you can also use a URL parameter: ex. `https://app.oddsapi.io/api/v1/odds?apikey=APIKEY` For POST requests you can also use a form field: `apikey=APIKEY` ## Odds API [/] ### Status [GET /v1/status] + Response 200 (application/json) { "remaining_requests": 1500 } ### Leagues [GET /v1/leagues] # Responses Key | Description --------- | ----------- key | (string) used to query name | (string) country_key | (string) used to query country | (string) sport_key | (string) used to query sport | (string) + Response 200 (application/json) [ { "key": "soccer-england-premier-league", "name": "Premier League", "country_key": "england", "country": "England", "sport_key": "soccer", "sport": "Soccer" } ] ### Odds [GET /v1/odds] To filter the odds there are three different filters available: Key | Description --------- | ----------- sport | (string) Use the value from /leagues "sport_key", i.e "soccer" league | (string) Use the value from /leagues "key", i.e "soccer-england-premier-league" country | (string) Use the value from /leagues "country_key", i.e "england" These values can be used in combination. Get "soccer" games in England: GET /api/v1/odds?country=england&sport=soccer Get Premier League odds: GET /api/v1/odds?league=soccer-england-premier-league # Responses ## Event Key | Description --------- | ----------- away | (string) home | (string) start_time | (string) ISO 8601 datetime ## Sport Key | Description --------- | ----------- key | (string) name | (string) ## League Key | Description --------- | ----------- key | (string) name | (string) ## Sites ### Bet Types The available betting types: * 1x2 * home-away * asian-handicap * over-under * draw-no-bet * european-handicap * double-chance * to-qualify * correct-score * half-time-full-time * odd-or-even * both-teams-to-score # Errors The API uses the following error codes: HTTP Error Code | Meaning ---------- | ------- 403 | Forbidden -- API key is wrong, you don't have enough requests or you don't have enough rights to access it. 404 | Not Found -- There were no results found. 500 | Internal Server Error -- See below. The API returns errors in this template: ```json { "errors": [{ .... }] } ``` + Response 200 (application/json) [ { "event": { "away": "Celtic", "home": "Motherwell", "start_time": "2019-08-10T11:00:00+00:00" }, "sites": { [...] } "sport": { "key": "soccer", "name": "Soccer" }, "league": { "key": "premiership", "name": "Premiership" } } ]