Betting Lines API for US Sports: Spreads, Moneylines and Totals for NFL, NBA, MLB and NHL
How US betting lines look in an odds API: which markets are the moneyline, the spread and the total, what the feed had for NFL, NBA and NHL, code that converts prices to American odds, and player props.

A betting lines API for US sports returns, for every game, the three lines an American bettor expects: the moneyline, the point spread and the total. In the SportAPI feed they are three markets with European names, Team Wins, Handicap and Total, priced in decimal odds. Your site renames them and converts the prices to American odds at display time.
On 9 November 2026 the prematch line had 14 NFL games, 13 NBA games and 10 NHL games, plus 67 college football and 36 college basketball games. One NFL game carried 49 markets with dozens of alternate spreads and totals, and separate sub-events for quarters, halves and player props. Baseball was out of season, so MLB wasn’t in the menu that day.
Below: the mapping of US terms to feed markets, working code for the three main lines, and what’s different about hockey and basketball. The feed is the Sports Odds API.
US terms and the markets in the feed
| US term | Market in the feed | Where it is |
|---|---|---|
| Moneyline | Team Wins: W1, W2 | The match list for football and basketball; the match for hockey |
| Point spread | Handicap: 1 (+3.5), 2 (-3.5) | Main line in the list, alternates in the match |
| Total, over/under | Total: Over 43.5, Under 43.5 | Main line in the list, alternates in the match |
| Team total | Total 1, Total 2 | The match list and the match |
| Three-way, regulation time | 1x2 in hockey, 1x2 In Regular Time in basketball | The match list and the match |
| Puck line | Handicap at 1.5 in a hockey match | The match |
| First half, quarter and period lines | Sub-events 1 Half, 1st quarter, 1st period | sub_games of the match |
| Player props | Sub-event Players' stats | sub_games of the match |
The first team in the feed, opp_1_name, is the home team, and W1 or the prefix 1 refers to it. US sites usually list the away team first, so swap the order when you render.
What the line had for US leagues
This is the prematch line on 9 November 2026:
| League | Sport ID | Games | Depth of a top game |
|---|---|---|---|
| NFL | 13 | 14 | 49 markets, 387 selections |
| College football (NCAA) | 13 | 67 | 8 markets, first half and quarters |
| NBA | 3 | 13 | 74 markets in the main event |
| NBA G League | 3 | 10 | — |
| College basketball (NCAA) | 3 | 36 | 10 markets |
| NHL | 2 | 10 | 139 markets, 1,042 selections |
| AHL | 2 | 11 | — |
| MLB | 5 | 0 | Out of season on that date |
American football, basketball, ice hockey and baseball are four separate sports in the API and on the plan. The numbers follow the calendar: the menu shows only tournaments that have scheduled games, so baseball returns to it with the next season’s games. Sport IDs are in the sports reference; tournament IDs come from menu.
Request the games
The SportAPI manager gives you the API domain and the key. All requests go from your server with the key in the Package header.
GET https://YOUR_API_DOMAIN/v1/events/13/0/sub/50/line/en
Package: YOUR_API_KEY
13 is American football. With 0 in place of the tournament, the prematch list returns the 50 top upcoming games of the sport; put a tournament ID from menu there to get one league in full, or add ?match=all for the whole line. The response is grouped by tournament, and every game carries its main lines in game_oc_list: one moneyline, one spread, one total and the team totals.
Build the three lines of a game
const toAmerican = (d) => {
const a = d >= 2 ? (d - 1) * 100 : -100 / (d - 1);
const r = Math.round(a);
return r > 0 ? `+${r}` : `${r}`;
};
// the three US lines of one game from the list response
function usLines(game) {
const sels = (name) => {
const m = game.game_oc_list.find((g) => g.group_name === name);
return m ? m.oc_list.flat() : [];
};
const pick = (list, prefix) => list.find((s) => s.oc_name.startsWith(prefix) && !s.oc_block);
const price = (s) => (s ? toAmerican(s.oc_rate) : null);
const points = (s) => (s ? (Number(s.oc_size) > 0 ? `+${s.oc_size}` : `${s.oc_size}`) : null);
const ml = sels('Team Wins');
const spread = sels('Handicap');
const total = sels('Total');
return {
home: game.opp_1_name,
away: game.opp_2_name,
moneyline: { home: price(pick(ml, 'W1')), away: price(pick(ml, 'W2')) },
spread: {
home: `${points(pick(spread, '1 ('))} ${price(pick(spread, '1 ('))}`,
away: `${points(pick(spread, '2 ('))} ${price(pick(spread, '2 ('))}`,
},
total: {
points: pick(total, 'Over')?.oc_size ?? null,
over: price(pick(total, 'Over')),
under: price(pick(total, 'Under')),
},
};
}
For an NFL game from that day’s line, Minnesota Vikings at home to Buffalo Bills, the function returned:
| Line | Home | Away |
|---|---|---|
| Moneyline | +149 | −178 |
| Spread | +3.5 at −122 | −3.5 at +102 |
| Total 43.5 | Over −115 | Under −105 |
The decimal prices behind it were 2.49 and 1.562 for the moneyline, 1.82 and 2.02 for the spread, 1.87 and 1.952 for the total. Keep those decimals: the American numbers are rounded and are for display only. The formulas and the rounding traps are in Odds Formats in an API.
Alternate lines, halves and quarters
The list gives one line per market. The match itself, requested with the event method, gives all of them:
GET https://YOUR_API_DOMAIN/v1/event/{gameId}/group/line/en
Package: YOUR_API_KEY
For the same NFL game the Handicap market had 73 selections and Total had 78: every alternate spread and total. Take main lines from the list and alternates from the match; the first selection in a full market is not the main line.
The match also has sub_games. For the NFL game they were the four quarters, two halves and player statistics; for an NBA game, four quarters, two halves, team statistics such as rebounds and three-pointers, and player statistics. Each sub-event has its own game_id and is requested the same way. The first quarter of the NBA game had 26 markets, the first half 27.
Player props
Player markets live in the Players' stats sub-event. That day it contained:
| League | Markets | Examples |
|---|---|---|
| NFL | 28 | Passing, rushing and receiving yards, receptions, touchdown passes, anytime and first touchdown scorer |
| NBA | 32 | Points, rebounds, assists, three-pointers, combined totals, double-double and triple-double |
| NHL | 12 | First and last goalscorer, player goals and points, with shots on goal in a separate sub-event |
A player selection has the player’s name and line in oc_name, the line value in oc_size and the player’s ID in op_id. Props depend on the game: a top game has hundreds of selections, while the college basketball game we opened had no sub-events at all.
What’s different in hockey and basketball
Hockey has two “winner” markets. 1x2 has a draw and refers to regulation time. Team Wins has two selections and includes overtime and the shootout; that’s the US moneyline. For one NHL game the prices were 2.80, 4.38 and 2.24 three-way, and 2.13 and 1.78 for Team Wins. The hockey list carries only the three-way market, so the function above returns an empty moneyline for it: take Team Wins from the match response.
The hockey list shows a zero handicap. The main Handicap line in the list was 0, a draw-no-bet price on regulation time. The US puck line of 1.5 is in the match response: for the same game, home +1.5 at 1.47 and away −1.5 at 2.50.
Basketball marks regulation explicitly. An NBA game has Team Wins as the moneyline and a separate 1x2 In Regular Time with a draw price. Both sports also have a “Will there be overtime” market.
Filter the aggregate events. NBA and NHL tournaments contain entries named “Home – Away”: a combined market on all games of the day. They aren’t games. Skip entries whose opp_1_name starts with “Home”, or show them as a separate special.
Which period a market is settled on is defined by the market’s rules, not by its name alone. If your product depends on it, confirm the rule for that market with the manager.
Live lines and updates
The live list is the same request with live instead of line. Poll it no more often than every 7 seconds and one open game every 5, from one backend poller that serves all users from a cache. In live a selection can be blocked for a moment; the code above already skips blocked selections. What a page does with each response is described in how in-play odds update.
Taking bets on these lines
Showing lines and taking bets are separate services. Each selection has an oc_pointer; when a player confirms a slip, your server sends the pointer with the decimal odds to the Coupon API. It checks the price, accepts singles and parlays of up to 15 selections, and after the game returns the status of every selection. Pushes on whole-number spreads and totals come back as refunds, so you don’t code those rules.
Sports betting in the United States is regulated state by state, and elsewhere country by country. Betting products are for licensed operators and adult players.
Mistakes with US lines
- Looking for a “moneyline” field. The market is
Team Wins. In hockey1x2is a different, three-way market. - Taking the first spread from the match response. It’s an alternate. Main lines are in the list.
- Storing American odds. Keep the decimal
oc_rate; convert for display. - Home and away order.
opp_1_nameis the home team. US readers expect the away team first. - Showing “Home – Away” as a game. It’s an aggregate event; filter it.
- Promising MLB in November. Leagues appear with their season. Check
menuon the date you launch.
What it costs
| What you need | Cost |
|---|---|
| The line for one sport: prematch and live, all markets and odds | from $30 a month |
| Bet acceptance and automatic settlement | from $300 a month |
| Testing before you pay | free two-day test key, all sports |
American football, basketball, ice hockey and baseball are counted as four sports. Start with the one that’s in season.
FAQ
Does the API return American odds?
No, it returns decimal odds in oc_rate. Converting to American is two formulas on your side, shown in the code above.
Which US leagues are in the feed?
On the day we checked: NFL, college football, NBA, NBA G League, college basketball, NHL and AHL. Baseball was out of season. The current list is always in menu.
Are player props included?
Yes, for games that have them: they’re in the Players' stats sub-event. Top NFL, NBA and NHL games have them; lower leagues and many college games don’t.
Does the moneyline include overtime?
Team Wins has two selections and no draw, so it covers overtime. Regulation-time results are separate three-way markets. Confirm settlement rules for the markets you rely on.
How are parlays handled?
As one bet with several selections sent to the Coupon API, up to 15 per bet. The service multiplies the prices and settles each selection.
Check tonight’s lines
Take a test key, request the list for sport 13 or 3 and run the function above over the response. You’ll get moneyline, spread and total in American odds for every game on the board; for hockey, open one game and read Team Wins and the 1.5 handicap. Ask the SportAPI manager on Telegram for the API domain and the key.