NASCAR v3

API API Version Data Entry Workflow
NASCAR Official v3 Data Entry Workflow
Note: Authentication is required for all API calls.
Sportradar US is the official data provider of NASCAR! This API contains exclusive access to data sent straight from the track. Check out the features below. ## Drivers ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/nascar-ot3/sc/2014/drivers/list.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", "/nascar-ot3/sc/2014/drivers/list.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/nascar-ot3/sc/2014/drivers/list.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. This endpoint retrieves the Drivers. https://api.sportradar.us/nascar-`{access_level}{version}`/`{nascar_series}`/`{year}`/drivers/list.`{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 (o) or Trial (ot). | | version | Version number of the API you are accessing (Current Version: 3). | | nascar_series | Sprint Cup (sc), Xfinity (xf), Camping World (cw), or Monster Energy Cup (mc). | | year | Year in 4 digit format (YYYY). | | format | xml or json. | | your_api_key | Your API key. | To retrieve the XML Schema Definition (.XSD) for the Drivers list, replace the parameters in the following URL. https://api.sportradar.us/nascar-`{access_level}{version}`/schema/series-v2.0.xsd?api_key=`{your_api_key}` ## Tracks ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/nascar-ot3/tracks/list.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", "/nascar-ot3/tracks/list.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/nascar-ot3/tracks/list.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. This endpoint retrieves the Tracks. https://api.sportradar.us/nascar-`{access_level}{version}`/tracks/list.`{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 (o) or Trial (ot). | | version | Version number of the API you are accessing (Current Version: 3). | | format | xml or json. | | your_api_key | Your API key. | To retrieve the XML Schema Definition (.XSD) for the Tracks list, replace the parameters in the following URL. https://api.sportradar.us/nascar-`{access_level}{version}`/schema/track-v2.0.xsd?api_key=`{your_api_key}` ## Schedule ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/nascar-ot3/sc/2014/races/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", "/nascar-ot3/sc/2014/races/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/nascar-ot3/sc/2014/races/schedule.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. This endpoint retrieves the Schedule. https://api.sportradar.us/nascar-`{access_level}{version}`/`{nascar_series}`/`{year}`/races/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 (o) or Trial (ot). | | version | Version number of the API you are accessing (Current Version: 3). | | nascar_series | Sprint Cup (sc), Xfinity (xf), Camping World (cw), or Monster Energy Cup (mc). | | year | Year in 4 digit format (YYYY). | | format | xml or json. | | your_api_key | Your API key. | To retrieve the XML Schema Definition (.XSD) for the Schedule, replace the parameters in the following URL. https://api.sportradar.us/nascar-`{access_level}{version}`/schema/schedule-v2.0.xsd?api_key=`{your_api_key}` ## Entry List ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/nascar-ot3/sc/races/fef6db6c-a8e2-4f15-af8e-587d850824b3/entry_list.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", "/nascar-ot3/sc/races/fef6db6c-a8e2-4f15-af8e-587d850824b3/entry_list.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/nascar-ot3/sc/races/fef6db6c-a8e2-4f15-af8e-587d850824b3/entry_list.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. This endpoint retrieves the Entry List. https://api.sportradar.us/nascar-`{access_level}{version}`/`{nascar_series}`/races/`{race_id}`/entry_list.`{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 (o) or Trial (ot). | | version | Version number of the API you are accessing (Current Version: 3). | | nascar_series | Sprint Cup (sc), Xfinity (xf), Camping World (cw), or Monster Energy Cup (mc). | | race_id | ID for the given race. | | format | xml or json. | | your_api_key | Your API key. | To retrieve the XML Schema Definition (.XSD) for the Entry List, replace the parameters in the following URL. https://api.sportradar.us/nascar-`{access_level}{version}`/schema/race-v3.0.xsd?api_key=`{your_api_key}` ## Practice Leaderboard ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/nascar-ot3/sc/races/fef6db6c-a8e2-4f15-af8e-587d850824b3/practices.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", "/nascar-ot3/sc/races/fef6db6c-a8e2-4f15-af8e-587d850824b3/practices.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/nascar-ot3/sc/races/fef6db6c-a8e2-4f15-af8e-587d850824b3/practices.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. This endpoint retrieves the Practice Leaderboard. https://api.sportradar.us/nascar-`{access_level}{version}`/`{nascar_series}`/races/`{race_id}`/practices.`{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 (o) or Trial (ot). | | version | Version number of the API you are accessing (Current Version: 3). | | nascar_series | Sprint Cup (sc), Xfinity (xf), Camping World (cw), or Monster Energy Cup (mc). | | race_id | ID for the given race. | | format | xml or json. | | your_api_key | Your API key. | To retrieve the XML Schema Definition (.XSD) for the Practice Leaderboard, replace the parameters in the following URL. https://api.sportradar.us/nascar-`{access_level}{version}`/schema/race-v3.0.xsd?api_key=`{your_api_key}` ## Qualifying Leaderboard ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/nascar-ot3/sc/races/fef6db6c-a8e2-4f15-af8e-587d850824b3/qualifying.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", "/nascar-ot3/sc/races/fef6db6c-a8e2-4f15-af8e-587d850824b3/qualifying.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/nascar-ot3/sc/races/fef6db6c-a8e2-4f15-af8e-587d850824b3/qualifying.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. This endpoint retrieves the Qualifying Leaderboard. https://api.sportradar.us/nascar-`{access_level}{version}`/`{nascar_series}`/races/`{race_id}`/qualifying.`{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 (o) or Trial (ot). | | version | Version number of the API you are accessing (Current Version: 3). | | nascar_series | Sprint Cup (sc), Xfinity (xf), Camping World (cw), or Monster Energy Cup (mc). | | race_id | ID for the given race. | | format | xml or json. | | your_api_key | Your API key. | To retrieve the XML Schema Definition (.XSD) for the Qualifying Leaderboard, replace the parameters in the following URL. https://api.sportradar.us/nascar-`{access_level}{version}`/schema/race-v3.0.xsd?api_key=`{your_api_key}` ## Starting Grid ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/nascar-ot3/sc/races/fef6db6c-a8e2-4f15-af8e-587d850824b3/starting_grid.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", "/nascar-ot3/sc/races/fef6db6c-a8e2-4f15-af8e-587d850824b3/starting_grid.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/nascar-ot3/sc/races/fef6db6c-a8e2-4f15-af8e-587d850824b3/starting_grid.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. This endpoint retrieves the Starting Grid. https://api.sportradar.us/nascar-`{access_level}{version}`/`{nascar_series}`/races/`{race_id}`/starting_grid.`{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 (o) or Trial (ot). | | version | Version number of the API you are accessing (Current Version: 3). | | nascar_series | Sprint Cup (sc), Xfinity (xf), Camping World (cw), or Monster Energy Cup (mc). | | race_id | ID for the given race. | | format | xml or json. | | your_api_key | Your API key. | To retrieve the XML Schema Definition (.XSD) for the Starting Grid, replace the parameters in the following URL. https://api.sportradar.us/nascar-`{access_level}{version}`/schema/race-v3.0.xsd?api_key=`{your_api_key}` ## Race Leaderboard ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/nascar-ot3/sc/races/fef6db6c-a8e2-4f15-af8e-587d850824b3/results.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", "/nascar-ot3/sc/races/fef6db6c-a8e2-4f15-af8e-587d850824b3/results.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/nascar-ot3/sc/races/fef6db6c-a8e2-4f15-af8e-587d850824b3/results.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. This endpoint retrieves the Race Leaderboard. https://api.sportradar.us/nascar-`{access_level}{version}`/`{nascar_series}`/races/`{race_id}`/results.`{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 (o) or Trial (ot). | | version | Version number of the API you are accessing (Current Version: 3). | | nascar_series | Sprint Cup (sc), Xfinity (xf), Camping World (cw), or Monster Energy Cup (mc). | | race_id | ID for the given race. | | format | xml or json. | | your_api_key | Your API key. | To retrieve the XML Schema Definition (.XSD) for the Race Leaderboard, replace the parameters in the following URL. https://api.sportradar.us/nascar-`{access_level}{version}`/schema/race-v3.0.xsd?api_key=`{your_api_key}` ## Driver, Rookie, Owner, and Manufacturer Standings ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/nascar-ot3/sc/2014/standings/drivers.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", "/nascar-ot3/sc/2014/standings/drivers.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/nascar-ot3/sc/2014/standings/drivers.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this for drivers, rookies, owners, or manufacturers. This endpoint retrieves the Driver, Rookie, Owner, and Manufacturer Standings. https://api.sportradar.us/nascar-`{access_level}{version}`/`{nascar_series}`/`{year}`/standings/`{standings_type}`.`{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 (o) or Trial (ot). | | version | Version number of the API you are accessing (Current Version: 3). | | nascar_series | Sprint Cup (sc), Xfinity (xf), Camping World (cw), or Monster Energy Cup (mc). | | year | Year in 4 digit format (YYYY). | | standings_type | Type of standing: drivers, rookies, owners, or manufacturers. | | format | xml or json. | | your_api_key | Your API key. | To retrieve the XML Schema Definition (.XSD) for the Driver, Rookie, Owner, and Manufacturer Standings, replace the parameters in the following URL. https://api.sportradar.us/nascar-`{access_level}{version}`/schema/standings-v2.0.xsd?api_key=`{your_api_key}` ## Driver Statistics ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/nascar-ot3/sc/drivers/2014/drivers.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", "/nascar-ot3/sc/drivers/2014/drivers.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/nascar-ot3/sc/drivers/2014/drivers.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. This endpoint retrieves the Driver Statistics. https://api.sportradar.us/nascar-`{access_level}{version}`/`{nascar_series}`/drivers/`{year}`/drivers.`{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 (o) or Trial (ot). | | version | Version number of the API you are accessing (Current Version: 3). | | nascar_series | Sprint Cup (sc), Xfinity (xf), Camping World (cw), or Monster Energy Cup (mc). | | year | Year in 4 digit format (YYYY). | | format | xml or json. | | your_api_key | Your API key. | To retrieve the XML Schema Definition (.XSD) for the Driver Statistics, replace the parameters in the following URL. https://api.sportradar.us/nascar-`{access_level}{version}`/schema/statistics-v3.0.xsd?api_key=`{your_api_key}` ## Daily Change Log ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/nascar-ot3/2014/02/23/changes.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", "/nascar-ot3/2014/02/23/changes.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/nascar-ot3/2014/02/23/changes.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. This endpoint retrieves the Daily Change Log. https://api.sportradar.us/nascar-`{access_level}{version}`/`{year}`/`{month}`/`{day}`/changes.`{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 (o) or Trial (ot). | | version | Version number of the API you are accessing (Current Version: 3). | | year | Year in 4 digit format (YYYY). | | month | Month in 2 digit format (MM). | | day | Day in 2 digit format (DD). | | format | xml or json. | | your_api_key | Your API key. | To retrieve the XML Schema Definition (.XSD) for the Daily Change Log, replace the parameters in the following URL. https://api.sportradar.us/nascar-`{access_level}{version}`/schema/changelog-v2.0.xsd?api_key=`{your_api_key}`