castlebet.com.na APIcastlebet.com.na ↗
Access CastleBet Namibia football betting odds via API. Retrieve match listings, detailed market odds, and competition directories for any day.
curl -X GET 'https://api.parse.bot/scraper/2d5174e3-5852-420e-b93d-a447c1dc174a/get_football_matches?day=0' \ -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 castlebet-com-na-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: CastleBet Football Odds SDK — bounded, re-runnable."""
from parse_apis.CastleBet_Football_Odds_API import CastleBet, Day, MatchNotFound
client = CastleBet()
# List today's football matches with primary odds
for match in client.match_summaries.list(day=Day.TODAY, limit=3):
print(match.home_team, "vs", match.away_team, "-", match.competition)
for market in match.markets:
print(f" {market.market_name}: ", end="")
print(", ".join(f"{s.key}={s.odds}" for s in market.selections))
# Drill into one match for full market detail
summary = client.match_summaries.list(day=Day.TODAY, limit=1).first()
if summary:
detail = summary.details()
print(f"\nFull odds for {detail.home_team} vs {detail.away_team} ({detail.total_markets} markets):")
for mkt in detail.markets:
label = f"{mkt.market_name} ({mkt.line})" if mkt.line else mkt.market_name
print(f" {label}: ", end="")
print(", ".join(f"{s.name}={s.odds}" for s in mkt.selections))
# Fetch a match directly by event_id
try:
match_detail = client.matches.get(event_id="9999999")
print(match_detail.home_team)
except MatchNotFound as exc:
print(f"Match not found: {exc.event_id}")
# List available competitions
for comp in client.competitions.list(limit=5):
print(f"{comp.country} - {comp.name} (id={comp.competition_id})")
print("exercised: match_summaries.list / details / matches.get / competitions.list")
Retrieve all football matches with their primary betting odds for a given day. Each match includes basic markets (Match Betting 1X2, Double Chance, Total Goals, BTTS) with selections and decimal odds. Results are returned as a single page ordered by kick-off time.
| Param | Type | Description |
|---|---|---|
| day | string | Day offset from today. Accepted values: '0' (today), '1' (tomorrow), '2' (day after tomorrow). |
{
"type": "object",
"fields": {
"total": "integer count of matches",
"matches": "array of match summary objects with event_id, teams, competition, kick_off, and markets"
},
"sample": {
"data": {
"total": 46,
"matches": [
{
"markets": [
{
"line": null,
"market_key": "MATCH_BETTING",
"selections": [
{
"key": "HOME",
"name": "Melbourne Victory II",
"odds": 1.67
},
{
"key": "DRAW",
"name": "Draw",
"odds": 4.15
},
{
"key": "AWAY",
"name": "Brunswick City",
"odds": 4
}
],
"market_name": "Match Betting"
}
],
"event_id": "2533538",
"away_team": "Brunswick City",
"home_team": "Melbourne Victory II",
"competition": "Australia, NPL ACT",
"kick_off_date": "Mon 22/06",
"kick_off_time": "12:15"
}
]
},
"status": "success"
}
}About the castlebet.com.na API
The CastleBet Namibia API provides access to football betting data across 3 endpoints, covering match listings, per-match market odds, and competition directories. The get_football_matches endpoint returns all matches scheduled for today, tomorrow, or the day after, each with primary markets including 1X2, Double Chance, Total Goals, and Both Teams To Score. Specific matches can be queried in depth using get_match_odds with an event ID.
Match Listings by Day
The get_football_matches endpoint accepts an optional day parameter ('0' for today, '1' for tomorrow, '2' for the day after tomorrow) and returns a list of football matches ordered by kick-off time. Each match object includes an event_id, team names, competition name, kick_off timestamp, and a set of primary markets with their selections and decimal odds. The response also includes a total field indicating the number of matches returned.
Detailed Market Odds per Match
Passing an event_id to get_match_odds returns the full set of available betting markets for that match. Response fields include home_team, away_team, competition, kick_off, total_markets, and a markets array. Each market object contains market_name, market_key, line (used for over/under lines and similar), and a selections array with names and decimal odds. Available markets vary by match but typically include Match Betting, Double Chance, Draw No Bet, multiple Total Goals lines, Both Teams To Score, and Odd/Even.
Competition Directory
The list_competitions endpoint takes no parameters and returns all football competitions currently listed on CastleBet. Each competition object contains group_id, competition_id, country, and name, along with a total count. This is useful for mapping the league and tournament structure across the available market.
The castlebet.com.na API is a managed, monitored endpoint for castlebet.com.na — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when castlebet.com.na 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 castlebet.com.na 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 daily football match availability on CastleBet by querying
get_football_matcheswith day offsets 0, 1, or 2. - Compare decimal odds across multiple markets (1X2, Double Chance, BTTS) for a specific match using
get_match_odds. - Build a competition browser that maps
countryandnamefields fromlist_competitionsfor league navigation. - Track over/under odds at multiple lines by reading the
linefield in Total Goals markets fromget_match_odds. - Aggregate kick-off times and competition names from
get_football_matchesto populate a day's fixture schedule. - Identify which competitions are available in Namibia for a given sport by parsing the
list_competitionsresponse.
| 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 | 250 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 CastleBet have an official developer API?+
What does `get_match_odds` return beyond the basic markets shown in `get_football_matches`?+
get_match_odds returns all markets available for a specific event, not just the primary set. In addition to Match Betting 1X2, Double Chance, and BTTS, it can include Draw No Bet, multiple Total Goals lines at different thresholds, and Odd/Even markets. The total_markets field tells you how many markets were returned for that event.Does the API support filtering matches by competition or country?+
get_football_matches returns all matches for a given day without a competition filter parameter. The response includes competition on each match object, so filtering can be done client-side. You can fork this API on Parse and revise it to add a competition-level filtering endpoint using the competition_id values from list_competitions.Does the API cover sports other than football, such as rugby or basketball?+
How far ahead can I retrieve match data?+
day parameter in get_football_matches accepts values '0', '1', and '2', covering today through two days ahead. Matches beyond that range are not accessible through this endpoint. You can fork this API on Parse and revise it to extend the day range if additional offsets become supported.