API Sports Football Get Leagues

1 credits/call
ae_api_sports_football_get_leagues

Search for football leagues and cups by name, country, or team in API-Sports Football.

Entertainment
1 credits/call

Pricing

1 credits/call
ConditionCharge
Each call1 credits/call

Parameters

Optional parameters use the platform defaults when omitted.

ParameterTypeRequiredDescriptionDefault
idintegerNoFilter by id.—
codestringNoFilter by code.—
lastintegerNoFilter by last.—
namestringNoFilter by name.—
teamintegerNoFilter by team.—
typestringNoFilter by type.—
searchstringNoFilter by search.—
seasonintegerNoFilter by season.—
countrystringNoFilter by country.—
currentstringNoFilter by current.—

Invocation example

Copy the request and explore its response example.

POST/agent-api/v1/tool/executeX-Api-Key
Request coderequest.sh
curl --request POST \
  --url 'https://agentearth.ai/agent-api/v1/tool/execute?tool_name=ae_api_sports_football_get_leagues' \
  --header "X-Api-Key: $AGENTEARTH_API_KEY" \
  --header 'Content-Type: application/json' \
  --data-raw '{
  "params": {
    "search": "Nations League"
  }
}'
Response exampleresponse.json
JSONPartial content
{
  "errors": [],
  "get": "leagues",
  "paging": {
    "current": 1,
    "total": 1
  },
  "parameters": {
    "search": "Nations League"
  },
  "response": [
    {
      "country": {
        "code": null,
        "flag": null,
        "name": "World"
      },
      "league": {
        "id": 5,
        "logo": "https://media.api-sports.io/football/leagues/5.png",
        "name": "UEFA Nations League",
        "type": "Cup"
      },
      "seasons": [
        {
          "coverage": {
            "fixtures": {},
            "injuries": false,
            "odds": false,
            "players": true,
            "predictions": true,
            "standings": true
          },
          "current": false,
          "end": "2019-06-09",
          "start": "2018-09-06",
          "year": 2018
        }
      ]
    }
  ],
  "results": 5
}

This example shows part of the response. Copied content is valid JSON.