Skip to main content

Get Club Seasons

curl -X GET "https://your-domain.com/api/seasons?id=1" \
  -H "X-API-Key: your-api-key-here"
Retrieve all available seasons for a specific club. Returns seasons sorted by year in descending order (most recent first).

Query Parameters

id
integer
required
Club ID to retrieve seasons for

Response

Returns an array of seasons for the club.
id
integer
Unique identifier for the season
year
string
Season year in format “YYYY” or “YYYY-YY” (e.g., “2024” or “2024-25”)
[
  {
    "id": 123,
    "year": "2024-25"
  },
  {
    "id": 122,
    "year": "2023-24"
  },
  {
    "id": 121,
    "year": "2022-23"
  },
  {
    "id": 120,
    "year": "2021-22"
  }
]
This endpoint is cached for optimal performance. Results include only seasons where the club has available kits.

Search Seasons

curl -X GET "https://your-domain.com/api/seasons/search?keyword=2025" \
  -H "X-API-Key: your-api-key-here"
Search for seasons by year with support for partial year matching. Returns up to 10 matching seasons sorted by relevance and year.

Query Parameters

keyword
string
required
Year or partial year to search for. Supports various formats:
  • Full year: “2025” (matches “2025”, “2024-25”, “2025-26”)
  • Partial year with dash: “2025-” (matches “2024-25”, “2025-26”)
  • Full season: “2020-21” (matches exactly “2020-21”)
  • Two-digit year: “97” (matches “1997”, “1996-97”)

Response

Returns an array of up to 10 matching seasons.
id
integer
Unique identifier for the season
year
string
Season year in format “YYYY” or “YYYY-YY”
[
  {
    "id": 150,
    "year": "2025"
  },
  {
    "id": 123,
    "year": "2025-26"
  },
  {
    "id": 122,
    "year": "2024-25"
  }
]

Search Priority

Results are ordered by relevance:
  1. Exact match - “2025” matches “2025”
  2. Starts with keyword - “2025” matches “2025-26” (first_year matches)
  3. Ends with keyword - “2025” matches “2024-25” (second_year matches)
  4. Contains keyword - “2025” matches “2025-27” (in first_year or second_year)
For 2-digit years (e.g., “97”):
  • Priority 2: first_year ends with “97” (e.g., “1997”)
  • Priority 3: second_year ends with “97” (e.g., “1996-97”)

Examples

curl -X GET "https://your-domain.com/api/seasons/search?keyword=2025"
# Returns: "2025", "2025-26", "2024-25"
Results are cached for optimal performance and limited to 10 matches.

Get Season by ID

curl -X GET "https://your-domain.com/api/seasons/123" \
  -H "X-API-Key: your-api-key-here"
Retrieve detailed information about a specific season by its ID.

Path Parameters

season_id
integer
required
The unique identifier of the season

Response

id
integer
Unique identifier for the season
year
string
Season year in format “YYYY” or “YYYY-YY”
{
  "id": 123,
  "year": "2024-25"
}