league_search

Pack: api-football · Connect: https://pipeworx.io/mcp (see Connect below for a single-pack URL)

No MCP client? Call it directly: GET https://gateway.pipeworx.io/v1/tools/league_search for the schema, then POST the same URL with its arguments for the data.

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

Arguments

{
  "name": "Premier League"
}

curl

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":{"name":"Premier League"}}}'

TypeScript (@pipeworx/sdk)

import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();

const result = await pipeworx.call('league_search', {
  "name": "Premier League"
});

More examples

{
  "name": "Série A",
  "country": "Brazil"
}

Response shape

Full JSON Schema
{
  "type": "object",
  "oneOf": [
    {
      "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)"
        },
        "found": {
          "type": "boolean",
          "enum": [
            true
          ],
          "description": "Present and true on an answer; a miss is the found:false branch."
        }
      },
      "required": [
        "count",
        "leagues"
      ]
    },
    {
      "type": "object",
      "description": "A miss or an unavailable upstream: found:false with a reason and a hint (the shape check-found-false-schemas.mjs expects).",
      "properties": {
        "found": {
          "type": "boolean",
          "enum": [
            false
          ]
        }
      },
      "required": [
        "found"
      ]
    }
  ]
}

Connect

Add this to your MCP client config — every tool in the catalog, including this one — or use one-click install buttons:

{
  "mcpServers": {
    "pipeworx": {
      "url": "https://pipeworx.io/mcp"
    }
  }
}
Connect to just the api-football pack
{
  "mcpServers": {
    "api-football": {
      "url": "https://gateway.pipeworx.io/api-football/mcp"
    }
  }
}

See Getting Started for client-specific install steps.

Regenerated from source · build November 15, 2026