Discover/Bet9ja API
live

Bet9ja APIbet9ja.com

Access Bet9ja live sports events, real-time odds across 30–400+ markets per match, and booking code creation/decoding via 4 structured API endpoints.

Endpoint health
verified 1h ago
decode_booking_code
get_live_events
create_booking_code
get_event_odds
2/4 passing latest checkself-healing
Endpoints
4
Updated
5h ago

What is the Bet9ja API?

The Bet9ja API gives developers access to 4 endpoints covering live sports events, per-event betting markets, and booking code management on the Bet9ja platform. The get_live_events endpoint returns all currently live matches with basic odds (1X2, Double Chance, Over/Under), competition group metadata, and sport-level event counts. The get_event_odds endpoint drills into a single live event and can return 400+ individual odds values across all active markets.

Try it
Internal sport ID to filter events. Use the sport IDs returned in the sports dictionary (e.g. '3000001' for Soccer, '3000005' for Tennis).
api.parse.bot/scraper/a7a733b2-d9c6-41da-aae1-f1c963063c45/<endpoint>
Ready to send
Fill in the parameters and hit sign in to send to see live response data here.
Call it over HTTPgrab a free API key at signup
curl -X GET 'https://api.parse.bot/scraper/a7a733b2-d9c6-41da-aae1-f1c963063c45/get_live_events?sport_id=3000001' \
  -H 'X-API-Key: $PARSE_API_KEY'
Python SDK · recommended

Typed, relational, agent-ready

A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.

  • Fully typed · autocompletes
  • Objects link to objects
  • Typed errors & pagination

Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:

uv add parse-sdk
uv run parse init
uv run parse add --marketplace bet9ja-com-api

uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.


"""Walkthrough: Bet9ja SDK — live events, odds, and booking codes."""
from parse_apis.bet9ja_com_api import Bet9ja, EventNotFound

client = Bet9ja()

# List live events (capped at 5 for this walkthrough)
for event in client.live_events.list(sport_id="3000001", limit=5):
    print(event.name, event.status.score, event.market_count)

# Drill into one event's full odds
event = client.live_events.list(limit=1).first()
if event:
    detail = event.detail()
    print(detail.name, detail.total_odds, "odds across", detail.market_count, "markets")

# Create a booking from the first event's 1X2 home win odds
if event:
    import json
    sel = json.dumps([{
        "event_id": str(event.event_id),
        "market_key": "LIVES_1X2_1",
        "odd_value": detail.odds.get("LIVES_1X2_1", 1.5),
        "event_name": event.name,
    }])
    booking = client.bookings.create(selections=sel, stake=500)
    print(booking.booking_code, booking.bet_type, booking.selections[0].odd_value)

    # Decode the booking code we just created
    decoded = client.bookings.get(booking_code=booking.booking_code)
    print(decoded.booking_code, decoded.total_selections, decoded.selections[0].market_name)

# Typed error handling: attempt to fetch a non-existent event
try:
    client.event_details.get(event_id="999999999")
except EventNotFound as exc:
    print(f"Not found: {exc}")

print("exercised: live_events.list / detail / bookings.create / bookings.get / event_details.get")
All endpoints · 4 totalmissing one? ·

Retrieve all currently live sporting events with their basic odds (1X2, Double Chance, Over/Under, etc.). Returns sports categories, competition groups, and events with real-time status including score and match time. Optionally filter by sport_id to narrow results to a single sport.

Input
ParamTypeDescription
sport_idstringInternal sport ID to filter events. Use the sport IDs returned in the sports dictionary (e.g. '3000001' for Soccer, '3000005' for Tennis).
Response
{
  "type": "object",
  "fields": {
    "events": "array of live event objects with odds",
    "groups": "object mapping group IDs to competition group metadata (id, name, sport, sport_id)",
    "sports": "object mapping sport IDs to sport metadata (id, name, sport_type_id, event_count)",
    "total_events": "integer"
  },
  "sample": {
    "events": [
      {
        "name": "Cafe Sidama - Welwalo Adigrat University",
        "odds": {
          "LIVES_1X2_1": 1.87,
          "LIVES_1X2_2": 4.75,
          "LIVES_1X2_X": 2.8
        },
        "status": {
          "time": "09'",
          "score": "0-0",
          "period": "1st Half"
        },
        "event_id": 9683346,
        "group_id": 47202,
        "sport_id": 3000001,
        "start_date": "2026-07-09 08:00:00",
        "market_count": 120
      }
    ],
    "groups": {
      "49385": {
        "id": "49385",
        "name": "World Cup-Zoom",
        "sport": "Soccer",
        "sport_id": 3000001
      }
    },
    "sports": {
      "3000001": {
        "id": "3000001",
        "name": "Soccer",
        "event_count": 108,
        "sport_type_id": "1"
      }
    },
    "total_events": 108
  }
}

About the Bet9ja API

Live Events and Odds

The get_live_events endpoint returns three top-level objects: events (an array of live event objects with embedded basic odds), groups (a map of group IDs to competition metadata including name, sport, and sport_id), and sports (a map of sport IDs to metadata including name, sport_type_id, and event_count). An optional sport_id parameter filters the response to a single sport — pass '3000001' for soccer, for example. The total_events integer tells you the full count before iterating the array.

Per-Event Market Data

get_event_odds takes a required event_id (obtained from get_live_events) and returns the full market tree for that live event. The markets object maps each market ID to its name, description, category, selections, and selection_keys. The companion odds object maps those selection keys directly to decimal odds values. Match context is available in status (containing time, period, and score), group_name, start_date, and sport_id. market_count and total_odds summarize the depth of the response — soccer matches commonly exceed 30 markets and 100+ selections.

Booking Code Workflow

create_booking_code accepts a JSON array of selections — each containing event_id, market_key, sign, and odd_value sourced from get_event_odds — plus an optional stake in NGN. It returns a booking_code string alongside a coupon_id, bet_type (3 for single, 4 for multiple), and the full selection detail array. decode_booking_code reverses this: supply any alphanumeric booking_code and receive the complete betslip including event_name, group_name, market_name, sport_name, odd_value, and scheduled start times for every selection.

Reliability & maintenanceVerified

The Bet9ja API is a managed, monitored endpoint for bet9ja.com — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when bet9ja.com changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.

This isn't an official bet9ja.com API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.

Last verified
1h ago
Latest check
2/4 endpoints passing
Maintenance
Monitored & self-healing
Will this API break when the source site changes?+
It's built not to. Every endpoint is health-checked on a schedule with automated test probes. When the source site changes and a check fails, the API is automatically queued for repair and re-verified — that's the self-healing layer. Each API page shows when its endpoints were last verified. And because marketplace APIs are shared, any fix reaches everyone using it.
Is this an official API from the source site?+
No — Parse APIs are independent, managed REST wrappers over publicly available data. That is the point: where a site has no official API (or only a limited one), Parse gives you a maintained, monitored endpoint for that data and keeps it working as the site changes — so you get a stable contract over a source that never promised one.
Can I fix or extend this API myself if I need a new endpoint or field?+
Yes — and you don't have to wait on us. This API was generated by the Parse agent, which stays attached. Describe the change in plain English ("add an endpoint that returns reviews", "fix the price field") in the revise box on the API page or via the revise_api MCP tool, and the agent rebuilds it against the live site in minutes. Contributing the change back to the public API is free.
What happens if I call an endpoint that has an issue?+
Errors are machine-readable: a bad call returns a clean status with the list of available endpoints and a repair hint, so an agent (or you) can recover or trigger a fix instead of failing silently. Confirmed failures feed the automatic repair queue.
Common use cases
  • Displaying a live odds widget filtered by sport using the sport_id parameter in get_live_events
  • Building a bet comparison tool that monitors decimal odds changes across 400+ markets per match via get_event_odds
  • Generating shareable booking codes for multi-leg accumulators using create_booking_code with a selections array
  • Decoding user-submitted booking codes to verify bet details and odds before accepting them in a social betting app
  • Tracking live match state (score, period, elapsed time) from the status object returned by get_event_odds
  • Aggregating event_count per sport from the sports dictionary to build a live sports activity dashboard
  • Storing betslip history by persisting coupon_id and selection data returned from create_booking_code
Pricing & limitsSee full pricing →
TierPriceCredits/monthRate limit
Free$0/mo1005 req/min
Hobby$30/mo1,00020 req/min
Developer$100/mo5,000100 req/min

One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.

Frequently asked questions
Does Bet9ja offer an official public developer API?+
Bet9ja does not publish an official public developer API or developer portal. This Parse API provides structured access to live event and odds data from the platform.
What does `get_event_odds` return beyond basic 1X2 odds?+
It returns every active betting market for a live event, structured as a markets object (with name, description, category, selections, and selection_keys per market) and a flat odds object keyed by selection key. For a typical soccer match this covers 30+ markets — correct score, both teams to score, Asian handicap, and more. The market_count and total_odds fields summarize the depth of the response.
Are pre-match or upcoming events covered, or only live events?+
The API currently covers live events only — get_live_events returns events that are in-play at the time of the request, and get_event_odds requires the event_id to belong to a currently live event. Pre-match odds and scheduled fixtures are not covered. You can fork the API on Parse and revise it to add an endpoint targeting upcoming events.
Can I look up historical betting results or settled coupon outcomes?+
Not currently. The decode_booking_code endpoint returns the selections, odds, and event details stored on the coupon at creation time, but does not include settlement status or historical match results. You can fork the API on Parse and revise it to add an endpoint that retrieves settled coupon data.
Is the `sport_id` filter on `get_live_events` required, and how do I find valid IDs?+
The sport_id parameter is optional. Omitting it returns all live events across every sport. Valid sport IDs are included in the sports dictionary of any get_live_events response — each entry contains an id field (e.g. '3000001' for soccer) that you can pass back as the filter on subsequent calls.
Page content last updated . Spec covers 4 endpoints from bet9ja.com.
Bet9ja API – Live Odds & Booking Codes · Parse