Probabilities v1

Frequently Asked Questions
API API Version
Probabilities v1
Note: Authentication is required for all API calls.
## Probabilities API Map To best utilize the Probabilities 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 Sport Event Probabilities for a Cricket match on a given day: >
  1. Call the Sports endpoint and find Cricket.
  2. Take note of the "sport - id" for Cricket (sr:sport:21).
  3. Call the Sport Schedule endpoint using the sport id and the given day you are interested in.
  4. Find the sport event you are interested in and call the Sport Event Probabilities feed with the "sport_event - id".
>The probabilities for the chosen match are displayed. >
    >To find the Probabilities for a season of Cricket and view a Sport Event Probabilities Timeline: >
    1. Call the Sports endpoint and find Cricket.
    2. Take note of the "sport - id" for Cricket (sr:sport:21).
    3. Call the Sport Competitions endpoint and take note of the "competition - id" for the competition you want.
    4. Call the Competition Seasons endpoint using the "competition - id" and take note of the "season - id" for the season you want.
    5. Call the Seasonal Probabilities endpoint using the "season - id" and take note of the "sport_event - id" for the match you want.
    6. Call the Sport Event Probabilities Timeine endpoint using the "sport_event - id".
    >The timeline of probabilities for the given match are 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 Sport IDs, sports feeds provide Sport Event and Competition IDs, the competition feed provide Season IDs, and the seasonal feed provides Sport Event IDs. ## Competition Seasons ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/probabilities/trial/v1/en/competitions/sr:competition:2478/seasons.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", "/probabilities/trial/v1/en/competitions/sr:competition:2478/seasons.xml?api_key={your_api_key}") res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ```shell curl -X GET "https://api.sportradar.us/probabilities/trial/v1/en/competitions/sr:competition:2478/seasons.xml?api_key={your_api_key}" ``` This endpoint is used to access a list of seasons for a given competition. https://api.sportradar.us/probabilities/`{access_level}`/`{version}`/`{language_code}`/competitions/`{competition_id}`/seasons.`{format}`?api_key=`{your_api_key}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (production) or Trial (trial). | | `version` | Version number of the API you are accessing (Current Version: v1). | | `language_code` | Supported Locales | | `competition_id` | Id of a given competition. | | `format` | xml or json. | | `your_api_key` | Your API key. | ## Seasonal Probabilities ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/probabilities/trial/v1/en/seasons/sr:season:63057/probabilities.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", "/probabilities/trial/v1/en/seasons/sr:season:63057/probabilities.xml?api_key={your_api_key}") res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ```shell curl -X GET "https://api.sportradar.us/probabilities/trial/v1/en/seasons/sr:season:63057/probabilities.xml?api_key={your_api_key}" ``` This endpoint retrieves sport event probabilities by season. https://api.sportradar.us/probabilities/`{access_level}`/`{version}`/`{language_code}`/seasons/`{season_id}`/probabilities.`{format}`?api_key=`{your_api_key}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (production) or Trial (trial). | | `version` | Version number of the API you are accessing (Current Version: v1). | | `language_code` | Supported Locales | | `season_id` | Id of a given season. | | `format` | xml or json. | | `your_api_key` | Your API key. | ## Sport Competitions ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/probabilities/trial/v1/en/sports/sr:sport:21/competitions.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", "/probabilities/trial/v1/en/sports/sr:sport:21/competitions.xml?api_key={your_api_key}") res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ```shell curl -X GET "https://api.sportradar.us/probabilities/trial/v1/en/sports/sr:sport:21/competitions.xml?api_key={your_api_key}" ``` This endpoint retrieves the list of competitions for a given sport. https://api.sportradar.us/probabilities/`{access_level}`/`{version}`/`{language_code}`/sports/`{sport_id}`/competitions.`{format}`?api_key=`{your_api_key}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (production) or Trial (trial). | | `version` | Version number of the API you are accessing (Current Version: v1). | | `language_code` | Supported Locales | | `sport_id` | Id of a given sport. | | `format` | xml or json. | | `your_api_key` | Your API key. | ## Sport Event Probabilities ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/probabilities/trial/v1/en/sport_events/sr:sport_event:17139773/probabilities.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", "/probabilities/trial/v1/en/sport_events/sr:sport_event:17139773/probabilities.xml?api_key={your_api_key}") res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ```shell curl -X GET "https://api.sportradar.us/probabilities/trial/v1/en/sport_events/sr:sport_event:17139773/probabilities.xml?api_key={your_api_key}" ``` This endpoint retrieves the probabilities for a sport event. https://api.sportradar.us/probabilities/`{access_level}`/`{version}`/`{language_code}`/sport_events/`{sport_event_id}`/probabilities.`{format}`?api_key=`{your_api_key}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (production) or Trial (trial). | | `version` | Version number of the API you are accessing (Current Version: v1). | | `language_code` | Supported Locales | | `sport_event_id` | Id of a given sport event. | | `format` | xml or json. | | `your_api_key` | Your API key. | ## Sport Event Probabilities Timeline ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/probabilities/trial/v1/en/sport_events/sr:sport_event:17139773/timeline.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", "/probabilities/trial/v1/en/sport_events/sr:sport_event:17139773/timeline.xml?api_key={your_api_key}") res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ```shell curl -X GET "https://api.sportradar.us/probabilities/trial/v1/en/sport_events/sr:sport_event:17139773/timeline.xml?api_key={your_api_key}" ``` This endpoint retrieves the sport event probabilities timeline. https://api.sportradar.us/probabilities/`{access_level}`/`{version}`/`{language_code}`/sport_events/`{sport_event_id}`/timeline.`{format}`?api_key=`{your_api_key}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (production) or Trial (trial). | | `version` | Version number of the API you are accessing (Current Version: v1). | | `language_code` | Supported Locales | | `sport_event_id` | Id of a given sport event. | | `format` | xml or json. | | `your_api_key` | Your API key. | ## Sport Schedule ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/probabilities/trial/v1/en/sports/sr:sport:21/schedules/2018-10-17/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", "/probabilities/trial/v1/en/sports/sr:sport:21/schedules/2018-10-17/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.us/probabilities/trial/v1/en/sports/sr:sport:21/schedules/2018-10-17/schedule.xml?api_key={your_api_key}" ``` This endpoint retrieves the schedule for a sport. https://api.sportradar.us/probabilities/`{access_level}`/`{version}`/`{language_code}`/sports/`{sport_id}`/schedules/`{date}`/schedule.`{format}`?api_key=`{your_api_key}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (production) or Trial (trial). | | `version` | Version number of the API you are accessing (Current Version: v1). | | `language_code` | Supported Locales | | `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. | ## Sports ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/probabilities/trial/v1/en/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", "/probabilities/trial/v1/en/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.us/probabilities/trial/v1/en/sports.xml?api_key={your_api_key}" ``` This endpoint retrieves the list of sports. https://api.sportradar.us/probabilities/`{access_level}`/`{version}`/`{language_code}`/sports.`{format}`?api_key=`{your_api_key}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (production) or Trial (trial). | | `version` | Version number of the API you are accessing (Current Version: v1). | | `language_code` | Supported Locales | | `format` | xml or json. | | `your_api_key` | Your API key. | ## Frequently Asked Questions

    Q: What sports are available in the Probabilities API?

    A: The following sports are available to be licensed:

    • Aussie Rules Football
    • Badminton
    • Bandy
    • Baseball
    • Basketball
    • Beach Soccer
    • Beach Volley
    • Bowls
    • Boxing
    • Chess
    • Cricket
    • Curling
    • Darts
    • Counter-Strike
    • Dota 2
    • League of Legends
    • Fencing
    • Field hockey
    • American Football
    • Futsal
    • Gaelic Football
    • Gaelic Hurling
    • Handball
    • Ice Hockey
    • Judo
    • Kabaddi
    • Lacrosse
    • MMA
    • Netball
    • Pool
    • Rugby
    • Rugby League
    • Snooker
    • Soccer
    • Softball
    • Squash
    • Sumo
    • Table Tennis
    • Taekwondo
    • Tennis
    • Volleyball
    • Waterpolo
    • Wrestling

    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 competitions are covered?

    A: To get a list of all the competitions call the Sport Competitions endpoint for a given sport.

    Q: What markets are currently available?

    A: Only main markets (2way, 3way) odds are currently available.

    Q: What information does 'basic score' include?

    A: Basic score information is included in the node and includes the following parameters:

    • status
    • match_status
    • home_score
    • away_score
    • innings
    • over
    • delivery
    • home_dismissals
    • away_dismissals

    Q: What level of precision is applied to the probabilities?

    A: The probabilities are presented to the nearest tenth of a percent. Changes to the probabilities are captured when the probabilities change by more than 0.1%.

    
    <markets>
      <market name="2way" last_updated="2019-03-05T01:54:53+00:00">
       <outcomes>
         <outcome name="home_team_winner" probability="66.3"/>
         <outcome name="away_team_winner" probability="33.7"/>
       </outcomes>
     </market>
     <market name="2way" live="true" last_updated="2019-03-05T13:57:32+00:00">
       <outcomes>
         <outcome name="home_team_winner" probability="44.7"/>
         <outcome name="away_team_winner" probability="55.3"/>
       </outcomes>
     </market>
    </markets>
    

    Q: How do I distinguish between pre-match and live probabilities?

    A: Live probabilities are denoted by the attribute live="true". See the code sample to the right.

    Q: What happens to the Sport Event Probabilities Timeline before, during, and after the match?

    A: Before the match, the feed will only include pre-match probabilities. Near to the start of the match the probabilities will switch to live. The pre-match probabilities will remain in the feeds throughout the match but be frozen in time with no further changes.
    Live probabilities will continue to update throughout the match and will converge to 0 and 100 for the losing and winning outcomes.
    Post-match the live probabilities will remain at 0 and 100 while the pre-match probabilities will persist as they were at the start of the match.

    Q: What are the possible values for "status"?

    A: Here is a list of possible “status” values:

    • Not Started
    • Live
    • Suspended
    • Ended
    • Closed
    • Cancelled
    • Delayed
    • Interrupted
    • Postponed
    • Abandoned

    Q: Are historical probabilities available?

    A: No. This is a forward-looking API only and probabilities will only be available for the current season of any competition. Additionally, there are no probabilities available prior to February 2019.

    Return to top