Question
How do I get FanDuel player props in Python?
Short answerCall https://fanduelapi.com/api/v1/props with the requests library and your key as a Bearer token; filter with sport, stat and player. Each row has the line, the over and under prices and a move summary.
FanDuel API is an independent data service operated by FF API Inc. It is not affiliated with, endorsed by or sponsored by FanDuel.
In more detail
Page with limit and offset until meta.has_more is false. For staying current, poll /api/v1/changes with the cursor instead of re-reading every prop.
Example
import os, requests
r = requests.get(
"https://fanduelapi.com/api/v1/props",
params={"sport": "nba", "stat": "points", "limit": 50},
headers={"Authorization": f"Bearer {os.environ['FANDUEL_API_KEY']}"},
timeout=20,
)
r.raise_for_status()
for p in r.json()["data"]:
print(p["player"], p["line"], p["over_american"], p["under_american"])