# API-Sports — how to use (mcp.ai)

Connect your API-Sports account and use 67 tools for developer tools straight from your AI agent. Connect with your own API key. API-Sports provides comprehensive sports data APIs covering over 2,000 competitions with more than 15 years of historical data, offering real-time updates and easy integration for developers.

## Option A — via MCP (recommended)
Remote MCP endpoint (HTTP, streamable): `https://api.mcp.ai/p_api_sports?ms=1787293560000`
Add it as a custom/remote MCP connector in your client (Claude, Cursor, VS Code…), then authenticate when prompted. Once connected, ask the agent to use the server's tools (e.g. `api_sports_get_afl_games`).

## Option B — via direct REST API
Base URL: `https://api.mcp.ai/api/api_sports`
Auth: `Authorization: Bearer sk_live_…` — create a workspace API key at https://mcp.ai/settings/api-keys
Discover endpoints: `GET https://api.mcp.ai/api/api_sports/_endpoints`

### Endpoints
- `POST https://api.mcp.ai/api/api_sports/get/afl/games` — Tool to retrieve AFL games and matches. Use when filtering games by id, date, league, season, team, or timezone to get upcoming, past, or live matches.
  - body: { id?: integer, date?: string, team?: integer, league?: integer, season?: string, timezone?: string }
- `POST https://api.mcp.ai/api/api_sports/get/afl/games/statistics/players` — Tool to retrieve player statistics from AFL (Australian Football League) game(s). Use when you need detailed player performance data for specific AFL games by game ID, player ID, or season.
  - body: { id?: string, ids?: string, date?: string, player?: integer, season?: string }
- `POST https://api.mcp.ai/api/api_sports/get/afl/seasons` — Tool to get the list of available seasons for AFL. All seasons are 4-digit keys (e.g., 2018 for 2018-2019 season). Use when you need season filters for AFL endpoints.
- `POST https://api.mcp.ai/api/api_sports/get/afl/standings` — Tool to retrieve AFL standings for a league. Use when needing current team rankings, points, and positions for a specific season.
  - body: { team?: integer, league: integer, season: integer }
- `POST https://api.mcp.ai/api/api_sports/get/baseball/games/h2h` — Tool to get head-to-head baseball games between two teams. Use when comparing the match history between two specific baseball teams.
  - body: { h2h: string, date?: string, league?: integer, season?: string, timezone?: string }
- `POST https://api.mcp.ai/api/api_sports/get/basketball/bets` — Tool to get all available basketball bet types. Use when you need to retrieve available betting options for basketball games.
  - body: { id?: integer, search?: string }
- `POST https://api.mcp.ai/api/api_sports/get/basketball/bookmakers` — Tool to get all available basketball bookmakers. Use when you need to retrieve available bookmakers for basketball odds and betting data.
  - body: { id?: integer, search?: string }
- `POST https://api.mcp.ai/api/api_sports/get/basketball/statistics` — Tool to get basketball statistics for a team in a given league and season. Use when you need detailed basketball team statistics including games played, wins, losses, points, and other performance met
  - body: { date?: string, team: integer, league: integer, season: string }
- `POST https://api.mcp.ai/api/api_sports/get/circuits` — Tool to get the list of available Formula 1 circuits. Use when searching for circuits by id, competition, name, or search term.
  - body: { id?: integer, name?: string, search?: string, competition?: integer }
- `POST https://api.mcp.ai/api/api_sports/get/coachs` — Tool to fetch coaches and their career history. Use when you need coach info by ID, team filter, or name search.
  - body: { id?: integer, team?: integer, search?: string }
- `POST https://api.mcp.ai/api/api_sports/get/countries` — Tool to fetch available countries for league queries. Use when filtering by name, code, or search string before retrieving leagues.
  - body: { code?: string, name?: string, search?: string }
- `POST https://api.mcp.ai/api/api_sports/get/fighters/records` — Tool to get fighter career statistics. Use when you need a fighter's complete record including wins, losses, draws, knockouts, and submissions.
  - body: { id: integer }
- `POST https://api.mcp.ai/api/api_sports/get/fixtures` — Tool to retrieve football fixtures/matches. Use when filtering fixtures by id, date, league, season, team, or date ranges to get upcoming or past matches. Always provide at least one of season, date, 
  - body: { id?: integer, to?: string, date?: string, from?: string, last?: integer, live?: string, next?: integer, team?: integer, round?: string, venue?: integer, league?: integer, season?: integer, status?: string, timezone?: string }
- `POST https://api.mcp.ai/api/api_sports/get/fixtures/events` — Tool to get events (goals, cards, substitutions, VAR, etc.) from a fixture. Use when you need detailed event data after confirming the fixture ID.
  - body: { team?: integer, type?: string, player?: integer, fixture: integer }
- `POST https://api.mcp.ai/api/api_sports/get/fixtures/headtohead` — Tool to get head-to-head fixtures between two teams. Use after determining team IDs to compare their direct match history.
  - body: { to?: string, h2h: string, date?: string, from?: string, last?: integer, next?: integer, league?: integer, season?: integer, status?: string, timezone?: string }
- `POST https://api.mcp.ai/api/api_sports/get/fixtures/lineups` — Tool to retrieve starting XI and substitutes for a fixture. Use after confirming fixture ID; optionally filter by team, player, or section (startXI/substitutes). Lineups appear ~20-40 minutes before k
  - body: { team?: integer, type?: string, player?: integer, fixture: integer }
- `POST https://api.mcp.ai/api/api_sports/get/fixtures/players` — Tool to get player statistics from a fixture. Use when you need detailed per-player stats for a specific match. Optionally filter by team.
  - body: { team?: integer, fixture: integer }
- `POST https://api.mcp.ai/api/api_sports/get/fixtures/rounds` — Tool to get the rounds for a league or cup. Use after confirming league and season to retrieve available round identifiers (optionally with dates) for filtering fixtures.
  - body: { dates?: boolean, league: integer, season: integer, current?: boolean, timezone?: string }
- `POST https://api.mcp.ai/api/api_sports/get/fixtures/statistics` — Tool to get statistics for a fixture. Use when you need detailed match stats (shots, fouls, possession, cards, passes, etc.), optionally filtered by team, statistic type, or including halftime data.
  - body: { half?: boolean, team?: integer, type?: string, fixture: integer }
- `POST https://api.mcp.ai/api/api_sports/get/formula1/competitions` — Tool to retrieve Formula 1 competitions (Grand Prix races). Use when filtering competitions by id, name, country, city, or search term.
  - body: { id?: integer, city?: string, name?: string, search?: string, country?: string }
- `POST https://api.mcp.ai/api/api_sports/get/formula1/races` — Tool to retrieve Formula 1 race information for a given season. Use when you need to get race schedules, results, or details for a specific Formula 1 competition season.
  - body: { id?: integer, date?: string, last?: integer, next?: integer, type?: string, season: integer, circuit?: integer, timezone?: string, competition?: integer }
- `POST https://api.mcp.ai/api/api_sports/get/formula1/rankings/startinggrid` — Tool to retrieve the starting grid for a Formula 1 race. Use when you need to get the qualifying positions and times for drivers before a race starts.
  - body: { race: integer, team?: integer, driver?: integer }
- `POST https://api.mcp.ai/api/api_sports/get/games/events` — Tool to get events (goals, penalties, etc.) from a game. Use when you need detailed event data after confirming the game ID.
  - body: { game: integer }
- `POST https://api.mcp.ai/api/api_sports/get/games/quarters` — Tool to retrieve AFL game quarter scores. Use when you need detailed scoring breakdown by quarter for one or multiple AFL games.
  - body: { id?: integer, ids?: string, date?: string, timezone?: string }
- `POST https://api.mcp.ai/api/api_sports/get/games/statistics/teams` — Tool to get team statistics from a game by ID. Use when you need detailed team stats (assists, blocks, field goals, rebounds, steals, turnovers, etc.) for a specific game or multiple games.
  - body: { id?: string, ids?: string }
- `POST https://api.mcp.ai/api/api_sports/get/injuries` — Tool to get injured or suspended players. Use when you need a list of sidelined players filtered by league, season, fixture, team, player, date, ids, or timezone.
  - body: { ids?: string, date?: string, team?: integer, league?: integer, player?: integer, season?: integer, fixture?: integer, timezone?: string }
- `POST https://api.mcp.ai/api/api_sports/get/leagues` — Tool to retrieve leagues and cups. Use when filtering competitions by id, name, country, code, season, team, type, current, search, or last.
  - body: { id?: integer, code?: string, last?: integer, name?: string, team?: integer, type?: string, search?: string, season?: integer, country?: string, current?: boolean }
- `POST https://api.mcp.ai/api/api_sports/get/leagues/seasons` — Tool to get the list of available seasons for all leagues. Use when you need season filters for other league endpoints.
- `POST https://api.mcp.ai/api/api_sports/get/mma/categories` — Tool to fetch the list of all available MMA categories. Use when you need to get weight class categories (e.g., 'Flyweight', 'Lightweight', 'Heavyweight') for MMA fights.
  - body: { search?: string }
- `POST https://api.mcp.ai/api/api_sports/get/mma/fighters` — Tool to fetch MMA fighters data. Use when you need to get fighter information by id, team, name, category, or search term.
  - body: { id?: integer, name?: string, team?: integer, search?: string, category?: string }
- `POST https://api.mcp.ai/api/api_sports/get/mma/fights` — Tool to retrieve the list of MMA fights according to given parameters. Use when filtering fights by id, date, season, fighter, or weight category to get upcoming or past MMA fight details.
  - body: { id?: integer, date?: string, season?: integer, fighter?: integer, category?: string, timezone?: string }
- `POST https://api.mcp.ai/api/api_sports/get/mma/fights/results` — Tool to retrieve results from one or several MMA fights. Use when you need outcome details like victory method, round, time, knockout type, or judge scores for specific fights by id(s) or date.
  - body: { id?: integer, ids?: string, date?: string }
- `POST https://api.mcp.ai/api/api_sports/get/mma/fights/statistics/fighters` — Tool to get fighter statistics from MMA fights. Use when you need detailed strike, takedown, and grappling statistics for fighters in specific fights or on a specific date.
  - body: { id?: integer, ids?: string, date?: string }
- `POST https://api.mcp.ai/api/api_sports/get/nba/games/statistics` — Tool to get NBA game statistics including player stats for both teams. Use when you need detailed statistics for a specific NBA game such as points, rebounds, assists, field goals, free throws, and ot
  - body: { id: integer }
- `POST https://api.mcp.ai/api/api_sports/get/nfl/standings/conferences` — Tool to retrieve the list of available conferences for the NFL to be used in the standings endpoint. Use when you need to know which conferences are available for a specific NFL league and season befo
  - body: { league: integer, season: integer }
- `POST https://api.mcp.ai/api/api_sports/get/odds` — Tool to fetch pre-match odds. Use when you need odds filterable by fixture, league, season, date, timezone, bookmaker, bet, or to navigate pages.
  - body: { bet?: integer, date?: string, page?: integer, league?: integer, season?: integer, fixture?: integer, timezone?: string, bookmaker?: integer }
- `POST https://api.mcp.ai/api/api_sports/get/odds/bets` — Tool to get all available pre-match bet types. Use when filtering by bet ID or searching bet names before fetching odds.
  - body: { id?: integer, search?: string }
- `POST https://api.mcp.ai/api/api_sports/get/odds/bookmakers` — Tool to list all available pre-match bookmakers. Use when you need to discover or filter bookmakers before fetching odds.
  - body: { id?: integer, search?: string }
- `POST https://api.mcp.ai/api/api_sports/get/odds/live` — Tool to fetch in-play odds for fixtures in progress. Use during live matches to get in-play odds.
  - body: { bet?: integer, league?: integer, fixture?: integer }
- `POST https://api.mcp.ai/api/api_sports/get/odds/live/bets` — Tool to fetch all available bet types for in-play odds. Use when you need to retrieve bet IDs or names (optionally filtering by id or search) before fetching live odds.
  - body: { id?: integer, search?: string }
- `POST https://api.mcp.ai/api/api_sports/get/odds/mapping` — Tool to get the list of available fixture IDs for the odds endpoint. Use when you need to discover which fixtures have odds data available.
  - body: { page?: integer }
- `POST https://api.mcp.ai/api/api_sports/get/players` — Tool to get player statistics. Use when fetching players by id, team, league, season, search, or pagination. Returned player IDs are used as inputs to downstream tools such as fixtures statistics, pre
  - body: { id?: integer, page?: integer, team?: integer, league?: integer, search?: string, season?: integer }
- `POST https://api.mcp.ai/api/api_sports/get/players/profiles` — Tool to get the list of all available players. Use when you need player profiles optionally filtered by ID, name search, or page.
  - body: { page?: integer, player?: integer, search?: string }
- `POST https://api.mcp.ai/api/api_sports/get/players/seasons` — Tool to list all available seasons for player statistics. Use when building a player statistics query, optionally filtering by a specific player id.
  - body: { player?: integer }
- `POST https://api.mcp.ai/api/api_sports/get/players/squads` — Tool to get player squads. Use when fetching the current squad of a team (with team ID) or finding which teams a player belongs to (with player ID).
  - body: { team?: integer, player?: integer }
- `POST https://api.mcp.ai/api/api_sports/get/players/statistics` — Tool to get player statistics for a specific basketball game. Use when you need detailed performance stats like points, rebounds, assists, field goals, three pointers, free throws, etc. Requires at le
  - body: { id: integer }
- `POST https://api.mcp.ai/api/api_sports/get/players/teams` — Tool to get the list of teams and seasons in which a player played during his career. Use after confirming the player ID to retrieve club history.
  - body: { player: integer, season?: integer }
- `POST https://api.mcp.ai/api/api_sports/get/players/top/assists` — Tool to get the 20 best players (top assists) for a league or cup. Use after confirming league and season.
  - body: { league: integer, season: integer|string }
- `POST https://api.mcp.ai/api/api_sports/get/players/top/red/cards` — Tool to get the 20 players with the most red cards for a league or cup. Use after confirming league and season.
  - body: { page?: integer, team?: integer, league: integer, season: integer|string }
- `POST https://api.mcp.ai/api/api_sports/get/players/top/scorers` — Tool to get the 20 best players (top scorers) for a league or cup. Use after confirming league and season.
  - body: { page?: integer, team?: integer, league: integer, season: integer|string }
- `POST https://api.mcp.ai/api/api_sports/get/players/top/yellow/cards` — Tool to get the 20 players with the most yellow cards for a league or cup. Use after confirming league and season.
  - body: { page?: integer, team?: integer, league: integer, season: integer|string }
- `POST https://api.mcp.ai/api/api_sports/get/predictions` — Tool to get predictions about a fixture. Use when you need calculated predictions for a given fixture ID. Predictions may not be available for all fixtures; empty or null responses indicate no predict
  - body: { fixture: integer }
- `POST https://api.mcp.ai/api/api_sports/get/rankings/drivers` — Tool to retrieve Formula 1 driver rankings for a season. Use when querying driver standings, championship positions, or filtering by specific driver or team.
  - body: { team?: integer, driver?: integer, season: integer }
- `POST https://api.mcp.ai/api/api_sports/get/rankings/fastest/laps` — Tool to get the ranking of the fastest laps for a Formula 1 race. Use when retrieving fastest lap times, speeds, and rankings by race, team, or driver.
  - body: { race: integer, team?: integer, driver?: integer }
- `POST https://api.mcp.ai/api/api_sports/get/rankings/races` — Tool to retrieve rankings for a specific Formula 1 race. Use when you need to get finishing positions, lap times, and pit stop information for drivers in a race.
  - body: { race: integer, team?: integer, driver?: integer }
- `POST https://api.mcp.ai/api/api_sports/get/rankings/teams` — Tool to retrieve Formula 1 team rankings for a specific season. Use when you need to get championship standings showing teams ordered by points.
  - body: { team?: integer, season: string }
- `POST https://api.mcp.ai/api/api_sports/get/sidelined` — Tool to get sidelined information (injuries, suspensions, etc.). Use when you need current sidelined records filtered by player or coach.
  - body: { coach?: integer, player?: integer }
- `POST https://api.mcp.ai/api/api_sports/get/standings/divisions` — Tool to retrieve the list of available divisions for an NFL competition to be used in the standings endpoint. Use when you need to know which divisions are available for a specific league and season b
  - body: { league: integer, season: integer }
- `POST https://api.mcp.ai/api/api_sports/get/standings/groups` — Tool to retrieve the list of available groups for a league to be used in the standings endpoint. Use when querying standings groups for a specific league and season before fetching detailed standings 
  - body: { league: integer, season: string }
- `POST https://api.mcp.ai/api/api_sports/get/standings/stages` — Tool to retrieve the list of available stages for a league to be used in the standings endpoint. Use when you need to know which stages or groups are available for a specific league and season before 
  - body: { league: integer, season: string }
- `POST https://api.mcp.ai/api/api_sports/get/teams` — Tool to retrieve available teams. Use when filtering teams by id, name, league, season, country, code, venue, or search before fetching detailed team data. Team IDs are not inferrable from names; use 
  - body: { id?: integer, code?: string, name?: string, venue?: integer, league?: integer, search?: string, season?: integer, country?: string }
- `POST https://api.mcp.ai/api/api_sports/get/teams/seasons` — Tool to get the list of seasons available for a team. Use when you need to know which seasons a specific team has data for.
  - body: { team: integer }
- `POST https://api.mcp.ai/api/api_sports/get/teams/statistics` — Tool to get detailed statistics of a team for a given league and season. Use after confirming league, season, and team ID.
  - body: { to?: string, date?: string, from?: string, team: integer, venue?: string, league: integer, season: integer }
- `POST https://api.mcp.ai/api/api_sports/get/timezone` — Tool to fetch the complete list of available timezones for fixture queries. Use when you need valid timezone identifiers (e.g., 'Europe/London') before calling fixtures endpoints.
- `POST https://api.mcp.ai/api/api_sports/get/transfers` — Tool to get all available transfers for players and teams. Use when you need transfer history filtered by player or team.
  - body: { team?: integer, player?: integer, season?: integer }
- `POST https://api.mcp.ai/api/api_sports/get/trophies` — Tool to get trophies for a player or coach. Use when you need to list honors filtered by player(s) or coach(es).
  - body: { coach?: integer, coachs?: string, player?: integer, players?: string }
- `POST https://api.mcp.ai/api/api_sports/get/venues` — Tool to retrieve available venues. Use when filtering venues by id, name, city, country, or search before fetching detailed venue data.
  - body: { id?: integer, city?: string, name?: string, search?: string, country?: string }

## Example prompts
- "What can I do in API-Sports?"
- "Show me a summary of my API-Sports account"

## More
- Page: https://mcp.ai/api_sports
- Agent spec (llms.txt): https://mcp.ai/api_sports/llms.txt
- Postman collection: https://mcp.ai/api_sports/postman.json
