Getting Started
Quickstart
From zero to your first odds payload in about two minutes.
1. Get an API key
Create a free account in the developer dashboard and generate a sandbox key (sk_test_...). Sandbox keys return live-shaped data for a subset of events so you can build and test against the real schema. Switch to a production key (sk_live_...) when you are ready to go live.
NOTESandbox keys are rate-limited to 30 requests/minute. See Authentication for key types and Rate limits for limits.
2. List available sports
Every request sends your key in the X-API-Key header. The first call worth making returns all sports with live odds:
cURL
curl https://api.openoddsapi.com/v1/sports \
-H "X-API-Key: sk_test_your_key_here"JavaScript
const res = await fetch("https://api.openoddsapi.com/v1/sports", {
headers: { "X-API-Key": "sk_test_your_key_here" }
});
const sports = await res.json();
console.log(sports);Python
import requests
res = requests.get(
"https://api.openoddsapi.com/v1/sports",
headers={"X-API-Key": "sk_test_your_key_here"},
)
print(res.json())3. Pull NFL odds
Grab the moneyline for every upcoming NFL game. The region and odds_format query parameters control which bookmakers and price style you get back:
cURL
curl "https://api.openoddsapi.com/v1/sports/nfl/odds?market=moneyline®ion=us&odds_format=american" \
-H "X-API-Key: sk_test_your_key_here"JavaScript
const url = "https://api.openoddsapi.com/v1/sports/nfl/odds" +
"?market=moneyline®ion=us&odds_format=american";
const res = await fetch(url, {
headers: { "X-API-Key": "sk_test_your_key_here" }
});
const odds = await res.json();
console.log(odds);Python
import requests
url = "https://api.openoddsapi.com/v1/sports/nfl/odds"
res = requests.get(
url,
params={"market": "moneyline", "region": "us", "odds_format": "american"},
headers={"X-API-Key": "sk_test_your_key_here"},
)
print(res.json())The response is an array of odds records — one per bookmaker and market — with the current price and point for each outcome.