Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API 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.
openapi: 3.2.0
info:
contact:
name: SportStatsAPI
url: https://sportstatsapi.com
description: 'Every public endpoint of SportStatsAPI. Endpoints marked with x-x402 can also be paid per call by an AI agent; the curated list of those is https://api.sportstatsapi.com/api/openapi.agents.json.
Authentication: an API key (header X-API-Key, or Authorization: Bearer ), or without a key an x402 payment (header PAYMENT-SIGNATURE, USDC on Base). Prices and payment offers: https://api.sportstatsapi.com/.well-known/x402. Docs for AI models: https://api.sportstatsapi.com/llms.txt. MCP server: https://mcp.sportstatsapi.com/mcp.'
summary: Sports data API and x402 pay-per-call endpoints
title: SportStats Sports API
version: '1.0'
servers:
- url: https://api.sportstatsapi.com/api/v1
tags:
- name: Sports
paths:
/sports:
get:
description: Returns a list of sports that have future matches, filtered by the API key's permissions
operationId: getSports
responses:
'200':
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/middleware.Response'
- properties:
data:
items:
$ref: '#/components/schemas/dto.SportOption'
type: array
type: object
description: OK
'401':
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/middleware.Response'
- properties:
error:
$ref: '#/components/schemas/middleware.ErrorInfo'
type: object
description: Unauthorized
'429':
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/middleware.Response'
- properties:
error:
$ref: '#/components/schemas/middleware.ErrorInfo'
type: object
description: Too Many Requests
'500':
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/middleware.Response'
- properties:
error:
$ref: '#/components/schemas/middleware.ErrorInfo'
type: object
description: Internal Server Error
security:
- ApiKeyAuth: []
- BearerAuth: []
- x402: []
summary: List available sports
tags:
- Sports
x-x402:
asset: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'
currency: USDC
discovery: https://api.sportstatsapi.com/.well-known/x402
minSinglePayment: '0.01'
network: eip155:8453
price: '0'
components:
schemas:
middleware.Response:
properties:
data: {}
error:
$ref: '#/components/schemas/middleware.ErrorInfo'
meta:
$ref: '#/components/schemas/middleware.MetaInfo'
success:
type: boolean
type: object
middleware.MetaInfo:
properties:
attribution:
description: Attribution a data source's licence asks for (Cricsheet's history).
type: string
has_more:
description: 'HasMore: the cursor-paged list has more rows now (ask again at once).'
type: boolean
limit:
type: integer
live:
description: 'Live: the answer is the live feed''s, kept while the match is played
(cricket ball by ball before Cricsheet''s file replaces it).'
type: boolean
next_cursor:
description: NextCursor continues a cursor-paged list (GET /changes).
type: string
offset:
type: integer
sources:
description: 'Sources: where the answer''s data came from, with each source''s licence
and the attribution it asks for (docs/source-licences.md).'
items:
$ref: '#/components/schemas/middleware.SourceInfo'
type: array
total:
type: integer
warnings:
description: 'Warnings: query parameters ignored or changed (a limit above the
maximum is clamped to it; a from/to that is not a date is ignored).'
items:
type: string
type: array
type: object
middleware.SourceInfo:
properties:
attribution:
description: show it with the data
example: 'Data: nflverse (CC-BY 4.0)'
type: string
licence:
description: the licence or terms the data is served under
example: CC-BY-4.0
type: string
name:
description: provider = our main licensed feed
example: nflverse
type: string
type: object
middleware.ErrorInfo:
properties:
code:
type: string
message:
type: string
type: object
dto.SportOption:
properties:
label:
type: string
value:
type: string
type: object
securitySchemes:
ApiKeyAuth:
description: API key
in: header
name: X-API-Key
type: apiKey
BearerAuth:
description: The same API key as a bearer token
scheme: bearer
type: http
x402:
description: x402 v2 payment (USDC on Base, eip155:8453) built from the offers of a 402 answer; see https://api.sportstatsapi.com/.well-known/x402
in: header
name: PAYMENT-SIGNATURE
type: apiKey
externalDocs:
description: x402 payment offers and prices
url: https://api.sportstatsapi.com/.well-known/x402