league_search
Pack: api-football · Endpoint: https://gateway.pipeworx.io/api-football/mcp
Look up a league/tournament/competition by name to get its league_id.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
name | string | yes | Competition name (e.g. “World Cup”, “Champions League”, “Premier League”) |
country | string | no | Country name to filter |
_apiKey | string | no |
Example call
curl -X POST https://gateway.pipeworx.io/api-football/mcp \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"league_search","arguments":{}}}'
Response shape
Always returns: count, leagues
| Field | Type | Description |
|---|---|---|
count | number | Number of leagues found |
leagues | array | Array of league objects (max 20) |
Full JSON Schema
{
"type": "object",
"properties": {
"count": {
"type": "number",
"description": "Number of leagues found"
},
"leagues": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "League identifier"
},
"name": {
"type": "string",
"description": "League name"
},
"type": {
"type": "string",
"description": "League type (e.g., League, Cup, Tournament)"
},
"country": {
"type": "string",
"description": "Country name"
},
"seasons": {
"type": "array",
"items": {
"type": "number"
},
"description": "Current season years"
}
}
},
"description": "Array of league objects (max 20)"
}
},
"required": [
"count",
"leagues"
]
}
Connect
Add this to your MCP client config, or use one-click install buttons:
{
"mcpServers": {
"api-football": {
"url": "https://gateway.pipeworx.io/api-football/mcp"
}
}
}
See Getting Started for client-specific install steps.