How do I get PrizePicks lines in Python?
Create a free API key, then request GET /api/v1/projections with any HTTP client and page through the results with meta.next_cursor. The script below does exactly that with only the Python standard library, and prints each player, stat, line and tier.

| League | Current lines | Players |
|---|---|---|
| NHL | 4,542 | 515 |
| NFL | 4,285 | 379 |
| College Football | 4,275 | 1,007 |
| UCL | 2,962 | 372 |
| NBA | 2,139 | 111 |
| Soccer | 831 | 94 |
| Tennis | 337 | 48 |
| College Basketball | 336 | 14 |
| CS2 | 234 | 60 |
| League of Legends | 104 | 40 |
| EUROGOLF | 55 | 30 |
| Table Tennis | 25 | 16 |
| KBO | 20 | 9 |
| WCBB | 18 | 18 |
Refreshed every few minutes. Check the timestamp on any line before you use it.
Set PRIZEPICKS_API_KEY in your environment before you run it. Add a stat or tier parameter to narrow the board. The Python guide adds error handling and retries.
Every NBA line
import json, os
from urllib.parse import urlencode
from urllib.request import Request, urlopen
KEY = os.environ["PRIZEPICKS_API_KEY"]
def board(league):
cursor = None
while True:
params = {"league": league, "limit": 200}
if cursor:
params["cursor"] = cursor
req = Request("https://prizepicksapi.com/api/v1/projections?" + urlencode(params),
headers={"Authorization": "Bearer " + KEY})
with urlopen(req, timeout=30) as res:
page = json.load(res)
yield from page["data"]
cursor = page["meta"].get("next_cursor")
if not cursor:
return
for p in board("NBA"):
print(p["player"]["name"], p["market"]["stat"], p["line"], p["selections"][0]["tier"])Go further
Related questions
All questions
Independent data service, not affiliated with PrizePicks. Information only, not betting advice.