Answer

How to get NFL odds in Python

A copy-paste Python example that fetches live NFL moneylines, spreads, and totals with the requests library.

How do I get NFL odds in Python?

Use the requests library to call GET /v1/sports/americanfootball_nfl/odds with an X-API-Key header. The response is JSON: a list of games, each carrying bookmakers, markets, and current prices. A free ParlayAPI key includes 1,000 credits per month, and one single-region h2h request costs one credit.

More detail

The sport key for the NFL is americanfootball_nfl. Add regions and markets query parameters to control what comes back: regions=us with markets=h2h,spreads,totals covers the standard pregame board. Each game object lists bookmakers, and each bookmaker lists its markets and outcomes with the price that book is actually publishing.

For player props, switch to /v1/sports/americanfootball_nfl/props and filter with the markets parameter, for example markets=player_pass_yds. For college football use americanfootball_ncaaf with the same shapes.

If you already have code written for the-odds-api, the request and response shapes are compatible: point the base URL at parlay-api.com and keep your apiKey parameter or switch to the X-API-Key header.

Endpoint

GET /v1/sports/americanfootball_nfl/odds

import requests

resp = requests.get(
    "https://parlay-api.com/v1/sports/americanfootball_nfl/odds",
    params={"regions": "us", "markets": "h2h,spreads,totals"},
    headers={"X-API-Key": "YOUR_KEY"},
)
for game in resp.json():
    print(game["home_team"], "vs", game["away_team"])

Why developers use it

FAQ

What is the NFL sport key?

americanfootball_nfl for the NFL and americanfootball_ncaaf for college football. The full list comes from GET /v1/sports.

How do I get NFL player props in Python?

Call GET /v1/sports/americanfootball_nfl/props with a markets filter such as player_pass_yds or player_rush_yds, using the same X-API-Key header.

Do I need a paid plan to pull NFL odds?

No. The free tier's 1,000 monthly credits cover roughly 30 single-region three-market board pulls per day, enough for development and small projects.

Related

/answers/nfl-player-props-api/docs/cookbook/from-the-odds-api