Bet9ja APIsports.bet9ja.com ↗
Fetch Bet9ja pre-match and live odds, browse events by sport and day, and generate real Bet9ja booking codes via a clean REST API.
What is the Bet9ja API?
The Bet9ja Sports API exposes 4 endpoints covering sports listings, pre-match event programmes, full per-event market odds, and booking code creation directly against sports.bet9ja.com. Use get_prematch_events to browse upcoming fixtures filtered by sport and calendar day, get_event_odds to retrieve every market Bet9ja prices for a given event (pre-match or live), and create_booking_code to produce real shareable bet slips with a working share URL.
No input parameters required.
curl -X GET 'https://api.parse.bot/scraper/06b89e2f-70ca-4807-ae70-8bb270920e78/list_sports' \ -H 'X-API-Key: $PARSE_API_KEY'
Returns every sport currently carried in Bet9ja's pre-match programme with its numeric sport_id, display name and the number of upcoming events. One cheap round trip; use sport_id values from here as the sport filter of get_prematch_events. Sports flagged is_antepost are outright/antepost programmes, not fixtures.
No input parameters required.
{
"type": "object",
"fields": {
"total": "number of sports returned",
"sports": "array of sports: sport_id (integer, Bet9ja sport id), name, event_count (upcoming events in the programme), is_antepost (boolean), priority (site display order)"
},
"sample": {
"data": {
"total": 47,
"sports": [
{
"name": "Soccer",
"priority": 1,
"sport_id": 1,
"event_count": 3183,
"is_antepost": false
},
{
"name": "Tennis",
"priority": 3,
"sport_id": 5,
"event_count": 101,
"is_antepost": false
}
]
},
"status": "success"
}
}About the Bet9ja API
Sports and Event Discovery
list_sports returns every sport currently in Bet9ja's pre-match programme, including each sport's numeric sport_id, display name, event_count, and an is_antepost flag that marks outright markets. Use the returned sport_id values directly as the sport_id filter in get_prematch_events. get_prematch_events accepts a day_offset (0 = today UTC, up to 6) and a sport_id, and returns a paginated list of upcoming fixtures ordered by kickoff time. Each event record includes event_id, home_team, away_team, start_time_utc, league, country, market_count, and headline market odds. The page_size parameter is clamped to 200; values above that are silently reduced.
Full Market Odds
get_event_odds accepts a single required event_id — from either pre-match listings or a known live event id — and returns the complete market list Bet9ja currently prices. Pre-match markets include market_id, market_key, name, description, category, and priority. Each market contains lines, where a line carries a specifier (e.g. a handicap value or total goals threshold), a selection_id, and the current odds. The is_live boolean in the response distinguishes in-play pricing from pre-match pricing; live events use Bet9ja's own 3000xxx sport_id range and do not return country.
Booking Code Creation
create_booking_code takes one or more comma-separated selection_id values (the format 827458132$S_1X2_ comes directly from get_event_odds selection fields) plus an optional stake in Nigerian Naira. The response includes the booking_code itself, a ready-to-use share_url that opens the slip on sports.bet9ja.com, total_odds (the product of all selection odds), potential_win, and a decoded object that mirrors what Bet9ja records: bet_type, booked_at_utc, and per-leg details. The bet_type field is 'single' for one selection, 'multiple' for parlays.
The Bet9ja API is a managed, monitored endpoint for sports.bet9ja.com — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when sports.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 sports.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.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Aggregate Bet9ja pre-match odds into a multi-bookmaker odds comparison tool, using
get_event_oddsmarket lines - Build a bet-sharing app where users construct slips and receive a
share_urlgenerated bycreate_booking_code - Monitor line movement on specific Bet9ja markets by polling
get_event_oddsat intervals and comparing selection odds - Populate a fixture calendar with Bet9ja's programme using
get_prematch_eventsfiltered bysport_idandday_offset - Calculate expected parlay payouts by combining
total_oddsandpotential_winfromcreate_booking_codebefore finalising a slip - Track how many markets Bet9ja offers per sport by reading
market_countacross events returned byget_prematch_events
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 200 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
| Team | $300/mo | 20,000 | 300 req/min |
| Company | $1,000/mo | 100,000 | 500 req/min |
Each endpoint has a fixed posted price per successful call — most fall between 1 and 10 credits — shown on this API's page before you run it. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does Bet9ja provide an official public developer API?+
What does `get_event_odds` return differently for live versus pre-match events?+
get_event_odds sets is_live: true for in-play events and uses Bet9ja's 3000xxx sport id range in the sport_id field. Live event responses also return country as null, whereas pre-match events include the league's country. The set of markets and lines available for live events reflects Bet9ja's current in-play pricing and typically differs from the pre-match market list for the same fixture.How does pagination work in `get_prematch_events`, and what are the day range limits?+
get_prematch_events uses 1-based page numbering. The has_more boolean in the response tells you whether another page exists. The page_size is clamped to 200 server-side; values above that are silently reduced. The day_offset parameter accepts 0 (today UTC) through 6; any value above 6 is rejected. The total field gives the full count of events for the selected sport and day, letting you calculate total pages without exhausting all requests.Does the API cover historical match results or settled bet data?+
day_offset) and in-play pricing, plus booking code creation. Historical results, settled odds, and past match data are not included. You can fork this API on Parse and revise it to add an endpoint targeting Bet9ja's results section.