Odds Comparison v1

Frequently Asked Questions
API API Version
Odds Comparison v1
Note: Authentication is required for all API calls.
## Odds Comparison API Map To best utilize the Odds Comparison API, you will need several parameters to create your API calls. The map below illustrates how you can obtain the parameters you need. >

Examples:

>To find the Category Outright odds for Estonia: >
  1. Call the Categories endpoint and find Estonia
  2. Take note of the "category - id"
  3. Call the Category Outrights endpoint using the category id.
>The outright odds for Estonia are displayed. >
    >To find the schedule for Golf: >
    1. Call the Sports endpoint and find Golf
    2. Take note of the "sport - id"
    3. Call the Daily Sport Schedule endpoint using the sport id and desired date.
    >The schedule for Golf is displayed. Primary feeds don't require any parameters, while other feeds may require dates, IDs or other human-readable parameters to identify the category, sport, sport event or tournament that the feed will describe. The primary feeds provide IDs for categories, sports and tournaments. Note that unix_timestamp (used in Sport Event Change Log) is not human readable parameter. Mapping feeds provide a list of IDs for players, seasons, sport events, teams, tournaments, and venues which are mapped between US IDs and Sportradar IDs. The mapping feeds have a limit of 30,000 results per page. To get additional results you need to use the optional query string parameters “start” and “limit” which are detailed in the affected feeds below. ## Bookmaker Deep Linking ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://dt.sportradar.com/?label.0=environment:desktop&label.1=country:global&label.2=entry:betslip&label.3=stake:custom&bookmaker=176&oddstype=2&oddsfield=5&match=13497317&ref={referrer_id}&stake=100") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) response = http.request(request) puts response.read_body ``` ```python import http.client conn = http.client.HTTPSConnection("dt.sportradar.com") conn.request("GET", "/?label.0=environment:desktop&label.1=country:global&label.2=entry:betslip&label.3=stake:custom&bookmaker=176&oddstype=2&oddsfield=5&match=13497317&ref={referrer_id}&stake=100") res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ```shell curl -X GET "https://dt.sportradar.com/?label.0=environment:desktop&label.1=country:global&label.2=entry:betslip&label.3=stake:custom&bookmaker=176&oddstype=2&oddsfield=5&match=13497317&ref={referrer_id}&stake=100" ``` This endpoint is used to construct links to Bookmakers. https://dt.sportradar.com/?label.0=environment:`{environment_type}`&label.1=country:`{country_name}`&label.2=entry:`{entry_type}`&label.3=stake:`{stake_type}`&bookmaker=`{bookmaker_id}`&oddstypeid=`{odds_type_id}`&oddsfieldid=`{odds_field_id}`&ref=`{referrer_id}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `environment_type` | Display type for the destination environment: desktop, mobile, or flex. | | `country_name` | Country name or region: global, australia, brazil, …. (full list to be entered later.) | | `entry_type` | Type of entry: betslip, match, sport, or home. | | `stake_type` | Type of stake: default, or custom. | | `bookmaker_id` | Id of a given bookmaker in integer format. Example: bookmaker=176 | | `odds_type_id` | Id of a given odds type in integer format. Example: oddstypeid=2 | | `odds_field_id` | Id of a given odds field in integer format. Example: oddsfieldid=5 | | `referrer_id` | Your referrer id for the given bookmaker. Example: referrerid=123456 | | `stake` | Stake in integer format. Only required when stake_type is custom. Example: stake=100 | ## Bookmaker Link Patterns ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/oddscomparison-rowt1/en/us/bookmakers/link_patterns.xml?api_key={your_api_key}") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) response = http.request(request) puts response.read_body ``` ```python import http.client conn = http.client.HTTPSConnection("api.sportradar.us") conn.request("GET", "/oddscomparison-rowt1/en/us/bookmakers/link_patterns.xml?api_key={your_api_key}") res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ```shell curl -X GET "https://api.sportradar.com/oddscomparison-rowt1/en/us/bookmakers/link_patterns.xml?api_key={your_api_key}" ``` This endpoint retrieves groups of labels required to build links to Bookmakers. https://api.sportradar.us/oddscomparison-`{package}{access_level}{version}`/`{language_code}`/`{odds_format}`/bookmakers/link_patterns.`{format}`?api_key=`{your_api_key}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `package` | Defines the package you are accessing as US (us) or Rest of World (row). | | `access_level` | Defines the access level of your API key as Production (p) or Trial (t). | | `version` | Version number of the API you are accessing (Current Version: 1). | | `language_code` | Supported Locales | | `odds_format` | Odds type in 2 letter format: American (us), Fractional (uk), or Decimal (eu). | | `format` | xml or json. | | `your_api_key` | Your API key. | To retrieve the XML Schema Definition (.XSD) for the Bookmakers Link Patterns use the following URL. http://schemas.sportradar.com/bsa/v1/endpoints/oddscomparison/bookmaker_link_patterns.xsd ## Books ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/oddscomparison-rowt1/en/us/books.xml?api_key={your_api_key}") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) response = http.request(request) puts response.read_body ``` ```python import http.client conn = http.client.HTTPSConnection("api.sportradar.us") conn.request("GET", "/oddscomparison-rowt1/en/us/books.xml?api_key={your_api_key}") res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ```shell curl -X GET "https://api.sportradar.com/oddscomparison-rowt1/en/us/books.xml?api_key={your_api_key}" ``` This endpoint retrieves the list of Bookmakers. https://api.sportradar.us/oddscomparison-`{package}{access_level}{version}`/`{language_code}`/`{odds_format}`/books.`{format}`?api_key=`{your_api_key}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `package` | Defines the package you are accessing as US (us) or Rest of World (row). | | `access_level` | Defines the access level of your API key as Production (p) or Trial (t). | | `version` | Version number of the API you are accessing (Current Version: 1). | | `language_code` | Supported Locales | | `odds_format` | Odds type in 2 letter format: American (us), Fractional (uk), or Decimal (eu). | | `format` | xml or json. | | `your_api_key` | Your API key. | To retrieve the XML Schema Definition (.XSD) for the Books use the following URL. http://schemas.sportradar.com/bsa/v1/endpoints/oddscomparison/books.xsd ## Categories ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/oddscomparison-rowt1/en/us/categories.xml?api_key={your_api_key}") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) response = http.request(request) puts response.read_body ``` ```python import http.client conn = http.client.HTTPSConnection("api.sportradar.us") conn.request("GET", "/oddscomparison-rowt1/en/us/categories.xml?api_key={your_api_key}") res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ```shell curl -X GET "https://api.sportradar.com/oddscomparison-rowt1/en/us/categories.xml?api_key={your_api_key}" ``` This endpoint retrieves the list of Categories. https://api.sportradar.us/oddscomparison-`{package}{access_level}{version}`/`{language_code}`/`{odds_format}`/categories.`{format}`?api_key=`{your_api_key}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `package` | Defines the package you are accessing as US (us) or Rest of World (row). | | `access_level` | Defines the access level of your API key as Production (p) or Trial (t). | | `version` | Version number of the API you are accessing (Current Version: 1). | | `language_code` | Supported Locales | | `odds_format` | Odds type in 2 letter format: American (us), Fractional (uk), or Decimal (eu). | | `format` | xml or json. | | `your_api_key` | Your API key. | To retrieve the XML Schema Definition (.XSD) for the Categories use the following URL. http://schemas.sportradar.com/bsa/v1/endpoints/oddscomparison/categories.xsd ## Category Outrights ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/oddscomparison-rowt1/en/us/categories/sr:category:73/outrights.xml?api_key={your_api_key}") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) response = http.request(request) puts response.read_body ``` ```python import http.client conn = http.client.HTTPSConnection("api.sportradar.us") conn.request("GET", "/oddscomparison-rowt1/en/us/categories/sr:category:73/outrights.xml?api_key={your_api_key}") res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ```shell curl -X GET "https://api.sportradar.com/oddscomparison-rowt1/en/us/categories/sr:category:73/outrights.xml?api_key={your_api_key}" ``` This endpoint retrieves the Outrights by Category. https://api.sportradar.us/oddscomparison-`{package}{access_level}{version}`/`{language_code}`/`{odds_format}`/categories/`{category_id}`/outrights.`{format}`?api_key=`{your_api_key}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `package` | Defines the package you are accessing as US (us) or Rest of World (row). | | `access_level` | Defines the access level of your API key as Production (p) or Trial (t). | | `version` | Version number of the API you are accessing (Current Version: 1). | | `language_code` | Supported Locales | | `odds_format` | Odds type in 2 letter format: American (us), Fractional (uk), or Decimal (eu). | | `category_id` | ID of a given category. | | `format` | xml or json. | | `your_api_key` | Your API key. | To retrieve the XML Schema Definition (.XSD) for the Outrights by Category use the following URL. http://schemas.sportradar.com/bsa/v1/endpoints/oddscomparison/category_outrights.xsd ## Daily Sport Schedule ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/oddscomparison-rowt1/en/us/sports/sr:sport:1/2017-06-30/schedule.xml?api_key={your_api_key}") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) response = http.request(request) puts response.read_body ``` ```python import http.client conn = http.client.HTTPSConnection("api.sportradar.us") conn.request("GET", "/oddscomparison-rowt1/en/us/sports/sr:sport:1/2017-06-30/schedule.xml?api_key={your_api_key}") res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ```shell curl -X GET "https://api.sportradar.com/oddscomparison-rowt1/en/us/sports/sr:sport:1/2017-06-30/schedule.xml?api_key={your_api_key}" ``` This endpoint retrieves the Daily Sport Schedule. https://api.sportradar.us/oddscomparison-`{package}{access_level}{version}`/`{language_code}`/`{odds_format}`/sports/`{sport_id}`/`{date}`/schedule.`{format}`?api_key=`{your_api_key}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `package` | Defines the package you are accessing as US (us) or Rest of World (row). | | `access_level` | Defines the access level of your API key as Production (p) or Trial (t). | | `version` | Version number of the API you are accessing (Current Version: 1). | | `language_code` | Supported Locales | | `odds_format` | Odds type in 2 letter format: American (us), Fractional (uk), or Decimal (eu). | | `sport_id` | ID of a given sport. | | `date` | Date in the following format: YYYY-MM-DD | | `format` | xml or json. | | `your_api_key` | Your API key. | To retrieve the XML Schema Definition (.XSD) for the Daily Sport Schedule use the following URL. http://schemas.sportradar.com/bsa/v1/endpoints/oddscomparison/sport_schedule.xsd ## Player Mapping ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/oddscomparison-rowt1/en/eu/players/id_mappings.xml?api_key={your_api_key}") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) response = http.request(request) puts response.read_body ``` ```python import http.client conn = http.client.HTTPSConnection("api.sportradar.us") conn.request("GET", "/oddscomparison-rowt1/en/eu/players/id_mappings.xml?api_key={your_api_key}") res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ```shell curl -X GET "https://api.sportradar.com/oddscomparison-rowt1/en/eu/players/id_mappings.xml?api_key={your_api_key}" ``` This endpoint retrieves Player Mapping information. https://api.sportradar.us/oddscomparison-`{package}{access_level}{version}`/`{language_code}`/`{odds_format}`/players/id_mappings.`{format}`?api_key=`{your_api_key}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `package` | Defines the package you are accessing as US (us) or Rest of World (row). | | `access_level` | Defines the access level of your API key as Production (p) or Trial (t). | | `version` | Version number of the API you are accessing (Current Version: 1). | | `language_code` | Supported Locales | | `odds_format` | Odds type in 2 letter format: American (us), Fractional (uk), or Decimal (eu). | | `format` | xml or json. | | `your_api_key` | Your API key. | ### Optional Query String Parameters >Example including optional query string parameters: ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("http://api.sportradar.us/oddscomparison-rowt1/en/eu/players/id_mappings.xml?api_key={your_api_key}&start=0&limit=30000") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) response = http.request(request) puts response.read_body ``` ```python import http.client conn = http.client.HTTPSConnection("api.sportradar.us") conn.request("GET", "/oddscomparison-rowt1/en/eu/players/id_mappings.xml?api_key={your_api_key}&start=0&limit=30000") res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ```shell curl -L GET 'api.sportradar.us/oddscomparison-rowt1/en/eu/players/id_mappings.xml?api_key={your_api_key}&start=0&limit=30000' ``` In addition to the URL parameters listed above, you can paginate the player information with one or more of the following optional query string parameters.
    Note: Optional query string parameters must be added after your API key with an ampersand (&).
    Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `start` | Number to start the list of results from.
    Example: start=0 | | `limit` | Number to limit the number of results. Minimum value is 1, maximum value is 30000.
    Example: limit=30000 | ## Season Mapping ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/oddscomparison-rowt1/en/eu/seasons/id_mappings.xml?api_key={your_api_key}") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) response = http.request(request) puts response.read_body ``` ```python import http.client conn = http.client.HTTPSConnection("api.sportradar.us") conn.request("GET", "/oddscomparison-rowt1/en/eu/seasons/id_mappings.xml?api_key={your_api_key}") res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ```shell curl -X GET "https://api.sportradar.com/oddscomparison-rowt1/en/eu/seasons/id_mappings.xml?api_key={your_api_key}" ``` This endpoint retrieves Season Mapping information. https://api.sportradar.us/oddscomparison-`{package}{access_level}{version}`/`{language_code}`/`{odds_format}`/seasons/id_mappings.`{format}`?api_key=`{your_api_key}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `package` | Defines the package you are accessing as US (us) or Rest of World (row). | | `access_level` | Defines the access level of your API key as Production (p) or Trial (t). | | `version` | Version number of the API you are accessing (Current Version: 1). | | `language_code` | Supported Locales | | `odds_format` | Odds type in 2 letter format: American (us), Fractional (uk), or Decimal (eu). | | `format` | xml or json. | | `your_api_key` | Your API key. | ## Sport Categories ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/oddscomparison-rowt1/en/us/sports/sr:sport:1/categories.xml?api_key={your_api_key}") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) response = http.request(request) puts response.read_body ``` ```python import http.client conn = http.client.HTTPSConnection("api.sportradar.us") conn.request("GET", "/oddscomparison-rowt1/en/us/sports/sr:sport:1/categories.xml?api_key={your_api_key}") res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ```shell curl -X GET "https://api.sportradar.com/oddscomparison-rowt1/en/us/sports/sr:sport:1/categories.xml?api_key={your_api_key}" ``` This endpoint retrieves the Categories by Sport. https://api.sportradar.us/oddscomparison-`{package}{access_level}{version}`/`{language_code}`/`{odds_format}`/sports/`{sport_id}`/categories.`{format}`?api_key=`{your_api_key}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `package` | Defines the package you are accessing as US (us) or Rest of World (row). | | `access_level` | Defines the access level of your API key as Production (p) or Trial (t). | | `version` | Version number of the API you are accessing (Current Version: 1). | | `language_code` | Supported Locales | | `odds_format` | Odds type in 2 letter format: American (us), Fractional (uk), or Decimal (eu). | | `sport_id` | ID of a given sport. | | `format` | xml or json. | | `your_api_key` | Your API key. | To retrieve the XML Schema Definition (.XSD) for the Sport Categories use the following URL. http://schemas.sportradar.com/bsa/v1/endpoints/oddscomparison/sport_categories.xsd ## Sport Event Change Log ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/oddscomparison-rowt1/en/us/sport_events/1498814700/changelog.xml?api_key={your_api_key}") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) response = http.request(request) puts response.read_body ``` ```python import http.client conn = http.client.HTTPSConnection("api.sportradar.us") conn.request("GET", "/oddscomparison-rowt1/en/us/sport_events/1498814700/changelog.xml?api_key={your_api_key}") res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ```shell curl -X GET "https://api.sportradar.com/oddscomparison-rowt1/en/us/sport_events/1498814700/changelog.xml?api_key={your_api_key}" ``` This endpoint retrieves the Sport Event Change Log. https://api.sportradar.us/oddscomparison-`{package}{access_level}{version}`/`{language_code}`/`{odds_format}`/sport_events/`{unix_timestamp}`/changelog.`{format}`?api_key=`{your_api_key}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `package` | Defines the package you are accessing as US (us) or Rest of World (row). | | `access_level` | Defines the access level of your API key as Production (p) or Trial (t). | | `version` | Version number of the API you are accessing (Current Version: 1). | | `language_code` | Supported Locales | | `odds_format` | Odds type in 2 letter format: American (us), Fractional (uk), or Decimal (eu). | | `unix_timestamp` | Unix epoch time. | | `format` | xml or json. | | `your_api_key` | Your API key. | To retrieve the XML Schema Definition (.XSD) for the Sport Event Change Log use the following URL. http://schemas.sportradar.com/bsa/v1/endpoints/oddscomparison/sport_events_changelog.xsd ## Sport Event Mapping ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/oddscomparison-rowt1/en/eu/sport_events/id_mappings.xml?api_key={your_api_key}") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) response = http.request(request) puts response.read_body ``` ```python import http.client conn = http.client.HTTPSConnection("api.sportradar.us") conn.request("GET", "/oddscomparison-rowt1/en/eu/sport_events/id_mappings.xml?api_key={your_api_key}") res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ```shell curl -X GET "https://api.sportradar.com/oddscomparison-rowt1/en/eu/sport_events/id_mappings.xml?api_key={your_api_key}" ``` This endpoint retrieves Sport Event Mapping information. https://api.sportradar.us/oddscomparison-`{package}{access_level}{version}`/`{language_code}`/`{odds_format}`/sport_events/id_mappings.`{format}`?api_key=`{your_api_key}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `package` | Defines the package you are accessing as US (us) or Rest of World (row). | | `access_level` | Defines the access level of your API key as Production (p) or Trial (t). | | `version` | Version number of the API you are accessing (Current Version: 1). | | `language_code` | Supported Locales | | `odds_format` | Odds type in 2 letter format: American (us), Fractional (uk), or Decimal (eu). | | `format` | xml or json. | | `your_api_key` | Your API key. | ### Optional Query String Parameters >Example including optional query string parameters: ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("http://api.sportradar.us/oddscomparison-rowt1/en/eu/sport_events/id_mappings.xml?api_key={your_api_key}&start=0&limit=30000") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) response = http.request(request) puts response.read_body ``` ```python import http.client conn = http.client.HTTPSConnection("api.sportradar.us") conn.request("GET", "/oddscomparison-rowt1/en/eu/sport_events/id_mappings.xml?api_key={your_api_key}&start=0&limit=30000") res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ```shell curl -L GET 'api.sportradar.us/oddscomparison-rowt1/en/eu/sport_events/id_mappings.xml?api_key={your_api_key}&start=0&limit=30000' ``` In addition to the URL parameters listed above, you can paginate the sport event information with one or more of the following optional query string parameters.
    Note: Optional query string parameters must be added after your API key with an ampersand (&).
    Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `start` | Number to start the list of results from.
    Example: start=0 | | `limit` | Number to limit the number of results. Minimum value is 1, maximum value is 30000.
    Example: limit=30000 | ## Sport Event Markets ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/oddscomparison-rowt1/en/us/sport_events/sr:match:10151323/markets.xml?api_key={your_api_key}") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) response = http.request(request) puts response.read_body ``` ```python import http.client conn = http.client.HTTPSConnection("api.sportradar.us") conn.request("GET", "/oddscomparison-rowt1/en/us/sport_events/sr:match:10151323/markets.xml?api_key={your_api_key}") res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ```shell curl -X GET "https://api.sportradar.com/oddscomparison-rowt1/en/us/sport_events/sr:match:10151323/markets.xml?api_key={your_api_key}" ``` This endpoint retrieves the Sport Event Markets. https://api.sportradar.us/oddscomparison-`{package}{access_level}{version}`/`{language_code}`/`{odds_format}`/sport_events/`{sport_event_id}`/markets.`{format}`?api_key=`{your_api_key}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `package` | Defines the package you are accessing as US (us) or Rest of World (row). | | `access_level` | Defines the access level of your API key as Production (p) or Trial (t). | | `version` | Version number of the API you are accessing (Current Version: 1). | | `language_code` | Supported Locales | | `odds_format` | Odds type in 2 letter format: American (us), Fractional (uk), or Decimal (eu). | | `sport_event_id` | ID of a given sport event. | | `format` | xml or json. | | `your_api_key` | Your API key. | To retrieve the XML Schema Definition (.XSD) for the Sport Event Markets use the following URL. http://schemas.sportradar.com/bsa/v1/endpoints/oddscomparison/sport_event_markets.xsd ## Sport Tournaments ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/oddscomparison-rowt1/en/us/sports/sr:sport:6/tournaments.xml?api_key={your_api_key}") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) response = http.request(request) puts response.read_body ``` ```python import http.client conn = http.client.HTTPSConnection("api.sportradar.us") conn.request("GET", "/oddscomparison-rowt1/en/us/sports/sr:sport:6/tournaments.xml?api_key={your_api_key}") res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ```shell curl -X GET "https://api.sportradar.com/oddscomparison-rowt1/en/us/sports/sr:sport:6/tournaments.xml?api_key={your_api_key}" ``` This endpoint retrieves the Tournaments by Sport. https://api.sportradar.us/oddscomparison-`{package}{access_level}{version}`/`{language_code}`/`{odds_format}`/sports/`{sport_id}`/tournaments.`{format}`?api_key=`{your_api_key}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `package` | Defines the package you are accessing as US (us) or Rest of World (row). | | `access_level` | Defines the access level of your API key as Production (p) or Trial (t). | | `version` | Version number of the API you are accessing (Current Version: 1). | | `language_code` | Supported Locales | | `odds_format` | Odds type in 2 letter format: American (us), Fractional (uk), or Decimal (eu). | | `sport_id` | ID of a given sport. | | `format` | xml or json. | | `your_api_key` | Your API key. | To retrieve the XML Schema Definition (.XSD) for Tournaments by Sport use the following URL. http://schemas.sportradar.com/bsa/v1/endpoints/oddscomparison/sport_tournaments.xsd ## Sports ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/oddscomparison-rowt1/en/us/sports.xml?api_key={your_api_key}") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) response = http.request(request) puts response.read_body ``` ```python import http.client conn = http.client.HTTPSConnection("api.sportradar.us") conn.request("GET", "/oddscomparison-rowt1/en/us/sports.xml?api_key={your_api_key}") res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ```shell curl -X GET "https://api.sportradar.com/oddscomparison-rowt1/en/us/sports.xml?api_key={your_api_key}" ``` This endpoint retrieves the list of Sports. https://api.sportradar.us/oddscomparison-`{package}{access_level}{version}`/`{language_code}`/`{odds_format}`/sports.`{format}`?api_key=`{your_api_key}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `package` | Defines the package you are accessing as US (us) or Rest of World (row). | | `access_level` | Defines the access level of your API key as Production (p) or Trial (t). | | `version` | Version number of the API you are accessing (Current Version: 1). | | `language_code` | Supported Locales | | `odds_format` | Odds type in 2 letter format: American (us), Fractional (uk), or Decimal (eu). | | `format` | xml or json. | | `your_api_key` | Your API key. | To retrieve the XML Schema Definition (.XSD) for Sports use the following URL. http://schemas.sportradar.com/bsa/v1/endpoints/oddscomparison/sports.xsd ## Team Mapping ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/oddscomparison-rowt1/en/eu/teams/id_mappings.xml?api_key={your_api_key}") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) response = http.request(request) puts response.read_body ``` ```python import http.client conn = http.client.HTTPSConnection("api.sportradar.us") conn.request("GET", "/oddscomparison-rowt1/en/eu/teams/id_mappings.xml?api_key={your_api_key}") res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ```shell curl -X GET "https://api.sportradar.com/oddscomparison-rowt1/en/eu/teams/id_mappings.xml?api_key={your_api_key}" ``` This endpoint retrieves Team Mapping information. https://api.sportradar.us/oddscomparison-`{package}{access_level}{version}`/`{language_code}`/`{odds_format}`/teams/id_mappings.`{format}`?api_key=`{your_api_key}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `package` | Defines the package you are accessing as US (us) or Rest of World (row). | | `access_level` | Defines the access level of your API key as Production (p) or Trial (t). | | `version` | Version number of the API you are accessing (Current Version: 1). | | `language_code` | Supported Locales | | `odds_format` | Odds type in 2 letter format: American (us), Fractional (uk), or Decimal (eu). | | `format` | xml or json. | | `your_api_key` | Your API key. | ## Tournament Mapping ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/oddscomparison-rowt1/en/eu/tournaments/id_mappings.xml?api_key={your_api_key}") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) response = http.request(request) puts response.read_body ``` ```python import http.client conn = http.client.HTTPSConnection("api.sportradar.us") conn.request("GET", "/oddscomparison-rowt1/en/eu/tournaments/id_mappings.xml?api_key={your_api_key}") res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ```shell curl -X GET "https://api.sportradar.com/oddscomparison-rowt1/en/eu/tournaments/id_mappings.xml?api_key={your_api_key}" ``` This endpoint retrieves Tournament Mapping information. https://api.sportradar.us/oddscomparison-`{package}{access_level}{version}`/`{language_code}`/`{odds_format}`/tournaments/id_mappings.`{format}`?api_key=`{your_api_key}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `package` | Defines the package you are accessing as US (us) or Rest of World (row). | | `access_level` | Defines the access level of your API key as Production (p) or Trial (t). | | `version` | Version number of the API you are accessing (Current Version: 1). | | `language_code` | Supported Locales | | `odds_format` | Odds type in 2 letter format: American (us), Fractional (uk), or Decimal (eu). | | `format` | xml or json. | | `your_api_key` | Your API key. | ## Tournament Schedule ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/oddscomparison-rowt1/en/us/tournaments/sr:tournament:234/schedule.xml?api_key={your_api_key}") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) response = http.request(request) puts response.read_body ``` ```python import http.client conn = http.client.HTTPSConnection("api.sportradar.us") conn.request("GET", "/oddscomparison-rowt1/en/us/tournaments/sr:tournament:234/schedule.xml?api_key={your_api_key}") res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ```shell curl -X GET "https://api.sportradar.com/oddscomparison-rowt1/en/us/tournaments/sr:tournament:234/schedule.xml?api_key={your_api_key}" ``` This endpoint retrieves the Tournament Schedule. https://api.sportradar.us/oddscomparison-`{package}{access_level}{version}`/`{language_code}`/`{odds_format}`/tournaments/`{tournament_id}`/schedule.`{format}`?api_key=`{your_api_key}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `package` | Defines the package you are accessing as US (us) or Rest of World (row). | | `access_level` | Defines the access level of your API key as Production (p) or Trial (t). | | `version` | Version number of the API you are accessing (Current Version: 1). | | `language_code` | Supported Locales | | `odds_format` | Odds type in 2 letter format: American (us), Fractional (uk), or Decimal (eu). | | `tournament_id` | ID of a given tournament. | | `format` | xml or json. | | `your_api_key` | Your API key. | To retrieve the XML Schema Definition (.XSD) for the Tournament Schedule use the following URL. http://schemas.sportradar.com/bsa/v1/endpoints/oddscomparison/tournament_schedule.xsd ## Tournaments ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/oddscomparison-rowt1/en/us/tournaments.xml?api_key={your_api_key}") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) response = http.request(request) puts response.read_body ``` ```python import http.client conn = http.client.HTTPSConnection("api.sportradar.us") conn.request("GET", "/oddscomparison-rowt1/en/us/tournaments.xml?api_key={your_api_key}") res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ```shell curl -X GET "https://api.sportradar.com/oddscomparison-rowt1/en/us/tournaments.xml?api_key={your_api_key}" ``` This endpoint retrieves the list of Tournaments. https://api.sportradar.us/oddscomparison-`{package}{access_level}{version}`/`{language_code}`/`{odds_format}`/tournaments.`{format}`?api_key=`{your_api_key}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `package` | Defines the package you are accessing as US (us) or Rest of World (row). | | `access_level` | Defines the access level of your API key as Production (p) or Trial (t). | | `version` | Version number of the API you are accessing (Current Version: 1). | | `language_code` | Supported Locales | | `odds_format` | Odds type in 2 letter format: American (us), Fractional (uk), or Decimal (eu). | | `format` | xml or json. | | `your_api_key` | Your API key. | To retrieve the XML Schema Definition (.XSD) for Tournaments use the following URL. http://schemas.sportradar.com/bsa/v1/endpoints/oddscomparison/tournaments.xsd ## Venue Mapping ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/oddscomparison-rowt1/en/eu/venues/id_mappings.xml?api_key={your_api_key}") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) response = http.request(request) puts response.read_body ``` ```python import http.client conn = http.client.HTTPSConnection("api.sportradar.us") conn.request("GET", "/oddscomparison-rowt1/en/eu/venues/id_mappings.xml?api_key={your_api_key}") res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ```shell curl -X GET "https://api.sportradar.com/oddscomparison-rowt1/en/eu/venues/id_mappings.xml?api_key={your_api_key}" ``` This endpoint retrieves Venue Mapping information. https://api.sportradar.us/oddscomparison-`{package}{access_level}{version}`/`{language_code}`/`{odds_format}`/venues/id_mappings.`{format}`?api_key=`{your_api_key}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `package` | Defines the package you are accessing as US (us) or Rest of World (row). | | `access_level` | Defines the access level of your API key as Production (p) or Trial (t). | | `version` | Version number of the API you are accessing (Current Version: 1). | | `language_code` | Supported Locales | | `odds_format` | Odds type in 2 letter format: American (us), Fractional (uk), or Decimal (eu). | | `format` | xml or json. | | `your_api_key` | Your API key. | ## Frequently Asked Questions

    Q: What format are date fields presented in?

    A: All of our Date/Time attributes are in either UTC (ISO-8601) or Unix Time (Epoch Time).

    UTC Example: 2013-04-03T18:15:00+00:00
    Unix Example: 1505844490

    For more information: https://en.wikipedia.org/wiki/ISO_8601
    https://en.wikipedia.org/wiki/Unix_time

    Q: What format are the date/time fields presented in?

    A: All of our Date/Time attributes are in UTC, presented in the ISO 8601 standard format.
    ex: 2013-04-03T18:15:00+00:00
    For more information: https://en.wikipedia.org/wiki/ISO_8601

    Q: What sports are covered?

    A: The sports coverage varies depending on configured bookmakers offering in that particular point in time. To get a list of available sports call the Sports endpoint.

    Q: What tournaments are covered?

    A: The tournament coverage varies depending on configured bookmakers offering in that particular point in time. To get a list of all the tournaments call the Tournaments endpoint. Alternatively, you may call the Sports Tournaments endpoint to get a list of all the tournaments for a given sport.

    Q: Does it have live odds?

    A: Yes, there are live consensus odds available, and pre-match odds data.

    Q: How frequently are the odds updated?

    A: Update frequency varies between different bookmakers. The API checks for odds changes every 60 seconds and updates them as soon as changes are found in our system. Note that we will not update the "last_updated" timestamp if there are no odds changes found when running the check.

    Q: What endpoint should be used to retrieve odds?

    A: There are several endpoints through which you can retrieve odds - their usage depends on the particular use case.

    • Tournament Schedule - returns a list of scheduled sport events and main markets for a given tournament ID. To get a list of all tournaments call the Tournaments or Sports Tournaments endpoint.
    • Sport Schedule - returns a list of scheduled sport events and main markets for a given sport ID and date. To get a list of all sports call the Sports endpoint.
    • Sport Event Markets - returns all available markets for a given match ID. To get a list of sport events call the Tournament Schedule or Sport Schedule endpoints.
    • Category Outrights - returns a list of outrights, outright competitors and their winning odds for a given category ID. To get a list of all the categories containing outright odds, call the Sport Categories endpoint.
    • Sport Events Change Log - returns a list of all the sport events where odds have changed including changed odds values and possible sport event changes.

    Q: How do you retrieve all possible results from the mapping feeds?

    A: The mapping feeds have a limit of 30,000 results per page. To get additional results you need to use the optional query string parameters “start” and “limit”. Optional query string parameters must be added after your API key with an ampersand (&).
    For example: https://api.sportradar.us/oddscomparison-rowt1/en/eu/sport_events/id_mappings.xml?api_key={your_api_key}&start=30000&limit=30000

    Q: How do you indicate when a bookmaker withdraws a match odds or outright competitor odds?

    A: Removed markets are indicated with "removed" flag as shown below

    
    <market name="total" group_name="regular">
      <book id="sr:book:988" removed="true"/>
    </market>
    

    Q: How do I use the change log endpoint?

    A: The Sport Event Change Log endpoint returns a list of all the sport events where odds have changed including the changed odds values. It takes a Unix timestamp in UTC as a URL input parameter and must be between current UTC time -15min and current UTC time. To avoid empty responses it's suggested to request this endpoint with regular frequency that should not be less than 60 seconds and should be few seconds smaller than Unix timestamp not to miss any odds changes and to account for the document generation time.
    ex: Requesting Sport Event Change Log endpoint every 110 seconds with Unix timestamp of current UTC time - 120 seconds.
    This endpoint also displays newly published matches, removed markets, and possible match scheduled time and status changes. It will not include matches and/or markets where odds values have remained unchanged.

    Q: What markets are currently available?

    A: Only main markets (2way, 3way, total, spread, handicap, and asian handicap), exchange odds, and outright odds are currently available. Special bet markets will become available at a later time.

    Q: What is an outright?

    A. Outrights (also known as Futures) are a flexible odds type that covers any variety of events where you have two or more competitors trying to win the same event. The event does not even have to be a physical match of any kind for instance: “Who will win the Formula 1 Drivers Championship this year?” for which there is a long list of competitors, each with their odds for winning this outright.

    Q: What is a consensus line?

    A: Consensus line is the most balanced line, calculated from the primary lines from configured bookmakers. There are six consensus lines that we calculate (Spread, Spread Live, Total, Total Live, Moneyline, and Moneyline Live). Each of these will display information about the opening and the current consensus line.
    Consensus lines are available across all sports but their presence depends on availability of primary lines from configured bookmakers – for instance when none of the configured bookmakers is offering “Spread” odds for a particular match, the opening and current consensus spread line will not be present.
    Consensus lines are sport-dependent, which means that for Soccer the Moneyline is calculated based on 3way odds and will have three outcomes for home, draw and away odds. In the case of Basketball the Moneyline is calculated based on 2way odds and will have only two outcomes for home and away odds.
    Consensus spread line in Ice Hockey is generally known as the “puck line” and in Baseball it’s known as the “run line”. In the API it will be named accordingly.

    Q: What are the possible values for “line – name”?

    A: Line names can vary by sport, and not all values may be available for all sports or events. The possible values for “line – name” are:

    • moneyline_current
    • moneyline_live
    • moneyline_open
    • puck_line_current
    • puck_line_open
    • run_line_current
    • run_line_open
    • spread_current
    • spread_live
    • spread_open
    • total_current
    • total_live
    • total_open

    Q: What is a consensus pick?

    A: Consensus pick shows a percentage of bets placed on each side of the primary line. Having primary line odds does not automatically guarantee that a pick will be present. Consensus picks are included when Sportradar has information about bets being placed on specific primary line

    Return to top