Getting Started
Coverage MatrixChange LogLog InContact Us
Getting Started

Authentication & Authorization

Authentication

Sportradar APIs use API key authentication as your unique identifier to allow access. In most cases, the api_key is sent in the query string. For our Insights APIs, the key is authenticated in the header.

API keys are randomly generated 40 characters. Please note that keys from our previous system are 24 characters.


Sample Requests

Below are example requests using API key authentication in the query.

NFL API

curl -X GET "https://api.sportradar.com/nfl/official/trial/v7/en/games/2023/reg/schedule.xml?api_key={your_api_key}"
require 'uri'
require 'net/http'
require 'openssl'

url = URI("https://api.sportradar.com/nfl/official/trial/v7/en/games/2023/reg/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
import http.client

conn = http.client.HTTPSConnection("api.sportradar.com")

conn.request("GET", "/nfl/official/trial/v7/en/games/2023/reg/schedule.xml?api_key={your_api_key}")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))

Soccer API

curl -X GET "https://api.sportradar.com/soccer/trial/v4/en/competitions.json?api_key={your_api_key}"
require 'uri'
require 'net/http'
require 'openssl'

url = URI("https://api.sportradar.com/soccer/trial/v4/en/competitions.json?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
import http.client

conn = http.client.HTTPSConnection("api.sportradar.com")

conn.request("GET", "/soccer/trial/v4/en/competitions.json?api_key={your_api_key}")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))

For proper syntax of each endpoint, visit the API Endpoint docs (NFL, Soccer).


Authorization

To authorize to our APIs you need to create an account. Sign up for a free trial or access your existing account here.

Within each application on your account is a unique master API key that is applicable across all products associated with that application. These may be licensed products or free trials.

For more information on accounts and access, see our Account Info section.