Indy Lights v2

Frequently Asked Questions
Quick Access
Postman Collection XSD Schema
Download
## Indy Lights API Overview The Indy Lights API provides schedules and post-race results for the entire Indy Lights 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
Indy Lights v2
Note: Authentication is required for all API calls.
## Indy Lights v2 API Map To best utilize the Indy Lights 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 profile for a given racer: >
  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 which your race competed in
  4. Call the Stage Summary using the 'race' Stage Id
  5. Within the results locate the competitor id for your racer
  6. Call the Competitor Profile endpoint using your racer's competitor id
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 the profile feed. ## Competitor Profile Provides biographical information for a given driver.
Update Frequency: As Necessary
Content Type: Raw XML or JSON
Competitor Information Data Points: Gender Id Name
```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/indylights/trial/v2/en/competitors/sr:competitor:687815/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.com") conn.request("GET", "/indylights/trial/v2/en/competitors/sr:competitor:687815/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.com/indylights/trial/v2/en/competitors/sr:competitor:687815/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.com/indylights/`{access_level}`/`{version}`/`{language_code}`/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: v2). | | `language_code` | 2 letter code for supported languages: en (English). | | `competitor_id` | Id of a given competitor. | | `format` | xml or json. | | `your_api_key` | Your API key. | Return to top ## Deleted Stages Provides all deleted stages within a given season.
Update Frequency: As Necessary
Content Type: Raw XML or JSON
Stage Information Data Points: Description
Disabled
Scheduled
Scheduled End
Single Event
Stage Id
Type
```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/indylights/trial/v2/en/seasons/sr:stage:985207/deleted_stages.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", "/indylights/trial/v2/en/seasons/sr:stage:985207/deleted_stages.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/indylights/trial/v2/en/seasons/sr:stage:985207/deleted_stages.xml?api_key={your_api_key}" ``` Access the Deleted Stages feed by replacing the parameters in the following URL: https://api.sportradar.us/indylights/`{access_level}`/`{version}`/`{language_code}`/seasons/`{stage_id}`/deleted_stages.`{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: v2). | | `language_code` | 2 letter code for supported languages: en (English). | | `stage_id` | Id of a given stage. | | `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 Indy Lights API.
Update Frequency: As Necessary
Content Type: Raw XML or JSON
Stage Information Data Points: Description
Disabled
Scheduled
Scheduled End
Single Event
Stage Id
Type
```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/indylights/trial/v2/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.com") conn.request("GET", "/indylights/trial/v2/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.com/indylights/trial/v2/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.com/indylights/`{access_level}`/`{version}`/`{language_code}`/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: v2). | | `language_code` | 2 letter code for supported languages: en (English). | | `format` | xml or json. | | `your_api_key` | Your API key. | Return to top ## Stage Schedule Provides the schedule for a given stage.
Update Frequency: As Necessary
Content Type: Raw XML or JSON
Stage Information Data Points: Description
Disabled
Scheduled
Scheduled End
Single Event
Stage Id
Type
```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/indylights/trial/v2/en/sport_events/sr:stage:671516/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.com") conn.request("GET", "/indylights/trial/v2/en/sport_events/sr:stage:671516/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/indylights/trial/v2/en/sport_events/sr:stage:671516/schedule.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. Access the Stage Schedule feed by replacing the parameters in the following URL: https://api.sportradar.com/indylights/`{access_level}`/`{version}`/`{language_code}`/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: v2). | | `language_code` | 2 letter code for supported languages: en (English). | | `stage_id` | Id of a given stage. | | `format` | xml or json. | | `your_api_key` | Your API key. | Return to top ## Stage Summary Provides stage and result information for each competitor.
Update Frequency: As Necessary
Content Type: Raw XML or JSON
Competitor Information Data Points: Gender Id Name
Stage Information Data Points: Description
Disabled
Scheduled
Scheduled End
Single Event
Stage Id
Type
Results Information Data Points: Gap
Points
Position
Races
Status
Victories
```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/indylights/trial/v2/en/sport_events/sr:stage:708616/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.com") conn.request("GET", "/indylights/trial/v2/en/sport_events/sr:stage:708616/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.com/indylights/trial/v2/en/sport_events/sr:stage:708616/summary.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. Access the Stage Summary feed by replacing the parameters in the following URL: https://api.sportradar.com/indylights/`{access_level}`/`{version}`/`{language_code}`/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: v2). | | `language_code` | 2 letter code for supported languages: en (English). | | `stage_id` | Id of a given stage. | | `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: We present date only values 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: What are the stage types I can expect to see in the feeds?

A: Here are the Indy Lights stage:

  • sport
  • season
  • event
  • practice
  • qualifying
  • race
  • lap

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" which displays the 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 Stage Summary endpoint, using the season stage ID.

Q: Is it updated in real-time?

A: No, post-event. Meaning results of practice are available after practice session is complete, similarly for qualification sessions and the race itself.

Q: Does this API include Qualifying and Practice sessions?

A: Yes, qualifying and practice sessions are updated post-event.

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

A: Here are the possible stage statuses and their definitions:

  • Cancelled - The stage is cancelled and will not be taking place
  • Closed - The stage is over and we have validated the results
  • Completed - The stage is over, but we have not finished data collection and validation
  • Finished - The stage is over
  • Not Started - The stage has not begun
  • Preliminary - The stage is about to begin
  • Running - The stage is currently in progress

Q: What are the possible result statuses?

A: Here are the possible result statuses:

  • Finished
  • Out
Return to top

Docs Navigation