InferSports Events API
The events API from InferSports — 8 operation(s) for events.
The events API from InferSports — 8 operation(s) for events.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/infersports-dev:infersports-dev-events-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: InferSports Events API
summary: Sharp Asian odds, built for code.
description: 'Read-only REST API for live Asian-bookmaker + Pinnacle odds (football & basketball; 1x2 / Asian handicap / totals; full-time & half-time).
**Determinism contract** (see `/llms.txt`): `/v1` is frozen (breaking changes ship under `/v2`); Sqids ids are stable across calls and restarts; response field sets are fixed (optional values are sent as `null`, never omitted — the sole exception is `/convert/odds`, which projects to the requested `to` formats). `convert/odds`, `convert/handicap` and `explain_handicap` are pure functions (same input → same output) and safe to cache indefinitely; snapshot reads keep a fixed shape but live values. No historical data.'
version: 0.1.0
tags:
- name: Events
paths:
/v1/events:
get:
tags:
- Events
summary: List Events
operationId: list_events_v1_events_get
parameters:
- name: sport
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Sport
- name: league
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: league id (lg_…) or name (fuzzy-matched, e.g. 'World Cup')
title: League
description: league id (lg_…) or name (fuzzy-matched, e.g. 'World Cup')
- name: date
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: calendar date YYYY-MM-DD (UTC day unless timezone given)
title: Date
description: calendar date YYYY-MM-DD (UTC day unless timezone given)
- name: timezone
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: IANA timezone for the date's day boundary (e.g. Asia/Shanghai); default UTC
title: Timezone
description: IANA timezone for the date's day boundary (e.g. Asia/Shanghai); default UTC
- name: status
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: scheduled | live | finished
title: Status
description: scheduled | live | finished
- name: limit
in: query
required: false
schema:
type: integer
maximum: 200
minimum: 1
default: 50
title: Limit
- name: cursor
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Cursor
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/Paginated_Event_'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/v1/events/live:
get:
tags:
- Events
summary: List Live Events
operationId: list_live_events_v1_events_live_get
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/DataList_Event_'
/v1/events/{event_id}:
get:
tags:
- Events
summary: Get Event
operationId: get_event_v1_events__event_id__get
parameters:
- name: event_id
in: path
required: true
schema:
type: string
title: Event Id
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/Event'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/v1/events/{event_id}/state:
get:
tags:
- Events
summary: Get Event State
operationId: get_event_state_v1_events__event_id__state_get
parameters:
- name: event_id
in: path
required: true
schema:
type: string
title: Event Id
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/EventState'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/v1/events/{event_id}/odds:
get:
tags:
- Events
summary: Get Event Odds
operationId: get_event_odds_v1_events__event_id__odds_get
parameters:
- name: event_id
in: path
required: true
schema:
type: string
title: Event Id
- name: bookmakers
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: comma-separated bookmaker keys
title: Bookmakers
description: comma-separated bookmaker keys
- name: markets
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: comma-separated market types
title: Markets
description: comma-separated market types
- name: period
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: full_time | half_time
title: Period
description: full_time | half_time
- name: format
in: query
required: false
schema:
type: string
default: decimal
title: Format
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/OddsBlock'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/v1/odds/batch:
post:
tags:
- Events
summary: Get Odds Batch
description: 'Odds for up to 20 fixtures in ONE request — the batched form of `/events/{id}/odds`.
A slate sweep is otherwise N calls, which is what drives callers into the per-minute limit. This
counts as a single request against both budgets, so batching is strictly cheaper than looping.
Requires an API key: the whole point is a large multiplier on one request, and handing that to
anonymous callers would undo the keyless daily cap. A free key (no card) is enough.
Filters (`bookmakers` / `markets` / `period` / `format`) apply to every entry, and tier gating is
identical to the single-fixture route — Free still sees no sharp books here. Ids that don''t
resolve fail their own entry only; the rest of the batch still returns.'
operationId: get_odds_batch_v1_odds_batch_post
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/BatchOddsRequest'
required: true
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/BatchOddsResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/v1/events/{event_id}/opening:
get:
tags:
- Events
summary: Get Event Opening
description: 'Opening odds (初盘) for this match''s currently-visible quotes.
For each current quote the caller may see, returns the upstream''s frozen first-seen price at the
same bookmaker / market / period / line — compare against ``/odds`` to read line movement. 1x2
yields one opening per book; totals/AH yield the opening at each current line. Best-effort: a
bookmaker/line with no opening on file is omitted (the lookup is a single-point, fail-open call).'
operationId: get_event_opening_v1_events__event_id__opening_get
parameters:
- name: event_id
in: path
required: true
schema:
type: string
title: Event Id
- name: bookmakers
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: comma-separated bookmaker keys
title: Bookmakers
description: comma-separated bookmaker keys
- name: markets
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: comma-separated market types
title: Markets
description: comma-separated market types
- name: period
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: full_time | half_time
title: Period
description: full_time | half_time
- name: format
in: query
required: false
schema:
type: string
default: decimal
title: Format
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/EventOpening'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/v1/events/{event_id}/odds/{market_type}:
get:
tags:
- Events
summary: Get Event Odds For Market
operationId: get_event_odds_for_market_v1_events__event_id__odds__market_type__get
parameters:
- name: event_id
in: path
required: true
schema:
type: string
title: Event Id
- name: market_type
in: path
required: true
schema:
type: string
title: Market Type
- name: bookmakers
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Bookmakers
- name: period
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Period
- name: format
in: query
required: false
schema:
type: string
default: decimal
title: Format
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/OddsBlock'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
components:
schemas:
Score:
properties:
home:
type: integer
title: Home
away:
type: integer
title: Away
type: object
required:
- home
- away
title: Score
Paginated_Event_:
properties:
data:
items:
$ref: '#/components/schemas/Event'
type: array
title: Data
page:
$ref: '#/components/schemas/Page'
type: object
required:
- data
- page
title: Paginated[Event]
BatchOddsError:
properties:
code:
type: string
title: Code
message:
type: string
title: Message
fix:
anyOf:
- type: string
- type: 'null'
title: Fix
type: object
required:
- code
- message
title: BatchOddsError
description: Per-entry failure, mirroring the top-level error envelope's shape.
EventOpening:
properties:
event_id:
type: string
title: Event Id
source:
type: string
title: Source
opening:
items:
$ref: '#/components/schemas/OpeningQuote'
type: array
title: Opening
type: object
required:
- event_id
- opening
title: EventOpening
BatchOddsResponse:
properties:
count:
type: integer
title: Count
description: Entries returned — always equals the number of ids you sent.
ok_count:
type: integer
title: Ok Count
description: How many entries carry odds rather than an error.
data:
items:
$ref: '#/components/schemas/BatchOddsEntry'
type: array
title: Data
type: object
required:
- count
- ok_count
- data
title: BatchOddsResponse
OddsQuote:
properties:
bookmaker:
type: string
title: Bookmaker
market_type:
type: string
title: Market Type
period:
type: string
title: Period
line:
anyOf:
- type: number
- type: 'null'
title: Line
handicap_components:
anyOf:
- items:
type: number
type: array
- type: 'null'
title: Handicap Components
prices:
additionalProperties:
anyOf:
- type: number
- type: integer
type: object
title: Prices
format:
type: string
title: Format
default: decimal
status:
type: string
title: Status
as_of:
type: string
title: As Of
type: object
required:
- bookmaker
- market_type
- period
- prices
- status
- as_of
title: OddsQuote
BatchOddsRequest:
properties:
event_ids:
items:
type: string
type: array
maxItems: 20
minItems: 1
title: Event Ids
description: Event ids to fetch, 1-20 per call. Order is preserved and each id gets exactly one entry back, so the response lines up with what you sent.
bookmakers:
anyOf:
- type: string
- type: 'null'
title: Bookmakers
description: comma-separated bookmaker keys
markets:
anyOf:
- type: string
- type: 'null'
title: Markets
description: comma-separated market types
period:
anyOf:
- type: string
- type: 'null'
title: Period
description: full_time | half_time
format:
type: string
title: Format
description: odds format for every entry
default: decimal
type: object
required:
- event_ids
title: BatchOddsRequest
DataList_Event_:
properties:
data:
items:
$ref: '#/components/schemas/Event'
type: array
title: Data
type: object
required:
- data
title: DataList[Event]
LeagueRef:
properties:
id:
type: string
title: Id
name:
type: string
title: Name
type: object
required:
- id
- name
title: LeagueRef
HTTPValidationError:
properties:
detail:
items:
$ref: '#/components/schemas/ValidationError'
type: array
title: Detail
type: object
title: HTTPValidationError
BatchOddsEntry:
properties:
event_id:
type: string
title: Event Id
odds:
anyOf:
- $ref: '#/components/schemas/OddsBlock'
- type: 'null'
error:
anyOf:
- $ref: '#/components/schemas/BatchOddsError'
- type: 'null'
type: object
required:
- event_id
title: BatchOddsEntry
description: 'One fixture''s result. Exactly one of ``odds`` / ``error`` is set.
A bad id fails only its own entry — the rest of the batch still returns, so one stale id in a
caller''s watchlist can''t blank out the whole sweep.'
Page:
properties:
next_cursor:
anyOf:
- type: string
- type: 'null'
title: Next Cursor
limit:
type: integer
title: Limit
type: object
required:
- limit
title: Page
EventState:
properties:
event_id:
type: string
title: Event Id
status:
type: string
title: Status
score:
anyOf:
- $ref: '#/components/schemas/Score'
- type: 'null'
red_cards:
anyOf:
- $ref: '#/components/schemas/Score'
- type: 'null'
clock:
anyOf:
- type: string
- type: 'null'
title: Clock
as_of:
type: string
title: As Of
type: object
required:
- event_id
- status
- as_of
title: EventState
Event:
properties:
id:
type: string
title: Id
sport:
type: string
title: Sport
league:
$ref: '#/components/schemas/LeagueRef'
home_team:
$ref: '#/components/schemas/TeamRef'
away_team:
$ref: '#/components/schemas/TeamRef'
scheduled_at:
anyOf:
- type: string
- type: 'null'
title: Scheduled At
status:
type: string
title: Status
type: object
required:
- id
- sport
- league
- home_team
- away_team
- status
title: Event
ValidationError:
properties:
loc:
items:
anyOf:
- type: string
- type: integer
type: array
title: Location
msg:
type: string
title: Message
type:
type: string
title: Error Type
input:
title: Input
ctx:
type: object
title: Context
type: object
required:
- loc
- msg
- type
title: ValidationError
OpeningQuote:
properties:
bookmaker:
type: string
title: Bookmaker
market_type:
type: string
title: Market Type
period:
type: string
title: Period
line:
anyOf:
- type: number
- type: 'null'
title: Line
handicap_components:
anyOf:
- items:
type: number
type: array
- type: 'null'
title: Handicap Components
prices:
additionalProperties:
anyOf:
- type: number
- type: integer
type: object
title: Prices
format:
type: string
title: Format
default: decimal
opened_at:
anyOf:
- type: string
- type: 'null'
title: Opened At
type: object
required:
- bookmaker
- market_type
- period
- prices
title: OpeningQuote
description: 'An opening (初盘) quote — the open-line counterpart of :class:`OddsQuote`.
Same shape as a current quote minus the live ``status`` (an opening is by definition the frozen
first-seen price). ``opened_at`` is when the upstream first recorded it (UTC). This is the **true
market opening**: for totals/AH the ``line`` is the *opening* line, which may differ from the
current ``/odds`` quote''s line — diff price **and** line across the two endpoints to read movement.'
TeamRef:
properties:
id:
type: string
title: Id
name:
type: string
title: Name
type: object
required:
- id
- name
title: TeamRef
OddsBlock:
properties:
event_id:
type: string
title: Event Id
as_of:
type: string
title: As Of
stale:
type: boolean
title: Stale
odds:
items:
$ref: '#/components/schemas/OddsQuote'
type: array
title: Odds
type: object
required:
- event_id
- as_of
- stale
- odds
title: OddsBlock