Home/Docs/Response examples

Response examples

Last updated 2026-10-30

Every successful response is JSON with success and a data array. For odds, each event has teams, a UTC start_time and a books array; each book entry has one market, an updated_at timestamp and its outcomes with prices.

Odds response

curl -H "x-api-key: YOUR_API_KEY" "https://api.bettingdataapi.com/odds/?sport_key=basketball_nba&markets=h2h"
{
  "success": true,
  "data": [
    {
      "event_id": "a1b2c3d4",
      "sport": "basketball",
      "league": "NBA",
      "home_team": "Los Angeles Lakers",
      "away_team": "Boston Celtics",
      "start_time": "2026-05-27T23:40:00Z",
      "books": [
        {
          "book": "draftkings",
          "market": "h2h",
          "updated_at": "2026-05-27T22:10:01Z",
          "outcomes": [
            { "name": "Los Angeles Lakers", "price": -110 },
            { "name": "Boston Celtics", "price": -110 }
          ]
        }
      ]
    }
  ]
}

Abridged: real responses contain every event and every book your plan can access.

Fields

FieldMeaning
event_idStable id for the game. Pass it as event_id to filter later calls.
sport, leagueSport family and league label.
home_team, away_teamTeam or competitor names.
start_timeScheduled start, ISO 8601 UTC.
books[].bookBookmaker key, usable in the bookmakers filter.
books[].marketh2h, spreads or totals.
books[].updated_atWhen this book's price last changed in our data, ISO 8601 UTC.
outcomes[].priceAmerican odds by default. Add oddsFormat=decimal for decimal.

Price formats

oddsFormat=american (default) returns prices like -110 or +145. oddsFormat=decimal returns 1.909 or 2.45. Convert by hand with the odds converter.

Usage headers

X-RateLimit-Limit: 667
X-RateLimit-Used: 42
X-RateLimit-Remaining: 625
X-RateLimit-Reset: 1793059200

Error response

{"detail":"Missing API key. Provide it via the `x-api-key` HTTP header (recommended), ..."}

All error codes: errors. Every endpoint and parameter: API reference.

Try it with a free key

25 requests per day, NFL, NBA and MLB moneylines, no credit card.

Get a free API key