API de props de jugador NFL con precios Pinnacle
Respuesta: Pinnacle publica player props NFL como eventos special bajo american-football. En Builder/Pro, /v1/odds?sport=american-football los devuelve con parentId al partido. Free/Hobby son main-only.
Ejemplo#
import os, requests
from collections import defaultdict
H = {"x-api-key": os.environ["PINNFEED_KEY"]} # ps_live_...
# 1) find the NFL league id once (college football is a different league)
ev = requests.get("https://pinnfeed.io/v1/events", headers=H, timeout=10,
params={"sport": "american-football", "q": "nfl", "limit": 200}).json()["events"]
print({(e["league"]["id"], e["league"]["name"]) for e in ev if e["league"]})
LEAGUE = int(input("NFL league id: "))
# 2) games and props together (no main=true: that would drop the specials)
data = requests.get("https://pinnfeed.io/v1/odds", headers=H, timeout=15,
params={"sport": "american-football", "league": LEAGUE, "limit": 500}).json()["events"]
games = {e["id"]: e for e in data if not e.get("special")}
props = defaultdict(list)
for e in data:
if e.get("special") and e.get("parentId") in games:
props[e["parentId"]].append(e)
for gid, items in props.items():
g = games[gid]
print(f'{g["away"]} @ {g["home"]} ({len(items)} props)')
for p in items[:10]:
for m in p["markets"]:
line = " | ".join(f'{o["name"]} {o["decimal"]} (fair {o.get("fair")})' for o in m["outcomes"])
print(" ", p["special"]["description"], m["type"], m.get("line"), line)
{ "type": "subscribe", "sports": ["american-football"], "leagues": [LEAGUE_ID], "specials": true }
Relacionado: specials, NFL API.
CTA#
Builder (€99/mes). Prueba 3 días; tarjeta requerida. REST gratis: signup.
Player props de la NBA (el mismo patrón)#
Los player props de la NBA usan el mismo patrón de eventos special con parentId, en sport=basketball. Busca el id de la NBA con q=nba. No pases main=true si quieres los specials.
Preguntas frecuentes#
¿Free incluye props NFL?#
No — Builder.
¿Contenido educativo para adultos?#
Sí (18+).
Contenido educativo para mayores de 18 años. Sin pronósticos ni ganancias garantizadas. En España, apuesta solo con operadores con licencia de la DGOJ.