NHRA v1

Frequently Asked Questions
Quick Access
Postman Collection XSD Schema
Download
## NHRA API Overview The NHRA (National Hot Rod Association) API provides schedules and post-race results for the entire NHRA series. All data is collected via Sportradar’s expert operators. This API uses a descending, stage-based structure. By changing the stage ID, you can retrieve information on a season, event, race, or any of the practice or qualifying stages. Additional feeds provide complimentary stats, including racer profiles.
API API Version
NHRA v1
Note: Authentication is required for all API calls.
## NHRA v1 API Map To best utilize the NHRA API, you will need several parameters to create your API calls. The map below illustrates how you can obtain the parameters you need. >

Example:

>To find the summary for a given race: >
  1. Call the Seasons endpoint and find the Stage Id for the current season
  2. Call the Stage Schedule using the 'season' Stage Id
  3. Locate the Stage Id for the upcoming race
  4. Call the Sport Event Summary using the 'race' Stage Id
>The summary info for this race is displayed. The primary Seasons feed requires only a human-readable parameter to call the endpoint. This feed provides season Stage Ids, which can be used to generate descending Stage Summary feeds to include more detailed info, such as events and races. These feeds can then be used to generate profile feeds. ## Competitor Profile Provides biographical information for a given driver. ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/nhra/trial/v1/en/competitors/sr:competitor:459367/profile.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", "/nhra/trial/v1/en/competitors/sr:competitor:459367/profile.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/nhra/trial/v1/en/competitors/sr:competitor:459367/profile.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. Access the Competitor Profile feed by replacing the parameters in the following URL: https://api.sportradar.us/nhra/`{access_level}`/`{version}`/en/competitors/`{competitor_id}`/profile.`{format}`?api_key=`{your_api_key}` | 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` | Optional 2 letter code for supported languages: en (English), ru (Russian), and zh (simplified Chinese). | | `competitor_id` | Id of a given competitor. | | `format` | xml or json. | | `your_api_key` | Your API key. | Return to top ## Season Schedule Provides the schedule for a given season. ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/nhra/trial/v1/en/sport_events/sr:stage:499921/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", "/nhra/trial/v1/en/sport_events/sr:stage:499921/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/nhra/trial/v1/en/sport_events/sr:stage:499921/schedule.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. Access the Season Schedule feed by replacing the parameters in the following URL: https://api.sportradar.us/nhra/`{access_level}`/`{version}`/en/sport_events/`{stage_id}`/schedule.`{format}`?api_key=`{your_api_key}` | 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). | | `stage_id` | Stage Id of a given season. | | `format` | xml or json. | | `your_api_key` | Your API key. | Return to top ## Seasons Provides a complete historical list of available seasons. This is the starting point for the NHRA API. ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/nhra/trial/v1/en/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", "/nhra/trial/v1/en/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/nhra/trial/v1/en/seasons.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. Access the Seasons feed by replacing the parameters in the following URL: https://api.sportradar.us/nhra/`{access_level}`/`{version}`/en/seasons.`{format}`?api_key=`{your_api_key}` | 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). | | `format` | xml or json. | | `your_api_key` | Your API key. | Return to top ## Sport Event Summary (Event) Provides stage and result information for each competitor in the event. ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/nhra/trial/v1/en/sport_events/sr:stage:500037/summary.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", "/nhra/trial/v1/en/sport_events/sr:stage:500037/summary.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/nhra/trial/v1/en/sport_events/sr:stage:500037/summary.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. Access the Sport Event Summary (Event) feed by replacing the parameters in the following URL: https://api.sportradar.us/nhra/`{access_level}`/`{version}`/en/sport_events/`{stage_id}`/summary.`{format}`?api_key=`{your_api_key}` | 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). | | `stage_id` | Id of a given event. | | `format` | xml or json. | | `your_api_key` | Your API key. | Return to top ## Sport Event Summary (Race) Provides stage and result information for each competitor in the race. ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/nhra/trial/v1/en/sport_events/sr:stage:500039/summary.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", "/nhra/trial/v1/en/sport_events/sr:stage:500039/summary.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/nhra/trial/v1/en/sport_events/sr:stage:500039/summary.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. Access the Sport Event Summary (Race) feed by replacing the parameters in the following URL: https://api.sportradar.us/nhra/`{access_level}`/`{version}`/en/sport_events/`{stage_id}`/summary.`{format}`?api_key=`{your_api_key}` | 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). | | `stage_id` | Id of a given race. | | `format` | xml or json. | | `your_api_key` | Your API key. | Return to top ## Sport Event Summary (Season) Provides stage and result information for each competitor for the season. ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/nhra/trial/v1/en/sport_events/sr:stage:499921/summary.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", "/nhra/trial/v1/en/sport_events/sr:stage:499921/summary.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/nhra/trial/v1/en/sport_events/sr:stage:499921/summary.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. Access the Sport Event Summary (Season) feed by replacing the parameters in the following URL: https://api.sportradar.us/nhra/`{access_level}`/`{version}`/en/sport_events/`{stage_id}`/summary.`{format}`?api_key=`{your_api_key}` | 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). | | `stage_id` | Id of a given season. | | `format` | xml or json. | | `your_api_key` | Your API key. | Return to top ## Frequently Asked Questions

Q: What format are date fields presented in?

A: When we present date only values we present these in the ISO 8601 standard format.
ex: 2013-04-03
We use these for attributes that have date and no time (such as birthdate). For more information: https://en.wikipedia.org/wiki/ISO_8601

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: How does the stage system work?

The NHRA API uses generic stage implementation. The core of the API is built around the concept of stages. For example, an event contains the following stage types: qualifying and race.

The NHRA sport and seasons within it are stages as well. The sport stage consists of season stages for each annual season. Using the ID of a chosen season as a parameter in the Sport Event Summary endpoint you can "drill down" into each season. For example, using the 2019 season ID as a parameter in the Sport Event Summary endpoint, the sub-stages will be individual race events. From the race event, you can drill down into the qualifying and race using the same endpoint with different stage IDs.

The best way to 'start' the navigation with the NHRA API is using the Seasons endpoint. From there one can obtain the stage ID for the season required and use that as a parameter in the Sport Event Summary endpoint.

Stage Type Information Included Sub-stages
Sport Information about the seasons included. Which is limited to the current and previous season only. Note probabilities do not return valid data on this stage. NHRA seasons: 2019.
Season Contains the season schedule, driver standings, and points. Events on the NHRA calendar for that season
Event Information about a single event, the competitors, and the venue. Sessions (eg: Qualifying and Race)
Qualifying Information pertaining to the qualifying stage of the event including competitors, and overall qualifying results. Qualifying
Race Details of the race itself including the competitors, lap by lap, and overall results. Laps

Q: What are the stage types I can expect to see in the feeds?

A: Here are the NHRA stage:

  • sport
  • season
  • event
  • qualifying
  • race

Q: How do I see the Championship points table?

A: Use the stage summary endpoint and a season stage ID as the parameter. The competitors node lists competitors, position, victories, and races.

Q: How do I know what "stage" I am currently looking at?

A: Each stage has a 'stage' element. The stage element has an attribute "type" displays stage type. The different valid stage types are listed above.

Q: How do I retrieve information about an individual driver?

A: Use the Competitor Profile endpoint with the required driver's competitor ID. The best place to get the driver's competitor ID is the Sport Event Summary endpoint, using the season stage ID.

Q: What races are covered in the NHRA API?

A: The entire NHRA Championship.

Q: Is it updated in real-time?

A: No, post-event. Meaning results of qualifying are available after qualification sessions and the race itself.

Q: Does this API include Qualifying sessions?

A: Yes, qualifying stages are all covered.

Q: What are the possible statuses of a race or stage?

A: Here are the possible race and stage statuses:

  • Cancelled
  • Finished
  • Running
  • Not Started
  • Completed
  • Preliminary
Return to top

Docs Navigation