Skip to main content
GET
/
league-info
Get league information
curl --request GET \
  --url https://api.polyrouter.io/functions/v1/league-info \
  --header 'X-API-Key: <api-key>'
{
  "leagues": [
    {
      "id": "nfl",
      "name": "National Football League",
      "abbreviation": "NFL",
      "sport": "football",
      "season": {
        "year": 123,
        "start_date": "2023-12-25",
        "end_date": "2023-12-25"
      },
      "teams": [
        "<any>"
      ]
    }
  ],
  "meta": {
    "request_time": 123,
    "cache_hit": true,
    "data_freshness": "2023-11-07T05:31:56Z"
  }
}

Authorizations

X-API-Key
string
header
required

API key for authentication

Query Parameters

league
enum<string>

Filter by specific league. Returns all leagues if not specified.

Available options:
nfl,
nba,
nhl,
mlb,

Response

League information retrieved successfully

leagues
object[]
meta
object