How to get Pinnacle odds in Python

To get Pinnacle odds in Python, you need a third-party Pinnacle odds API, because Pinnacle closed its own API to the general public on July 23, 2025. Get a free API key, send it in a request header with the requests library, and read the prices from the JSON response. The example below uses PinnFeed’s free plan, which needs only an email and returns a no-vig fair price on every outcome.

Before you start

You need Python 3 and the requests library (pip install requests). For the key, sign up at PinnFeed: it asks only for an email, and in our test on November 21, 2026, a working key was on screen about a minute later. The full key is shown once, so save it straight away in an environment variable:

export PINNFEED_KEY="your-key-here"

The free plan gives you delayed REST data (30 seconds), 1 request per second, 1,000 requests a day and 2 sports. In our test, soccer and tennis returned data and basketball returned HTTP 403 on the free key.

Step 1: Call the API

PinnFeed’s docs ask for the key in the x-api-key header. This script lists the sports and then asks for five events with main soccer markets, the same request as the quickstart:

import os
import requests

BASE_URL = "https://pinnfeed.io/v1"
HEADERS = {"x-api-key": os.environ["PINNFEED_KEY"]}


def get(path, **params):
    response = requests.get(f"{BASE_URL}{path}", headers=HEADERS, params=params, timeout=10)
    response.raise_for_status()
    return response.json()


sports = get("/sports")
odds = get("/odds", sport="soccer", main="true", limit=5)
print(sports)

Step 2: Read the prices and fair odds

In our test, every outcome in the response came with these fields: name, american, decimal, points, fair and fairProb. Rather than hard-coding the nesting of events and markets, this helper walks the response and yields every outcome that has a decimal price and a fair price:

def outcomes(node):
    if isinstance(node, dict):
        if "decimal" in node and "fair" in node:
            yield node
        for value in node.values():
            yield from outcomes(value)
    elif isinstance(node, list):
        for item in node:
            yield from outcomes(item)


for outcome in outcomes(odds):
    print(outcome.get("name"), outcome.get("points"), outcome.get("decimal"), outcome.get("fair"), outcome.get("fairProb"))

Step 3: Compare a price with Pinnacle’s fair odds

Once you have the fair price, you can check any other bookmaker’s price against it. The edge is the offered decimal odds divided by the fair odds, minus 1:

def edge(offered_decimal, fair_decimal):
    return offered_decimal / fair_decimal - 1


print(f"{edge(2.25, 2.10):.2%}")  # 7.14%

A positive number means the price is above Pinnacle’s fair line. Our no-vig calculator and EV calculator do the same math in the browser.

Limits and errors to handle

  • HTTP 403 on the free key means your plan doesn’t include that sport or feature; the WebSocket also returns 403 on Free and needs the Builder plan.
  • The response headers x-ratelimit-limit and x-ratelimit-remaining show your daily budget. In our test they matched the published 1,000 requests a day.
  • Free data is delayed 30 seconds, so don’t treat it as live.
  • Events without priced markets are left out of the default list; add include_empty=true if you need the full event list.
  • Closing prices for CLV come from /v1/closing, from the Builder plan (€99, ≈ $109, a month).

Other Pinnacle odds APIs with Python support

pinnapi, PinnOdds and PinnRadar publish Python and Node.js SDKs and share the same endpoint paths and x-portal-apikey header; none of the three names a shared operator. All three have a free plan, and none keeps a price history. The Odds API and OddsPapi carry Pinnacle among many bookmakers; on OddsPapi’s self-serve plans, Pinnacle odds arrive with a 30-second delay. See the full comparison in best Pinnacle odds API.

Related

FAQ

Is there an official Pinnacle API for Python?

Pinnacle closed its public API on July 23, 2025. Access now needs an application that its commercial team reviews, so most developers use a third-party feed.

Do I need a Pinnacle account to use these APIs?

Not for PinnFeed in our test: sign-up asked only for an email. pinnapi's site also says no Pinnacle account is needed.

Can I stream Pinnacle odds in Python?

Yes, over WebSocket on paid plans. PinnFeed's WebSocket starts at Builder; see Pinnacle odds WebSocket API.

How do I get historical Pinnacle odds in Python?

Use an API with history, such as PinnFeed's /v1/closing from Builder or a historical database. See Pinnacle historical odds.

Data last checked: