Skip to content
View anysport-api's full-sized avatar

Block or report anysport-api

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Maximum 250 characters. Please don’t include any personal information such as legal names or email addresses. Markdown is supported. This note will only be visible to you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
anysport-api/README.md

⚽ AnySport API

Real-time football data API for developers — live scores, odds, lineups, standings, and more.

API Status Docs Plans

anysport.io · Dashboard · Documentation · 中文网站


What is AnySport API?

AnySport provides a clean, developer-friendly REST API for real-time football data. Get live scores, match odds, lineups, standings, head-to-head records, and more — all from a single API key.

  • REST + WebSocket — poll when you need to, stream when it matters
  • Multi-language — responses available in English, Chinese, Japanese, Korean, and Thai
  • Global coverage — hundreds of leagues across 170+ countries
  • Simple pricing — start free, upgrade as you grow

Endpoints

Endpoint Description
GET /v1/matches Scheduled and finished matches
GET /v1/livescore Live match scores and events
GET /v1/leagues League list with metadata
GET /v1/countries Country list
GET /v1/teams Team details and search
GET /v1/players Player info and search
GET /v1/standings League standings (home / away / total)
GET /v1/head2head Head-to-head match history
GET /v1/lineups Match lineups and formations
GET /v1/odds Pre-match odds
GET /v1/odds/live Live in-play odds
GET /v1/topscorers Top scorers by league and season
GET /v1/probabilities Win / draw / loss probabilities
GET /images/:type/:id Team badges and league logos
WSS /v1/ws/live Real-time live score stream (ProMax)

Base URL: https://api.anysport.io


Quick Start

Get your API key from the Dashboard, then make your first request:

curl -H "X-API-Key: YOUR_API_KEY" \
  "https://api.anysport.io/v1/livescore?lang=en"

Node.js

const res = await fetch('https://api.anysport.io/v1/livescore', {
  headers: { 'X-API-Key': 'YOUR_API_KEY' }
});
const { data } = await res.json();

Python

import requests

r = requests.get(
    'https://api.anysport.io/v1/livescore',
    headers={'X-API-Key': 'YOUR_API_KEY'}
)
print(r.json())

PHP

$ch = curl_init('https://api.anysport.io/v1/livescore');
curl_setopt($ch, CURLOPT_HTTPHEADER, ['X-API-Key: YOUR_API_KEY']);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$data = json_decode(curl_exec($ch), true);

WebSocket — Live Score Stream

ProMax subscribers can connect to a real-time WebSocket stream instead of polling:

const ws = new WebSocket(
  'wss://api.anysport.io/v1/ws/live?api_key=YOUR_API_KEY'
);

ws.onmessage = ({ data }) => {
  const { type, data: matches } = JSON.parse(data);
  // type === "livescore_update"
  console.log(matches);
};

Optional filter parameters: league_id, country_id, match_id, lang


Multi-language Support

Pass ?lang= to any supported endpoint to receive translated names:

Code Language
en English (default)
zh Chinese (简体中文)
ja Japanese (日本語)
ko Korean (한국어)
th Thai (ภาษาไทย)

Translated fields: team names, league names, player names, country names, player positions.

# Chinese response
curl -H "X-API-Key: YOUR_KEY" \
  "https://api.anysport.io/v1/leagues?lang=zh"

Plans

Plan Price Requests / hour WebSocket
Free $0 (7 days) 120
Basic $99 / month 2,000
Pro $199 / month 10,000
ProMax $299 / month 20,000 10 concurrent

Compare plans →

Payment via USDT. Quarterly, semi-annual, and annual billing available with discounts.


Response Format

All endpoints return a consistent JSON envelope:

{
  "success": true,
  "data": [ ... ],
  "meta": {
    "total": 42,
    "page": 1,
    "limit": 20,
    "total_pages": 3,
    "timestamp": "2026-04-21T10:00:00.000Z"
  }
}

Error responses include a machine-readable code and human-readable message:

{
  "success": false,
  "error": {
    "code": "RATE_LIMIT_EXCEEDED",
    "message": "Too many requests. Please upgrade your plan."
  }
}

Documentation

Full API reference, request parameters, response field descriptions, and code examples in 5 languages:

docs.anysport.io

Chinese docs: docs.anysport.io/zh-Hans


Contact

Popular repositories Loading

  1. anysport-api anysport-api Public