GnistAI GnistAI
Log in

TheSportsDB (Sports Data)

Sports data — leagues, teams, players, events, and standings from TheSportsDB.

Overview   |   MCP   |   REST API   |   OpenAPI   |   CLI   |   Tutorial   |   Toolkits   |   Home
status: healthy status status healthy healthy tools: 8 tools tools 8 8 type: api wrapper type type api wrapper api wrapper lifecycle: maintained lifecycle lifecycle maintained maintained Entertainment

Data source: TheSportsDB (thesportsdb.com)

MCP Endpoint (Streamable HTTP) https://context.gnist.ai/mcp/thesportsdb/
Authentication

All requests require a Gnist-API-Key header (or api_key query parameter).

Free tier: 100 calls/day. Get your API key.

Tools (8)

search_teams

Search for sports teams by name across all sports.

Returns matching teams with basic info including sport, league, country,
and stadium. Use the returned team ID with get_team, get_last_events,
or get_next_events.

Examples:
search_teams("Arsenal") -> Arsenal FC, Arsenal de Sarandi, etc.
search_teams("Real Madrid") -> Real Madrid CF

ParameterTypeRequiredDescription
team_namestringrequiredTeam name to search for (e.g. 'Arsenal', 'Barcelona', 'Lakers').
JSON-RPC Request
{
  "jsonrpc": "2.0",
  "method": "tools/call",
  "id": 1,
  "params": {
    "name": "search_teams",
    "arguments": {
      "team_name": "example"
    }
  }
}
get_team

Get detailed information for a specific team by its ID.

Returns full team profile including stadium details, description, badge URL,
jersey image, website, and league information.

Use search_teams first to find the team ID.

ParameterTypeRequiredDescription
team_idstringrequiredNumeric team ID from TheSportsDB (e.g. '133604' for Arsenal).
JSON-RPC Request
{
  "jsonrpc": "2.0",
  "method": "tools/call",
  "id": 1,
  "params": {
    "name": "get_team",
    "arguments": {
      "team_id": "example"
    }
  }
}
search_players

Search for players by team name and/or player name.

At least one of team_name or player_name must be provided. Returns player
profiles including nationality, position, height, weight, and biography.

Examples:
search_players(player_name="Messi") -> Lionel Messi
search_players(team_name="Arsenal", player_name="Saka") -> Bukayo Saka

ParameterTypeRequiredDescription
team_nameanyoptionalTeam name to filter players by (e.g. 'Arsenal').
player_nameanyoptionalPlayer name to search for (e.g. 'Messi', 'LeBron').
JSON-RPC Request
{
  "jsonrpc": "2.0",
  "method": "tools/call",
  "id": 1,
  "params": {
    "name": "search_players",
    "arguments": {}
  }
}
get_league_table

Get league standings/table for a given league and season.

Returns the complete standings with points, wins, draws, losses,
goals for/against, and goal difference for each team.

Common league IDs: 4328 (EPL), 4335 (La Liga), 4331 (Bundesliga),
4332 (Serie A), 4334 (Ligue 1).

ParameterTypeRequiredDescription
league_idstringrequiredNumeric league ID (e.g. '4328' for English Premier League).
seasonstringrequiredSeason in YYYY or YYYY-YYYY format (e.g. '2024-2025').
JSON-RPC Request
{
  "jsonrpc": "2.0",
  "method": "tools/call",
  "id": 1,
  "params": {
    "name": "get_league_table",
    "arguments": {
      "league_id": "example",
      "season": "example"
    }
  }
}
get_events_by_date

Get sporting events scheduled for a specific date.

Returns events with home/away teams, scores (if completed), venue,
and status. Optionally filter by sport.

Examples:
get_events_by_date("2025-03-15") -> all sports events on that date
get_events_by_date("2025-03-15", sport="Soccer") -> only soccer matches

ParameterTypeRequiredDescription
datestringrequiredDate in YYYY-MM-DD format (e.g. '2025-03-15').
sportanyoptionalSport filter (e.g. 'Soccer', 'Basketball', 'Ice Hockey'). Omit for all sports.
JSON-RPC Request
{
  "jsonrpc": "2.0",
  "method": "tools/call",
  "id": 1,
  "params": {
    "name": "get_events_by_date",
    "arguments": {
      "date": "example"
    }
  }
}
get_last_events

Get the last 5 completed events for a team.

Returns recent match results including scores, opponents, venue, and date.
Useful for checking recent form.

ParameterTypeRequiredDescription
team_idstringrequiredNumeric team ID (e.g. '133604' for Arsenal). Use search_teams to find it.
JSON-RPC Request
{
  "jsonrpc": "2.0",
  "method": "tools/call",
  "id": 1,
  "params": {
    "name": "get_last_events",
    "arguments": {
      "team_id": "example"
    }
  }
}
get_next_events

Get the next 5 upcoming events for a team.

Returns scheduled fixtures with opponents, date, time, and venue.
Useful for checking upcoming matches.

ParameterTypeRequiredDescription
team_idstringrequiredNumeric team ID (e.g. '133604' for Arsenal). Use search_teams to find it.
JSON-RPC Request
{
  "jsonrpc": "2.0",
  "method": "tools/call",
  "id": 1,
  "params": {
    "name": "get_next_events",
    "arguments": {
      "team_id": "example"
    }
  }
}
report_feedback

Report a bug, feature request, or general feedback for this data source.

Use this when something doesn't work as expected, when you'd like
a new feature, or when you have suggestions for improvement.

Args:
feedback: Describe the issue or suggestion.
feedback_type: One of 'bug', 'feature_request', or 'general'.

ParameterTypeRequiredDescription
feedbackstringrequired
feedback_typestringoptional (default: "general")
JSON-RPC Request
{
  "jsonrpc": "2.0",
  "method": "tools/call",
  "id": 1,
  "params": {
    "name": "report_feedback",
    "arguments": {
      "feedback": "example"
    }
  }
}

Quick Start

Shell
curl -X POST "https://context.gnist.ai/mcp/thesportsdb/" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -H "Gnist-API-Key: YOUR_API_KEY" \
  -d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "search_teams", "arguments": {"team_name": "example"}}}'
Python
import httpx

resp = httpx.post(
    "https://context.gnist.ai/mcp/thesportsdb/",
    headers={"Gnist-API-Key": "YOUR_API_KEY", "Content-Type": "application/json"},
    json={
  "jsonrpc": "2.0",
  "method": "tools/call",
  "id": 1,
  "params": {
    "name": "search_teams",
    "arguments": {
      "team_name": "example"
    }
  }
},
)
print(resp.json())

Related Toolkits (Entertainment)

Resources