Skip to main content
V1 line endpoints use a flat line-based model with separate moneyline, spread, and total objects. For new integrations, use the V2 Markets endpoints which provide a more flexible market-based structure.
V1 REST GET endpoints that return odds accept the optional odds_format query parameter. It defaults to american; see Choose an odds format for supported values and which response fields change.

Overview

The V1 lines endpoints return the recorded price history of one sportsbook’s line (moneyline, spread, total, team total) for an event, and compute best-available lines across sportsbooks.

The {id} path parameter is a line ID, not an event ID

/api/v1/lines/{id}/moneyline, /spread, /total, and /team_total look up prices by line ID. A line ID identifies one sportsbook’s line for one event, so each request returns that one sportsbook’s prices. Passing an event ID does not work: it returns an empty array or 404. Get the line ID from a V1 event response, such as GET /api/v1/events/{eventId} or GET /api/v1/sports/{sportID}/events/{date}:
  • lines.{affiliate_id}.line_id (the same value appears as lines.{affiliate_id}.moneyline.line_id, .spread.line_id, and .total.line_id), or
  • with include=all_periods, line_periods.{affiliate_id}.{period}.moneyline.line_id. Every period of a sportsbook’s line uses the same line ID, so any period gives you the value you need.
To get every sportsbook’s history for an event, call the endpoint once per line_id.

Price history and row limits

These endpoints return price history, not just the current price. Rows come back newest first (by date_updated). Each period table is capped at the newest 1,000 rows, and there is no pagination, offset, or cursor to fetch older rows. Your plan’s sportsbook access and data delay also apply.

The include=all_periods parameter

Without include, the response contains only the pregame full-game history in a flat array (moneylines, spreads, or totals). In-play prices and period lines are not included. With include=all_periods, the response is grouped by period under moneyline_periods, spread_periods, or total_periods: All in-play rows are returned together under period_live_full_game. Use each row’s period_id and period_description to tell them apart: Each live period is read separately (newest 1,000 rows each) and then combined, so period_live_full_game is not sorted as a whole. Sort by date_updated if you need one timeline. Keys with no data are omitted. Live rows are returned only when your subscription includes live odds access. Without it, the live keys are left out and only pregame periods come back.
For full in-play history, use V2. V1 caps each period at 1,000 rows with no paging, so a busy game can lose its earliest in-play prices. GET /api/v2/events/{event_id}/markets/history?market_ids=41,42,43,96&affiliate_ids=19 returns live moneyline, spread, total, and team-total history. You can walk through the game in time windows with from and to, and limit goes up to 5000 rows (default 1000). On this endpoint, ask for the live market IDs 41,42,43,96 explicitly: requesting 1,2,3 does not add them. affiliate_ids is required (1 to 3 sportsbooks). See Historical Odds.

Store your key in the THERUNDOWN_API_KEY environment variable and send it in the X-TheRundown-Key header. Legacy query authentication remains available for compatibility; use header authentication for new integrations. Do not put keys in URLs.

Endpoints

Returns the price history of one sportsbook’s moneyline, newest first. Without include, only pregame full-game rows are returned.

Parameters

Response

With include=all_periods:
Returns the price history of one sportsbook’s point spread, newest first. Without include, only pregame full-game rows are returned.

Parameters

Response

Without include, rows are in spreads. With include=all_periods, they are grouped under spread_periods using the same period keys as moneylines.
Returns the price history of one sportsbook’s total (over/under), newest first. Without include, only pregame full-game rows are returned.

Parameters

Response

Without include, rows are in totals. With include=all_periods, they are grouped under total_periods using the same period keys as moneylines.
Returns one sportsbook’s team total lines (how many points or goals a single team will score) for the line ID.
V1 team-total rows are not updated for current events, so this route currently returns no rows: {}, or empty team_total_periods_away and team_total_periods_home objects with include=all_periods. For current team totals, use V2 market 94 (Team Totals) on the V2 event endpoints.

Parameters

Computes the best available line across all tracked sportsbooks for one or more events. Returns the most favorable moneyline, spread, and total for each side.

Parameters

The response is keyed by event ID, with each entry containing the best moneyline, spread, and total with the affiliate that offers it.

LinePeriods Structure (V1 events)

V1 event endpoints (/api/v1/events/{eventId}, /api/v1/sports/{sportID}/events/{date}, openers, and closing) accept include=all_periods too. There it adds a line_periods map with the latest price for each sportsbook and period, keyed by affiliate_id. This is where to find line IDs for the endpoints above:
Not all periods are available for all sports. For example, NHL games have three regulation periods, while NBA games have four quarters. The API returns only the periods that apply to the sport.