Images v3

Note: All of our Date/Time attributes are in UTC, presented in the ISO 8601 standard format. For example, if a game is scheduled at 7:00 pm Central time, it will be on the next day’s manifest.
Note: Images for each league require separate API keys.
## Image Provider Coverage Calling the Images v3 API requires parameters for both the sport and the provider of the images. Each provider we use only supplies images for a limited number of sports. The table below illustrates which providers offer which sports.
Reuters
USAT
AP
Getty
Sportradar
NFL
x
x†‡
MLB
x†
NBA
x†‡
NHL
x
x†
NCAA FB, NCAA MB, NCAA WB, MLS
x
NCAA MH
KHL
x
Golf
x
x†
NASCAR
x
x
International Baseball
x
International Basketball, Euroleague Basketball
x
EPL, Bundesliga, La Liga, Serie A, Ligue 1
x
x
Europa League, UEFA Champions League
x
x
Boxing
x
UFC
x
F1
x
x
World Rally, IndyCar
x
Tennis
x
x
x
Cricket
x
Soccer World Cup, International Soccer, Scottish Premiership, Netherlands Eredivisie, Belgian First Division A, Portuguese Primeira Liga, and Turkish Super Lig
x
Rugby
x
Winter Olympics
x
Handball
x
Beach Volleyball
x
Indoor Volleyball
x
Badminton
x
† Indicates premium (transparent background) headshots are available. ‡ Indicates logos are available. ## Image Types by Sport API keys are separated between Action Shots (actionshots), Headshots (players and coaches), Venues (venues), Logos (logos), and Country Flags (flags). Action Shots and Headshots keys can access Venue Images and Venue Manifests automatically. The table below lists which image types are available from which providers based on sport.
Action Shots
Player Headshots
Coach Headshots
Venue Images
Logos
Country Flags
NFL
USAT and AP
USAT and AP
USAT
USAT and AP
AP
Sportradar
MLB
USAT
USAT
USAT
USAT
AP
Sportradar
NBA
Getty
Getty
Getty
AP
Sportradar
NHL
USAT
USAT and Getty
USAT
USAT
AP
Sportradar
NCAA FB
USAT
USAT
AP
Sportradar
NCAA MB
USAT
USAT
AP
Sportradar
NCAA WB
USAT
AP
Sportradar
NCAA MH
AP
Sportradar
KHL
Getty
Sportradar
NASCAR
USAT and Getty
USAT
USAT
Sportradar
MLS
USAT
USAT
AP
Sportradar
Golf
USAT
USAT and Getty
Sportradar
International Baseball
Getty
Sportradar
International Basketball, Euroleague Basketball
Getty
Sportradar
Soccer EPL
Reuters and Getty
Reuters
AP
Sportradar
Soccer Bundesliga
Reuters and Getty
Reuters
AP
Sportradar
Soccer La Liga
Reuters and Getty
Reuters
AP
Sportradar
Soccer Serie A
Reuters and Getty
Reuters
AP
Sportradar
Soccer Ligue 1
Reuters and Getty
Reuters
AP
Sportradar
Soccer Europa League
Reuters and Getty
Sportradar
Soccer UEFA Champions League
Reuters and Getty
Sportradar
Soccer World Cup
Getty
Getty
Sportradar
International Soccer
Getty
Sportradar
Scottish Premiership
Getty
Sportradar
Netherlands Eredivisie
Getty
Sportradar
Belgian First Division A
Getty
Sportradar
Portuguese Primeira Liga
Getty
Sportradar
Turkish Super Lig
Getty
Sportradar
Boxing
USAT
Sportradar
UFC
USAT
Sportradar
Tennis
Reuters and Getty
Reuters
AP
Sportradar
Rugby
Getty
Sportradar
Cricket
Getty
Sportradar
F1
Reuters and Getty
Reuters
Sportradar
World Rally, IndyCar
Getty
Sportradar
Winter Olympics
USAT
Sportradar
Handball
Getty
Sportradar
Beach Volleyball
Getty
Sportradar
Indoor Volleyball
Getty
Sportradar
Badminton
Getty
Sportradar
## Action Shots Manifest (by date) ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/nhl-images-t3/usat/actionshots/events/2017/2/9/manifest.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", "/nhl-images-t3/usat/actionshots/events/2017/2/9/manifest.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/nhl-images-t3/usat/actionshots/events/2017/2/9/manifest.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. This endpoint retrieves Daily Event Image manifest. https://api.sportradar.us/`{sport}`-images-`{access_level}{version}`/`{provider}`/`{league}`/`{image_type}`/events/`{year}`/`{month}`/`{day}`/manifest.`{format}`?api_key=`{your_api_key}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `sport` | Abbreviation for the specified sport: nfl, mlb, nba, nhl, ncaafb, ncaamb, ncaawb, hockey, nascar, baseball, basketball, mls, soccer, tennis, boxing, ufc, f1, world-rally, indycar, rugby, cricket, olympics, handball, volleyball, or badminton. | | `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: 3). | | `provider` | News provider: Reuters (reuters), USA Today (usat), Associated Press (ap), or Getty (getty). | | `league` | Only required for International Soccer, International Baseball, International Basketball, International Hockey, or Volleyball. League name: bundesliga, epl, serie-a, la-liga, ligue-1, europa-league, uefa-champions-league, world-cup, intl-soccer, sco-premiership, ned-eredivisie, bel-first-division-a, prt-primeira-liga, tur-super-lig, euroleague, intl-baseball, intl-basketball, khl, beach, or indoor. | | `image_type` | Type of images: actionshots | | `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 Daily Event Images, replace the parameters in the following URL. https://api.sportradar.us/`{sport}`-images-`{access_level}{version}`/`{provider}`/`{league}`/schema/manifest-v2.5.xsd?api_key=`{your_api_key}` ## Action Shots Manifest (by event) ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/nhl-images-t3/usat/actionshots/events/game/bab68443-539e-48ba-a61f-3a835fdcfc81/manifest.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", "/nhl-images-t3/usat/actionshots/events/game/bab68443-539e-48ba-a61f-3a835fdcfc81/manifest.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/nhl-images-t3/usat/actionshots/events/game/bab68443-539e-48ba-a61f-3a835fdcfc81/manifest.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. This endpoint retrieves Event Images. https://api.sportradar.us/`{sport}`-images-`{access_level}{version}`/`{provider}`/`{league}`/`{image_type}`/events/`{event_entity_name}`/`{event_entity_id}`/manifest.`{format}`?api_key=`{your_api_key}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `sport` | Abbreviation for the specified sport: nfl, mlb, nba, nhl, ncaafb, ncaamb, ncaawb, hockey, nascar, basketball, mls, soccer, tennis, f1, indycar, rugby, cricket, olympics, handball, volleyball, or badminton. | | `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: 3). | | `provider` | News provider: Reuters (reuters), USA Today (usat), Associated Press (ap), or Getty (getty). | | `league` | Only required for International Soccer, International Basketball, International Hockey, or Volleyball. League name: bundesliga, epl, serie-a, la-liga, ligue-1, europa-league, uefa-champions-league, world-cup, intl-soccer, sco-premiership, ned-eredivisie, bel-first-division-a, prt-primeira-liga, tur-super-lig, euroleague, intl-basketball, khl, beach, or indoor. | | `image_type` | Type of images: actionshots | | `event_entity_name` | Relevant event type based on sport. (i.e.: stage, event, match, game, tournament, or sport).
NOTE: For Olympics images use event. | | `event_entity_id` | Id of a given event type.
NOTE: Both sportradar_id or sportsdata_id can be used. | | `format` | xml or json. | | `your_api_key` | Your API key. | To retrieve the XML Schema Definition (.xsd) for Event Images, replace the parameters in the following URL. https://api.sportradar.us/`{sport}`-images-`{access_level}{version}`/`{provider}`/`{league}`/schema/manifest-v2.5.xsd?api_key=`{your_api_key}` ## Action Shots Images ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/nhl-images-t3/usat/actionshots/events/2017/1/24/1f9e876e-cb2e-40c5-94b2-059111293d4b/original.jpg?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", "/nhl-images-t3/usat/actionshots/events/2017/1/24/1f9e876e-cb2e-40c5-94b2-059111293d4b/original.jpg?api_key={your_api_key}") res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ```shell curl -X GET "https://api.sportradar.us/nhl-images-t3/usat/actionshots/events/2017/1/24/1f9e876e-cb2e-40c5-94b2-059111293d4b/original.jpg?api_key={your_api_key}" ``` This endpoint retrieves Daily Event Images. https://api.sportradar.us/`{sport}`-images-`{access_level}{version}`/`{provider}`/`{league}`/`{image_type}`/events/`{year}`/`{month}`/`{day}`/`{asset_id}`/`{filename}`.`{format}`?api_key=`{your_api_key}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `sport` | Abbreviation for the specified sport: nfl, mlb, nba, nhl, ncaafb, ncaamb, ncaawb, hockey, nascar, baseball, basketball, mls, soccer, tennis, boxing, ufc, f1, world-rally, indycar, rugby, cricket, olympics, handball, volleyball, or badminton. | | `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: 3). | | `provider` | News provider: Reuters (reuters), USA Today (usat), Associated Press (ap), or Getty (getty). | | `league` | Only required for International Soccer, International Baseball, International Basketball, or International Hockey. League name: bundesliga, epl, serie-a, la-liga, ligue-1, europa-league, uefa-champions-league, world-cup, intl-soccer, sco-premiership, ned-eredivisie, bel-first-division-a, prt-primeira-liga, tur-super-lig, euroleague, intl-basketball, intl_baseball, khl, beach, or indoor. | | `image_type` | Type of images: actionshots | | `year` | Year in 4 digit format (YYYY). | | `month` | Month in 2 digit format (MM). | | `day` | Day in 2 digit format (DD). | | `asset_id` | ID for a given asset (see manifest). | | `filename` | Name of the file (see manifest). | | `format` | xml or json. | | `your_api_key` | Your API key. | To retrieve the XML Schema Definition (.xsd) for Daily Event Images, replace the parameters in the following URL. https://api.sportradar.us/`{sport}`-images-`{access_level}{version}`/`{provider}`/`{league}`/schema/manifest-v2.5.xsd?api_key=`{your_api_key}` ## Player Manifests ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/nfl-images-t3/ap/headshots/players/2016/manifest.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", "/nfl-images-t3/ap/headshots/players/2016/manifest.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/nfl-images-t3/ap/headshots/players/2016/manifest.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. This endpoint retrieves Player Manifests. https://api.sportradar.us/`{sport}`-images-`{access_level}{version}`/`{provider}`/`{league}`/`{image_type}`/players/`{year}`/manifest.`{format}`?api_key=`{your_api_key}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `sport` | Abbreviation for the specified sport: golf, mlb, nascar, nfl, nba, nhl, ncaafb, ncaamb, mls, soccer, tennis, or f1. | | `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: 3). | | `provider` | News provider: Reuters (reuters), USA Today (usat), USA Today Premium (usat_premium), Associated Press (ap), Associated Press Premium (ap_premium), Getty (getty), or Getty Premium (getty_premium). | | `league` | Only required for International Soccer or Golf. League name: bundesliga, world-cup, epl, serie-a, la-liga, ligue-1, or pga. | | `image_type` | Type of images: headshots. | | `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 Player Manifests, replace the parameters in the following URL. https://api.sportradar.us/`{sport}`-images-`{access_level}{version}`/`{provider}`/`{league}`/schema/manifest-v2.5.xsd?api_key=`{your_api_key}` ## Player Images ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/nfl-images-t3/ap/headshots/players/000b5aca-724b-4768-a5d5-127d1e7cef02/original.jpg?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", "/nfl-images-t3/ap/headshots/players/000b5aca-724b-4768-a5d5-127d1e7cef02/original.jpg?api_key={your_api_key}") res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ```shell curl -X GET "https://api.sportradar.us/nfl-images-t3/ap/headshots/players/000b5aca-724b-4768-a5d5-127d1e7cef02/original.jpg?api_key={your_api_key}" ``` > The above command returns an image like this. This endpoint retrieves Player Images. https://api.sportradar.us/`{sport}`-images-`{access_level}{version}`/`{provider}`/`{league}`/`{image_type}`/players/`{asset_id}`/`{filename}`.jpg?api_key=`{your_api_key}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `sport` | Abbreviation for the specified sport: golf, mlb, nascar, nfl, nba, nhl, ncaafb, ncaamb, mls, soccer, tennis, or f1. | | `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: 3). | | `provider` | News provider: Reuters (reuters), USA Today (usat), USA Today Premium (usat_premium), Associated Press (ap), Associated Press Premium (ap_premium), Getty (getty), or Getty Premium (getty_premium). | | `league` | Only required for International Soccer or Golf. League name: bundesliga, world-cup, epl, serie-a, la-liga, ligue-1, or pga. | | `image_type` | Type of images: headshots. | | `asset_id` | ID for a given asset (see manifest). | | `filename` | Name of the file (see manifest). | | `your_api_key` | Your API key. | ## Coach Manifests ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/mlb-images-t3/usat/headshots/coaches/2017/manifest.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", "/mlb-images-t3/usat/headshots/coaches/2017/manifest.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/mlb-images-t3/usat/headshots/coaches/2017/manifest.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. This endpoint retrieves Coaches Manifests. https://api.sportradar.us/`{sport}`-images-`{access_level}{version}`/`{provider}`/`{league}`/`{image_type}`/coaches/`{year}`/manifest.`{format}`?api_key=`{your_api_key}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `sport` | Abbreviation for the specified sport: mlb, nfl, nhl. | | `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: 3). | | `provider` | News provider: USA Today (usat). | | `image_type` | Type of images: headshots. | | `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 Coaches Manifests, replace the parameters in the following URL. https://api.sportradar.us/`{sport}`-images-`{access_level}{version}`/`{provider}`/`{league}`/schema/manifest-v2.5.xsd?api_key=`{your_api_key}` ## Coach Images ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/mlb-images-t3/usat/headshots/coaches/f2e5ff64-af7d-40ce-9f38-15332b8a2538/original.jpg?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", "/mlb-images-t3/usat/headshots/coaches/f2e5ff64-af7d-40ce-9f38-15332b8a2538/original.jpg?api_key={your_api_key}") res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ```shell curl -X GET "https://api.sportradar.us/mlb-images-t3/usat/headshots/coaches/f2e5ff64-af7d-40ce-9f38-15332b8a2538/original.jpg?api_key={your_api_key}" ``` > The above command returns an image like this. This endpoint retrieves Coach Images. https://api.sportradar.us/`{sport}`-images-`{access_level}{version}`/`{provider}`/`{league}`/`{image_type}`/coaches/`{asset_id}`/`{filename}`.jpg?api_key=`{your_api_key}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `sport` | Abbreviation for the specified sport: mlb, nfl, nhl. | | `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: 3). | | `provider` | News provider: USA Today (usat). | | `image_type` | Type of images: headshots. | | `asset_id` | ID for a given asset (see manifest). | | `filename` | Name of the file (see manifest). | | `your_api_key` | Your API key. | ## Venue Manifests ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/nfl-images-t3/usat/venues/manifest.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", "/nfl-images-t3/usat/venues/manifest.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/nfl-images-t3/usat/venues/manifest.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. This endpoint retrieves Venue Manifests. https://api.sportradar.us/`{sport}`-images-`{access_level}{version}`/`{provider}`/venues/manifest.`{format}`?api_key=`{your_api_key}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `sport` | Abbreviation for the specified sport: mlb, nfl, nba, nhl, or nascar. | | `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: 3). | | `provider` | Provider: USA Today (usat), Associated Press (ap), or Getty (getty). | | `format` | xml or json. | | `your_api_key` | Your API key. | To retrieve the XML Schema Definition (.xsd) for the Venue Manifests, replace the parameters in the following URL. https://api.sportradar.us/`{sport}`-images-`{access_level}{version}`/`{provider}`/schema/manifest-v2.5.xsd?api_key=`{your_api_key}` ## Venue Images ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/nfl-images-t3/usat/venues/066080b7-9d21-49ca-a5f4-a255cc728722/original.jpg?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", "/nfl-images-t3/usat/venues/066080b7-9d21-49ca-a5f4-a255cc728722/original.jpg?api_key={your_api_key}") res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ```shell curl -X GET "https://api.sportradar.us/nfl-images-t3/usat/venues/066080b7-9d21-49ca-a5f4-a255cc728722/original.jpg?api_key={your_api_key}" ``` > The above command returns an image like this. This endpoint retrieves Venue Images. https://api.sportradar.us/`{sport}`-images-`{access_level}{version}`/`{provider}`/venues/`{asset_id}`/`{filename}`.jpg?api_key=`{your_api_key}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `sport` | Abbreviation for the specified sport: mlb, nfl, nba, nhl, or nascar. | | `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: 3). | | `provider` | Provider: USA Today (usat), Associated Press (ap), or Getty (getty). | | `asset_id` | ID for a given asset (see manifest). | | `filename` | Name of the file (see manifest). | | `your_api_key` | Your API key. | ## Logo Manifests ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/nfl-images-t3/ap/logos/2017/manifest.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", "/nfl-images-t3/ap/logos/2017/manifest.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/nfl-images-t3/ap/logos/2017/manifest.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. This endpoint retrieves Logo Manifests. https://api.sportradar.us/`{sport}`-images-`{access_level}{version}`/`{provider}`/`{league}`/logos/`{year}`/manifest.`{format}`?api_key=`{your_api_key}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `sport` | Abbreviation for the specified sport: mlb, nfl, nba, nhl, ncaafb, ncaamb, ncaawb, ncaamh, tennis, or soccer. | | `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: 3). | | `provider` | News provider: Associated Press (ap). | | `league` | Only required for Soccer. League name: bundesliga, epl, serie-a, la-liga, ligue-1, or mls. | | `year` | Year in 4 digit format (YYYY). |
Note: Year is not required when using trial access. | `format` | xml or json. | | `your_api_key` | Your API key. | To retrieve the XML Schema Definition (.xsd) for the Logo Manifests, replace the parameters in the following URL. https://api.sportradar.us/`{sport}`-images-`{access_level}{version}`/`{provider}`/`{league}`/schema/manifest-v2.5.xsd?api_key=`{your_api_key}` ## Logo Images ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/nfl-images-t3/ap/logos/1bcd10ac-11e1-4373-89df-c77ee52f0f05/original.jpg?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", "/nfl-images-t3/ap/logos/1bcd10ac-11e1-4373-89df-c77ee52f0f05/original.jpg?api_key={your_api_key}") res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ```shell curl -X GET "https://api.sportradar.us/nfl-images-t3/ap/logos/1bcd10ac-11e1-4373-89df-c77ee52f0f05/original.jpg?api_key={your_api_key}" ``` > The above command can return 4 types of images: regular logos, transparent logos, text logos, and transparent text logos. This endpoint retrieves Logo Images. https://api.sportradar.us/`{sport}`-images-`{access_level}{version}`/`{provider}`/`{league}`/logos/`{asset_id}`/`{filename}`.jpg?api_key=`{your_api_key}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `sport` | Abbreviation for the specified sport: mlb, nfl, nba, nhl, ncaafb, ncaamb, ncaawb, ncaamh, tennis, or soccer. | | `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: 3). | | `provider` | News provider: Associated Press (ap). | | `league` | Only required for Soccer. League name: bundesliga, epl, serie-a, la-liga, ligue-1, or mls. | | `asset_id` | ID for a given asset (see manifest). | | `filename` | Name of the file (see manifest). | | `your_api_key` | Your API key. | ## Country Flags Manifest ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/flags-images-t3/sr/country-flags/flags/manifest.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", "/flags-images-t3/sr/country-flags/flags/manifest.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/flags-images-t3/sr/country-flags/flags/manifest.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. This endpoint retrieves the Country Flag manifest. https://api.sportradar.us/flags-images-`{access_level}{version}`/sr/country-flags/flags/manifest.`{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 (p) or Trial (t). | | `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 Country Flag manifest use the following URL. http://feed.elasticstats.com/schema/assets/manifest-v2.5.xsd ## Country Flag Images ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/flags-images-t3/sr/country-flags/flags/bd8d501f-fdf1-48ce-8085-4aad5aa2afd5/original.svg?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", "/flags-images-t3/sr/country-flags/flags/bd8d501f-fdf1-48ce-8085-4aad5aa2afd5/original.svg?api_key={your_api_key}") res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ```shell curl -X GET "https://api.sportradar.us/flags-images-t3/sr/country-flags/flags/bd8d501f-fdf1-48ce-8085-4aad5aa2afd5/original.svg?api_key={your_api_key}" ``` > The above command returns a country flag in svg format. This endpoint retrieves a country flag. https://api.sportradar.us/flags-images-`{access_level}{version}`/sr/country-flags/flags/`{flag_id}`/original.svg?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 (p) or Trial (t). | | `version` | Version number of the API you are accessing (Current Version: 3). | | `flag_id` | ID for a given flag (see manifest). | | `your_api_key` | Your API key. |