Football Odds API
Pre-match and in-play football odds in one API
Pull bookmaker odds for every match before kickoff, then switch to second-by-second in-play odds the moment the ball rolls. Same match_id as our live scores, clean JSON, REST or WebSocket.
match_winnerasian_handicapgoals_over_underfulltime_resultasian_handicap · handicap -0.25match_goals · handicap 2.5handicap 65 (start min)Two feeds, one match
Pre-match odds set the line. In-play odds follow the game.
Most products need both. Pre-match odds power previews, tips and model inputs. In-play odds drive live betting screens and odds-movement charts. AnySport gives you each as its own feed, keyed to the same match.
| Pre-match odds | In-play odds | |
|---|---|---|
| When | Before kickoff | While the match is live |
| REST endpoint | GET /v1/soccer/odds/prematch | GET /v1/soccer/odds/live |
| WebSocket | Subscribe 20300 · push odds_prematch_update | Subscribe 20100 · push odds_live_update |
| Markets | 63 market types: result, Asian handicap, totals, corners, cards, correct score, scorers | 499 market codes; 70–80 open at once across 11 bet-type categories |
| Updates | Snapshot, refreshed by polling (updated_at) | Pushed about every second; markets suspend and re-open as play changes |
| Main market | match_winner with Home / Draw / Away | fulltime_result with 1 / X / 2 |
| Handicap lines | Inside the option name, e.g. Home -1.25 | Separate handicap field, home-team perspective |
| Query by | match_id or league | match_id, or omit it to list every live match with open markets |
| Plan | Pro and Pro Max | Pro Max |
Pre-match odds
63 markets for every fixture, ready before kickoff
- Full market depth. Match winner, double chance, HT/FT, Asian handicap, goal lines, team totals, BTTS, corners, cards, correct score and goalscorers.
- Every handicap line at once. One market carries all its lines, so you get Over 1.5, Over 2.5 and Over 3 in a single call. Asian handicap lines come in pairs, such as Home -1.25 and Away +1.25.
- Query a match or a whole league. Pass
match_idfor one fixture orleagueto load a full round for your preview pages. - Main market up front.
home_odd,draw_oddandaway_oddsit at the top level, so a simple odds column needs no parsing.
# one match curl -H "X-API-Key: YOUR_API_KEY" \ "https://api.anysport.io/v1/soccer/odds/prematch?match_id=as_37f0da0520bb4e9a9588f80994cefc5b" # a whole league, Chinese labels curl -H "X-API-Key: YOUR_API_KEY" \ "https://api.anysport.io/v1/soccer/odds/prematch?league=Premier%20League&lang=zh-CN"
{
"match_id": "as_37f0da0520bb4e9a9588f80994cefc5b",
"home": "England", "away": "Argentina",
"bookmaker": "bet365",
"phase": "prematch",
"main_market": "match_winner",
"home_odd": 2.62, "draw_odd": 3.0, "away_odd": 3.0,
"markets": [
{ "market_code": "asian_handicap",
"options": [
{ "name": "Home -1.25", "odd": 4.8 },
{ "name": "Away +1.25", "odd": 1.18 }
] }
],
"updated_at": "2026-07-14T18:20:05Z"
}
In-play odds
Live odds that move with every attack, card and goal
- Second-by-second updates. Stream changes over WebSocket, or poll
/odds/liveto list every match with open live markets. - 70–80 markets per match. 1X2 by minute, Asian and European handicap, totals for goals, corners, shots and cards, correct score, next goalscorer and player shots.
- In-play only markets. Next set piece, goal or corner in the next N minutes, method of the next goal, and corner races.
- Real market behaviour. Markets suspend, get pulled after a goal and re-list with new lines. Correct score options shrink to scores that are still possible. You see exactly what the book shows.
- Typed handicap field. Lines arrive as a number in
handicap, from the home side's view, including quarter lines like -0.25 and -0.75.
const ws = new WebSocket( "wss://data.anysport.io/v1/ws/live?api_key=YOUR_API_KEY&business=soccer" ); ws.onopen = () => { // in-play odds for one match (pre-match uses 20300) ws.send(JSON.stringify({ code: 20100, trace: "live-odds-sub-001", data: { match_id: "as_3b37c382f39a4235aa93705f053b2da4" } })); }; ws.onmessage = ({ data }) => { const msg = JSON.parse(data); if (msg.type === "odds_live_update") render(msg.data); };
{
"type": "odds_live_update",
"data": {
"match_id": "as_3b37c382f39a4235aa93705f053b2da4",
"home_team": "Manchester United",
"away_team": "Arsenal",
"bookmaker": "bet365",
"phase": "live",
"home_odd": "2.10", "draw_odd": "3.40", "away_odd": "3.20",
"markets_json": { /* every open market */ }
},
"timestamp": "2026-07-13T15:41:01.250Z"
}
# all matches with open live markets curl -H "X-API-Key: YOUR_API_KEY" \ "https://api.anysport.io/v1/soccer/odds/live" # every open market for one match curl -H "X-API-Key: YOUR_API_KEY" \ "https://api.anysport.io/v1/soccer/odds/live?match_id=as_3b37c382f39a4235aa93705f053b2da4"
What teams build
Built for products that live on odds
Odds & tipster sites
Show pre-match prices on preview pages and update them through the day.
/odds/prematch · leagueLive betting screens
Render a full in-play market list with suspensions and line changes as they happen.
WS 20100 · odds_live_updateModels & AI
Feed opening prices and live movement into prediction models and implied-probability tools.
prematch + live, same match_idLivescore apps
Add an odds tab next to scores, lineups and stats without a second data vendor.
/livescore + /oddsFor developers
Odds that fit the rest of your football data
One match ID everywhere
The same as_ match ID works across /matches, /livescore, lineups and both odds feeds. No fuzzy matching of team names between vendors.
Localized market names
Add lang=zh-CN and get market_code_label and name_label next to the original codes. More languages are on the way.
Stable codes, open-ended lists
Markets use snake_case codes like asian_handicap. New markets get new codes, so your parser keeps working when coverage grows.
Pricing
Odds come with Pro and Pro Max
Start with pre-match odds on Pro. Move to Pro Max when you need in-play odds and WebSocket streaming.
- Pre-match odds via REST
- 10,000 requests per hour
- Live scores, lineups, teams, players, standings
- In-play odds
- WebSocket streaming
- Pre-match and in-play odds via REST
- WebSocket: in-play odds, pre-match odds, scores, match stats
- 20,000 requests per hour
- 1 WebSocket connection, multiple subscriptions
- Every AnySport endpoint
Pay in USDT. Save 5% quarterly, 10% semi-annually or 20% annually. The 7-day free trial covers live scores and fixtures; odds are not included in the trial.
FAQ
Odds API questions
What is the difference between pre-match and in-play odds?
Pre-match odds are the prices offered before kickoff. They change slowly and are delivered as a snapshot with an updated_at time. In-play (live) odds are offered while the match is running and change constantly with the score, time and events, so AnySport pushes them about every second and lets markets suspend and re-open.
Where do the odds come from?
All odds currently come from bet365, shown in the bookmaker field. The field is there so more bookmakers can be added without changing your integration.
How many betting markets do you cover?
63 pre-match market types and 499 in-play market codes. A typical live match has 70 to 80 markets open at the same time across 11 bet-type categories.
Do you support Asian handicap and over/under?
Yes, both pre-match and in-play, including quarter lines such as -0.25 and -0.75. Pre-match puts the line in the option name (Home -0.25). In-play puts it in a numeric handicap field from the home team's perspective.
Should I use REST or WebSocket for live odds?
Use WebSocket for live betting screens and anything that must update instantly; one connection can carry both odds feeds plus scores. Use REST for scheduled jobs, backfills, or to discover which matches currently have live markets.
How do I match odds to live scores?
Use the match_id. Odds, fixtures, live scores and lineups all share the same as_ ID, so you can join them directly.
Can I get market names in Chinese?
Yes. Add lang=zh-CN to receive localized market and option labels next to the original codes. Team and league names stay in English for now.
Is there a free trial for the odds API?
The 7-day free trial covers live scores, fixtures, standings and head-to-head. Odds start on the Pro plan. Contact us if you need a short odds evaluation for a larger project.
Ship live odds this week
Create an account, upgrade to Pro or Pro Max, and make your first odds request in five minutes.