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

NameTypeRequiredDescription
namestringyesCompetition name (e.g. “World Cup”, “Champions League”, “Premier League”)
countrystringnoCountry name to filter
_apiKeystringno

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

FieldTypeDescription
countnumberNumber of leagues found
leaguesarrayArray 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.

Regenerated from source · build May 21, 2026