Every market one bookmaker offers on an event: main lines, alternate spreads and totals, halves / quarters / periods, team totals and player and game props, each with its outcomes, line and decimal and American prices (Pinnacle also the maximum stake; Unibet and BetRivers fractional odds and market tags; FanDuel the page tabs). Pass the book's event_id from /odds/v1/events, or a league alone for that book's next event in the league. market keeps only the markets whose name contains that text.
Every response includes credits_used: the credits this call cost.
Parameters
name
type
description
bookrequired
pinnacle | unibet | betrivers | fanduel
The bookmaker. Example: unibet
id
string
The book's event_id from /odds/v1/events.
league
string
League key. Without id: the book's next event in this league (default ufc; FanDuel: its next US game). With book=pinnacle it also finds the event faster (some regions only serve Pinnacle events through their league). Example: ufc
market
string
Keep only markets whose name, type or period contains this text (e.g. total, handicap, touchdown, player).
tab
string
FanDuel only: a tab slug from tabs (e.g. popular, player-points, 1st-quarter).
import os, requests
res = requests.get(
"https://api.api.sh/odds/v1/event",
params={"book": "unibet"},
headers={"x-api-key": os.environ["APISH_KEY"]},
timeout=120,
)
res.raise_for_status()
data = res.json()
const url = new URL("https://api.api.sh/odds/v1/event");
url.searchParams.set("book", "unibet");
const res = await fetch(url, { headers: { "x-api-key": process.env.APISH_KEY } });
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
const data = await res.json();
Response
A JSON object with the fields described above, plus raw (the source's own data), cached, fetched_at and credits_used. Errors return {"success": false, "error": "…"} with the HTTP status (see errors). A lookup that ran but found nothing (404) costs the price above; refused calls and errors on our side are free (what's charged).
The fastest way to see the full response is the playground: it runs this endpoint with your account and shows the exact JSON.