Co API22bet.co.ke ↗
Access live sports betting data from 22Bet Kenya via 4 endpoints. Get in-play match details, odds markets, league lists, and live football match discovery.
What is the Co API?
The 22bet.co.ke API exposes live sports betting data across 4 endpoints, covering in-play match discovery, league listings, and full match details with odds markets. The get_live_match_details endpoint returns current score, match status, home and away teams, and a complete set of betting markets with prices for any live event. Data is limited to currently in-play events and updates dynamically as matches go live or conclude.
No input parameters required.
curl -X GET 'https://api.parse.bot/scraper/0982369d-a8bf-4b51-b8c2-72a75eaa7364/get_live_all_sports' \ -H 'X-API-Key: $PARSE_API_KEY'
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 22bet-co-ke-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.
"""22Bet Kenya: live sports, leagues, matches, and betting markets."""
from parse_apis.bet22_kenya_api import Bet22Kenya, MatchNotFound
client = Bet22Kenya()
# List all sports with live events — each carries match and league counts.
for sport in client.sports.list(limit=5):
print(sport.name, sport.match_count, sport.leagues_count)
# Drill into a sport's leagues via sub-resource navigation.
sport = client.sports.list(limit=1).first()
if sport:
for league in sport.leagues.list(limit=3):
print(league.name, league.game_count)
# Discover live football matches and inspect one's betting markets.
match = client.footballmatches.list(limit=1).first()
if match:
try:
detail = match.details()
print(detail.home_team, detail.score, detail.away_team, detail.status)
for market in detail.markets[:2]:
for outcome in market.outcomes:
print(outcome.type_name, outcome.price, outcome.parameter)
except MatchNotFound as exc:
print(f"Match expired: {exc}")
print("exercised: sports.list / leagues.list / footballmatches.list / match.details")
Get all sports currently having live events. Returns each sport's numeric ID, display name, total live match count, and leagues count. The list is dynamic — sports appear only when they have at least one in-play event.
No input parameters required.
{
"type": "object",
"fields": {
"sports": "array of sport objects with id, name, match_count, and leagues_count"
},
"sample": {
"data": {
"sports": [
{
"id": 1,
"name": "Football",
"match_count": 39,
"leagues_count": 24
},
{
"id": 4,
"name": "Tennis",
"match_count": 16,
"leagues_count": 8
},
{
"id": 3,
"name": "Basketball",
"match_count": 25,
"leagues_count": 15
}
]
},
"status": "success"
}
}About the Co API
Endpoints and Data Coverage
The API is built around four endpoints that work together. Start with get_live_all_sports to retrieve the current list of sports that have at least one in-play event. Each result includes a numeric id, name, match_count, and leagues_count. This list is fully dynamic — a sport only appears when it has active live events.
Use the sport_id from that response to call get_live_leagues_by_sport, which returns an array of league objects (id, name, game_count) scoped to the selected sport. For football specifically, get_live_football_matches returns every currently in-play football match with its match_id, tournament slug, and full url — making it the primary entry point for bulk football match discovery.
Match Detail and Odds Markets
Passing a match_id to get_live_match_details returns the richest data the API provides: home_team, away_team, current score formatted as home-away, status (current period), league, league_id, sport_id, and a markets array. Each market object carries a market_group_id and an outcomes array where each outcome has a type_id, type_name, price (the decimal odds), and an optional parameter (e.g. handicap lines or totals values).
Limitations and Freshness
All four endpoints reflect live, in-play state only — there is no pre-match or historical data exposed. Match IDs are ephemeral; passing a match_id for a match that has already concluded returns an input_not_found error. Coverage spans multiple sports wherever 22Bet Kenya offers in-play betting, but the available sports and leagues depend entirely on what is live at the moment of the request.
The Co API is a managed, monitored endpoint for 22bet.co.ke — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when 22bet.co.ke 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 22bet.co.ke 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?+
- Monitor real-time odds movements across all in-play football markets using
pricefields fromget_live_match_details - Build a live odds aggregator by polling
get_live_football_matchesfor active match IDs and fetching their markets - Track in-play score and match status updates for multiple sports using
scoreandstatusfields - Identify which sports and leagues are currently active by querying
get_live_all_sportsandget_live_leagues_by_sport - Detect arbitrage opportunities by comparing
pricevalues across outcomes within a match'smarketsarray - Power a live match dashboard by combining team names, current score, and market data from a single
get_live_match_detailscall
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 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.
Does 22Bet Kenya offer an official developer API?+
What does `get_live_match_details` return beyond the score?+
home_team, away_team, score (formatted as home-away), status (current match period), league, league_id, sport_id, sport_name, and a markets array. Each market includes a market_group_id and an outcomes array where every outcome carries type_id, type_name, price (decimal odds), and an optional parameter for lines such as handicaps or totals.Does the API cover pre-match or upcoming events?+
What happens if I pass a match ID for a match that has finished?+
get_live_match_details returns an input_not_found error. IDs should be refreshed by re-calling get_live_football_matches or get_live_leagues_by_sport frequently.