PHPackages                             tetzilla/sportmonks-football-api - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. tetzilla/sportmonks-football-api

ActiveLibrary[API Development](/categories/api)

tetzilla/sportmonks-football-api
================================

Simple SportMonks Football API Client for PHP

1.0.5(2y ago)31176[2 PRs](https://github.com/tetzilla/sportmonks-football-api/pulls)MITPHPPHP ^7.3 | ^8

Since Aug 8Pushed 2y ago2 watchersCompare

[ Source](https://github.com/tetzilla/sportmonks-football-api)[ Packagist](https://packagist.org/packages/tetzilla/sportmonks-football-api)[ RSS](/packages/tetzilla-sportmonks-football-api/feed)WikiDiscussions master Synced yesterday

READMEChangelog (6)Dependencies (1)Versions (7)Used By (0)

Sportmonks Football API PHP Client
==================================

[](#sportmonks-football-api-php-client)

PHP Library for [Sportmonks](https://www.sportmonks.com/) Soccer API v3. Developed by [Carsten Tetzlaff](mailto:carsten-tetzlaff@outlook.com). This Library is heavily inspired by .

Prerequisites
-------------

[](#prerequisites)

PHP &gt;= 7.3

Installation
------------

[](#installation)

```
composer require tetzilla/sportmonks-football-api

```

Setup
-----

[](#setup)

The API Client relies on [Environment variables](https://www.php.net/manual/en/reserved.variables.environment.php) for configuration (setting API token &amp; timezone).

Prerequisites
-------------

[](#prerequisites-1)

PHP &gt;= 7.3

Install:

```
composer require symfony/dotenv

```

Usage:

```
use Symfony\Component\Dotenv\Dotenv;
$dotenv = new Dotenv();
$dotenv->load(__DIR__.'/.env');

```

An example .env file:

```
# API TOKEN (Required)
# https://docs.sportmonks.com/football/welcome/authentication
SPORTMONKS_API_TOKEN=_YOUR_API_TOKEN_HERE

# TIMEZONE (Optional)
# https://docs.sportmonks.com/football/tutorials-and-guides/tutorials/introduction/set-your-time-zone
SPORTMONKS_TIMEZONE=Europe/London
```

Usage
-----

[](#usage)

```
use Sportmonks\Football\FootballApi;

...

// Basic API call for all Bookmakers
$response = FootballApi::bookmakers()->getAll();
```

Pagination, Filtering, Sorting &amp; Data Enrichment
----------------------------------------------------

[](#pagination-filtering-sorting--data-enrichment)

The [Sportmonks API](https://docs.sportmonks.com/football/tutorials-and-guides/tutorials/introduction/make-your-first-request)allows for advanced filtering and sorting, as well as adding data via relationships. This client supports the following:

### Pagination

[](#pagination)

```
// API call for Fixtures with page specified
$response = FootballApi::fixtures()
    ->setPage(3)
    ->getByDate('2023-03-19');
```

Note: The pagination (`$response['pagination']`) can be used to loop through pages and build a result set.

### Includes

[](#includes)

```
// API call for Fixtures with includes
$response = FootballApi::fixtures()
    ->setInclude(['scores', 'lineups', 'events'])
    ->getByDate('2023-03-19');
```

### Filtering

[](#filtering)

##### Entity filter

[](#entity-filter)

```
// API call for Fixtures with filters
$response = FootballApi::fixtures()
    ->setInclude(['events','statistics.type'])
    ->setFilters(['eventTypes' => [18,14]])
    ->getByDate('2023-03-19');
```

##### Deleted filter

[](#deleted-filter)

```
// API call for Fixtures with deleted filter
$response = FootballApi::fixtures()
    ->setFilters(['deleted'])
    ->all();
```

##### Populate filter

[](#populate-filter)

```
// API call for Fixtures with populate (1000 per page)
$response = FootballApi::fixtures()
    ->setFilters(['populate'])
    ->all();
```

Note: This client will not validate the usage for the correct endpoints and will not throw an error. Refer to the [Sportmonks docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints) to see which endpoints support the above parameters.

Full Endpoint Examples
----------------------

[](#full-endpoint-examples)

### Livescores

[](#livescores)

##### Get all - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/livescores/get-all-livescores)

[](#get-all---view-sportmonks-docs)

```
$response = FootballApi::livescores()->all();
```

##### Get all inplay - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/livescores/get-inplay-livescores)

[](#get-all-inplay---view-sportmonks-docs)

```
$response = FootballApi::livescores()->inplay();
```

##### Get latest - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/livescores/get-latest-updated-livescores)

[](#get-latest---view-sportmonks-docs)

```
$response = FootballApi::livescores()->latest();
```

### Fixtures

[](#fixtures)

#### Get all - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/fixtures/get-all-fixtures)

[](#get-all---view-sportmonks-docs-1)

```
$response = FootballApi::fixtures()->all();
```

##### Get by Id - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/fixtures/get-fixture-by-id)

[](#get-by-id---view-sportmonks-docs)

```
$response = FootballApi::fixtures()->getById($fixtureId);
```

##### Get by multiple ids - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/fixtures/get-fixtures-by-multiple-ids)

[](#get-by-multiple-ids---view-sportmonks-docs)

```
$response = FootballApi::fixtures()->getByMultipleIds([$fixtureId1,$fixtureIds2,...]);
```

##### Get by date - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/fixtures/get-fixtures-by-multiple-ids)

[](#get-by-date---view-sportmonks-docs)

```
$response = FootballApi::fixtures()->getByDate($date);
```

##### Get by date range - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/fixtures/get-fixtures-by-date-range)

[](#get-by-date-range---view-sportmonks-docs)

```
$response = FootballApi::fixtures()->getByDateRange($dateFrom, $dateTo);
```

##### Get by date range for team - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/fixtures/get-fixtures-by-date-range-for-team)

[](#get-by-date-range-for-team---view-sportmonks-docs)

```
$response = FootballApi::fixtures()->getByDateRangeForTeam($dateFrom, $dateTo, $teamId);
```

##### Get by head to head - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/fixtures/get-fixtures-by-head-to-head)

[](#get-by-head-to-head---view-sportmonks-docs)

```
$response = FootballApi::fixtures()->getHeadToHead($teamId1, $teamId2);
```

##### Get upcoming by market id - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/fixtures/get-upcoming-fixtures-by-market-id)

[](#get-upcoming-by-market-id---view-sportmonks-docs)

```
$response = FootballApi::fixtures()->getUpcommingByMarketId($marketId);
```

##### Get by search by name - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/fixtures/get-fixtures-by-search-by-name)

[](#get-by-search-by-name---view-sportmonks-docs)

```
$response = FootballApi::fixtures()->search($searchQuery);
```

##### Get last updated - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/fixtures/get-latest-updated-fixtures)

[](#get-last-updated---view-sportmonks-docs)

```
$response = FootballApi::fixtures()->getLastUpdated();
```

### States

[](#states)

#### Get all states - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/states)

[](#get-all-states---view-sportmonks-docs)

```
$response = FootballApi::states()->all();
```

#### Get by id - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/states/get-state-by-id)

[](#get-by-id---view-sportmonks-docs-1)

```
$response = FootballApi::states()->getById();
```

### Leagues

[](#leagues)

##### Get all - [View Sportmonks Docs](https://sportmonks.com/docs/football/2.0/leagues/a/get-all-leagues/6)

[](#get-all---view-sportmonks-docs-2)

```
$response = FootballApi::leagues()->all();
```

##### Get by Id - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/leagues/get-leagues-by-live)

[](#get-by-id---view-sportmonks-docs-2)

```
$response = FootballApi::leagues()->getById($leagueId);
```

##### Get by live - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/leagues/get-leagues-by-live)

[](#get-by-live---view-sportmonks-docs)

```
$response = FootballApi::leagues()->live();
```

##### Get by fixture date - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/leagues/get-leagues-by-fixture-date)

[](#get-by-fixture-date---view-sportmonks-docs)

```
$response = FootballApi::leagues()->getByFixtureDate($date);
```

##### Get by country id- [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/leagues/get-leagues-by-country-id)

[](#get-by-country-id--view-sportmonks-docs)

```
$response = FootballApi::leagues()->getByCountryId($countryId);
```

##### Get by search by name - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/leagues/get-leagues-search-by-name)

[](#get-by-search-by-name---view-sportmonks-docs-1)

```
$response = FootballApi::leagues()->search($searchQuery);
```

##### Get all by team id - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/leagues/get-all-leagues-by-team-id)

[](#get-all-by-team-id---view-sportmonks-docs)

```
$response = FootballApi::leagues()->getAllByTeamId($teamId);
```

##### Get current by team id - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/leagues/get-current-leagues-by-team-id)

[](#get-current-by-team-id---view-sportmonks-docs)

```
$response = FootballApi::leagues()->getCurrentByTeamId($teamId);
```

### Seasons

[](#seasons)

##### Get all - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/seasons/get-all-seasons)

[](#get-all---view-sportmonks-docs-3)

```
$response = FootballApi::season()->all();
```

##### Get by id - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/seasons/get-seasons-by-id)

[](#get-by-id---view-sportmonks-docs-3)

```
$response = FootballApi::season()->getById($seasonId);
```

##### Get by team id - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/seasons/get-seasons-by-team-id)

[](#get-by-team-id---view-sportmonks-docs)

```
$response = FootballApi::season()->getByTeamId($teamId);
```

##### Get by search by name - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/seasons/get-seasons-by-search-by-name)

[](#get-by-search-by-name---view-sportmonks-docs-2)

```
$response = FootballApi::season()->search($searchQuery);
```

### Schedules

[](#schedules)

##### Get by season id - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/schedules/get-schedules-by-season-id)

[](#get-by-season-id---view-sportmonks-docs)

```
$response = FootballApi::schedules()->bySeasonId($seasonId);
```

##### Get by season id - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/schedules/get-schedules-by-team-id)

[](#get-by-season-id---view-sportmonks-docs-1)

```
$response = FootballApi::schedules()->byTeamId($teamId);
```

##### Get by season id and team id - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/schedules/get-schedules-by-season-id-and-team-id)

[](#get-by-season-id-and-team-id---view-sportmonks-docs)

```
$response = FootballApi::schedules()->bySeasonAndTeamId($seasonId, $teamId);
```

### Stages

[](#stages)

##### Get all - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/stages/get-all-stages)

[](#get-all---view-sportmonks-docs-4)

```
$response = FootballApi::stages()->all();
```

##### Get by id - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/stages/get-stage-by-id)

[](#get-by-id---view-sportmonks-docs-4)

```
$response = FootballApi::stages()->getById($stageId);
```

##### Get by season id - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/stages/get-stages-by-season-id)

[](#get-by-season-id---view-sportmonks-docs-2)

```
$response = FootballApi::stages()->getBySeasonId($seasonId);
```

##### Get by search by name - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/stages/get-stages-by-search-by-name)

[](#get-by-search-by-name---view-sportmonks-docs-3)

```
$response = FootballApi::stages()->search($searchQuery);
```

### Rounds

[](#rounds)

##### Get all - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/rounds/get-all-rounds)

[](#get-all---view-sportmonks-docs-5)

```
$response = FootballApi::rounds()->all();
```

##### Get by id - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/rounds/get-round-by-id)

[](#get-by-id---view-sportmonks-docs-5)

```
$response = FootballApi::rounds()->getById($roundId);
```

##### Get by season id - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/rounds/get-rounds-by-season-id)

[](#get-by-season-id---view-sportmonks-docs-3)

```
$response = FootballApi::rounds()->getBySeasonId($seasonId);
```

##### Get by search by name - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/rounds/get-rounds-by-search-by-name)

[](#get-by-search-by-name---view-sportmonks-docs-4)

```
$response = FootballApi::rounds()->search($searchQuery);
```

### Standings

[](#standings)

##### Get all - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/standings/get-all-standings)

[](#get-all---view-sportmonks-docs-6)

```
$response = FootballApi::standings()->all();
```

##### Get by id - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/standings/get-standings-by-season-id)

[](#get-by-id---view-sportmonks-docs-6)

```
$response = FootballApi::standings()->getBySeasonId($seasonId);
```

##### Get by round id - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/standings/get-standings-by-round-id)

[](#get-by-round-id---view-sportmonks-docs)

```
$response = FootballApi::standings()->getByRoundId($roundId);
```

##### Get corrections by season id - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/standings/get-standing-correction-by-season-id)

[](#get-corrections-by-season-id---view-sportmonks-docs)

```
$response = FootballApi::standings()->getCorrectionsBySeasonId($seasonId);
```

##### Get live standings by league id - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/standings/get-live-standings-by-league-id)

[](#get-live-standings-by-league-id---view-sportmonks-docs)

```
$response = FootballApi::standings()->getLiveByLeagueId($leagueId);
```

### Topscorers

[](#topscorers)

#### Get all by season id - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/topscorers/get-topscorers-by-season-id)

[](#get-all-by-season-id---view-sportmonks-docs)

```
$response = FootballApi::topscorers()->getBySeasonId($seasonId);
```

#### Get all by stage id - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/topscorers/get-topscorers-by-stage-id)

[](#get-all-by-stage-id---view-sportmonks-docs)

```
$response = FootballApi::topscorers()->getByStageId($stageId);
```

### Teams

[](#teams)

#### Get all - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/teams/get-all-teams)

[](#get-all---view-sportmonks-docs-7)

```
$response = FootballApi::teams()->all();
```

#### Get by id - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/teams/get-team-by-id)

[](#get-by-id---view-sportmonks-docs-7)

```
$response = FootballApi::teams()->getById($teamId);
```

#### Get by country id - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/teams/get-teams-by-country-id)

[](#get-by-country-id---view-sportmonks-docs)

```
$response = FootballApi::teams()->getByCountryId($countryId);
```

#### Get by season id - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/teams/get-teams-by-season-id)

[](#get-by-season-id---view-sportmonks-docs-4)

```
$response = FootballApi::teams()->getBySeasonId($seasonId);
```

#### Get by search by name - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/teams/get-teams-by-search-by-name)

[](#get-by-search-by-name---view-sportmonks-docs-5)

```
$response = FootballApi::teams()->search($searchQuery);
```

### Team Squads

[](#team-squads)

#### Get by team id - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/teams/get-teams-by-search-by-name)

[](#get-by-team-id---view-sportmonks-docs-1)

```
$response = FootballApi::teamSquads()->getByTeamId($teamId);
```

#### Get by team id and season id - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/teams/get-teams-by-search-by-name)

[](#get-by-team-id-and-season-id---view-sportmonks-docs)

```
$response = FootballApi::teamSquads()->getByTeamAndSeasonId($teamId,$seasonId);
```

### Players

[](#players)

#### Get all - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/players/get-all-players)

[](#get-all---view-sportmonks-docs-8)

```
$response = FootballApi::players()->all();
```

#### Get by id - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/players/get-player-by-id)

[](#get-by-id---view-sportmonks-docs-8)

```
$response = FootballApi::players()->getById($playerId);
```

#### Get by country id - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/players/get-players-by-country-id)

[](#get-by-country-id---view-sportmonks-docs-1)

```
$response = FootballApi::players()->getByCountryId($countryId);
```

#### Get by search by name - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/players/get-players-by-search-by-name)

[](#get-by-search-by-name---view-sportmonks-docs-6)

```
$response = FootballApi::players()->search($searchQuery);
```

#### Get last updated - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/players/get-last-updated-players)

[](#get-last-updated---view-sportmonks-docs-1)

```
$response = FootballApi::players()->getLastUpdated();
```

### Coaches

[](#coaches)

#### Get all - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/coaches/get-all-coaches)

[](#get-all---view-sportmonks-docs-9)

```
$response = FootballApi::coaches()->all();
```

#### Get by id - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/coaches/get-coach-by-id)

[](#get-by-id---view-sportmonks-docs-9)

```
$response = FootballApi::coaches()->getById($coachId);
```

#### Get by country id - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/coaches/get-coaches-by-country-id)

[](#get-by-country-id---view-sportmonks-docs-2)

```
$response = FootballApi::coaches()->getByCountryId($countryId);
```

#### Get by search by name - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/coaches/get-coaches-by-search-by-name)

[](#get-by-search-by-name---view-sportmonks-docs-7)

```
$response = FootballApi::coaches()->search($searchQuery);
```

#### Get last updated - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/coaches/get-last-updated-coaches)

[](#get-last-updated---view-sportmonks-docs-2)

```
$response = FootballApi::coaches()->getLastUpdated();
```

### Referees

[](#referees)

#### Get all - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/referees/get-all-referees)

[](#get-all---view-sportmonks-docs-10)

```
$response = FootballApi::referees()->all();
```

#### Get by id - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/referees/get-referee-by-id)

[](#get-by-id---view-sportmonks-docs-10)

```
$response = FootballApi::referees()->getById($refereeId);
```

#### Get by country id - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/referees/get-referees-by-country-id)

[](#get-by-country-id---view-sportmonks-docs-3)

```
$response = FootballApi::referees()->getByCountryId($countryId);
```

#### Get by season id - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/referees/get-referees-by-season-id)

[](#get-by-season-id---view-sportmonks-docs-5)

```
$response = FootballApi::referees()->getBySeasonId($countryId);
```

#### Get by search by name - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/referees/get-referees-by-search-by-name)

[](#get-by-search-by-name---view-sportmonks-docs-8)

```
$response = FootballApi::referees()->search($searchQuery);
```

#### Transfers

[](#transfers)

#### Get all - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/transfers/get-all-transfers)

[](#get-all---view-sportmonks-docs-11)

```
$response = FootballApi::transfers()->all();
```

#### Get by id - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/transfers/get-transfer-by-id)

[](#get-by-id---view-sportmonks-docs-11)

```
$response = FootballApi::transfers()->getById($transferId);
```

#### Get latest - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/transfers/get-latest-transfers)

[](#get-latest---view-sportmonks-docs-1)

```
$response = FootballApi::transfers()->latest();
```

#### Get between date range - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/transfers/get-transfers-between-date-range)

[](#get-between-date-range---view-sportmonks-docs)

```
$response = FootballApi::transfers()->getByDateRange($dateFrom,$dateTo);
```

#### Get by team id - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/transfers/get-transfers-by-team-id)

[](#get-by-team-id---view-sportmonks-docs-2)

```
$response = FootballApi::transfers()->getByTeamId($teamId);
```

#### Get by player id - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/transfers/get-transfers-by-player-id)

[](#get-by-player-id---view-sportmonks-docs)

```
$response = FootballApi::transfers()->getByPlayerId($playerId);
```

### Venues

[](#venues)

#### Get all - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/venues/get-all-venues)

[](#get-all---view-sportmonks-docs-12)

```
$response = FootballApi::venues()->all();
```

#### Get by id - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/venues/get-venue-by-id)

[](#get-by-id---view-sportmonks-docs-12)

```
$response = FootballApi::venues()->getById($venueId);
```

#### Get by season id - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/venues/get-venues-by-season-id)

[](#get-by-season-id---view-sportmonks-docs-6)

```
$response = FootballApi::venues()->getBySeasonId($seasonId);
```

#### Get by search by name - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/venues/get-venues-by-search-by-name)

[](#get-by-search-by-name---view-sportmonks-docs-9)

```
$response = FootballApi::venues()->search($searchQuery);
```

### TV Stations

[](#tv-stations)

#### Get all - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/tv-stations/get-all-tv-stations)

[](#get-all---view-sportmonks-docs-13)

```
$response = FootballApi::tvStations()->all();
```

#### Get by id - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/tv-stations/get-tv-station-by-id)

[](#get-by-id---view-sportmonks-docs-13)

```
$response = FootballApi::tvStations()->getById($stationId);
```

#### Get by fixture id - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/tv-stations/get-tv-stations-by-fixture-id)

[](#get-by-fixture-id---view-sportmonks-docs)

```
$response = FootballApi::tvStations()->getByFixtureId($fixtureId);
```

### Predictions

[](#predictions)

#### Get predictability - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/predictions/get-probabilities)

[](#get-predictability---view-sportmonks-docs)

```
$response = FootballApi::predictions()->probabilities();
```

#### Get predictability by league id - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/predictions/get-predictability-by-league-id)

[](#get-predictability-by-league-id---view-sportmonks-docs)

```
$response = FootballApi::predictions()->getPredictabilityByLeagueId($leagueId);
```

#### Get predictability by fixture id - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/predictions/get-probabilities-by-fixture-id)

[](#get-predictability-by-fixture-id---view-sportmonks-docs)

```
$response = FootballApi::tvStations()->getPredictabilityByFixtureId($fixtureId);
```

#### Get value bets - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/predictions/get-value-bets)

[](#get-value-bets---view-sportmonks-docs)

```
$response = FootballApi::tvStations()->valueBets();
```

### Pre-match Odds

[](#pre-match-odds)

#### Get all - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/pre-match-odds/get-all-odds)

[](#get-all---view-sportmonks-docs-14)

```
$response = FootballApi::preMatchOdds()->all();
```

#### Get by fixture id - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/pre-match-odds/get-odds-by-fixture-id)

[](#get-by-fixture-id---view-sportmonks-docs-1)

```
$response = FootballApi::preMatchOdds()->getByFixtureId($fixtureId);
```

#### Get by fixture id and bookmaker id - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/pre-match-odds/get-odds-by-fixture-id-and-bookmaker-id)

[](#get-by-fixture-id-and-bookmaker-id---view-sportmonks-docs)

```
$response = FootballApi::preMatchOdds()->getByFixtureAndBookmakerId($fixtureId,$bookmakerId);
```

#### Get by fixture id and market id - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/pre-match-odds/get-odds-by-fixture-id-and-market-id)

[](#get-by-fixture-id-and-market-id---view-sportmonks-docs)

```
$response = FootballApi::preMatchOdds()->getByFixtureAndMarketId($fixtureId,$marketId);
```

#### Get last updated - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/pre-match-odds/get-last-updated-odds)

[](#get-last-updated---view-sportmonks-docs-3)

```
$response = FootballApi::preMatchOdds()->getLastUpdated();
```

### Inplay Odds

[](#inplay-odds)

#### Get all - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/inplay-odds/get-all-inplay-odds)

[](#get-all---view-sportmonks-docs-15)

```
$response = FootballApi::inplayOdds()->all();
```

#### Get by fixture id - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/inplay-odds/get-inplay-odds-by-fixture-id)

[](#get-by-fixture-id---view-sportmonks-docs-2)

```
$response = FootballApi::inplayOdds()->getByFixtureId($fixtureId);
```

#### Get by fixture id and bookmaker id - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/inplay-odds/get-inplay-odds-by-fixture-id-and-bookmaker-id)

[](#get-by-fixture-id-and-bookmaker-id---view-sportmonks-docs-1)

```
$response = FootballApi::inplayOdds()->getByFixtureAndBookmakerId($fixtureId,$bookmakerId);
```

#### Get by fixture id and market id - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/inplay-odds/get-inplay-odds-by-fixture-id-and-market-id)

[](#get-by-fixture-id-and-market-id---view-sportmonks-docs-1)

```
$response = FootballApi::inplayOdds()->getByFixtureAndMarketId($fixtureId,$marketId);
```

#### Get last updated - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/inplay-odds/get-last-updated-inplay-odds)

[](#get-last-updated---view-sportmonks-docs-4)

```
$response = FootballApi::inplayOdds()->getLastUpdated();
```

### Markets

[](#markets)

#### Get all - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/markets/get-all-markets)

[](#get-all---view-sportmonks-docs-16)

```
$response = FootballApi::markets()->all();
```

#### Get by market id - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/markets/get-market-by-id)

[](#get-by-market-id---view-sportmonks-docs)

```
$response = FootballApi::markets()->getById($marketId);
```

#### Get by search - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/markets/get-market-by-search)

[](#get-by-search---view-sportmonks-docs)

```
$response = FootballApi::markets()->search($searchQuery);
```

### Bookmakers

[](#bookmakers)

#### Get all - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/bookmakers/get-all-bookmakers)

[](#get-all---view-sportmonks-docs-17)

```
$response = FootballApi::bookmakers()->all();
```

#### Get by bookmaker id - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/bookmakers/get-bookmaker-by-id)

[](#get-by-bookmaker-id---view-sportmonks-docs)

```
$response = FootballApi::bookmakers()->getById($bookmakerId);
```

#### Get by search - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/bookmakers/get-bookmaker-by-search)

[](#get-by-search---view-sportmonks-docs-1)

```
$response = FootballApi::bookmakers()->search($searchQuery);
```

#### Get by market id - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/bookmakers/get-bookmaker-by-fixture-id)

[](#get-by-market-id---view-sportmonks-docs-1)

```
$response = FootballApi::bookmakers()->getByFixtureId($fixtureId);
```

### News

[](#news)

#### Get pre-match news - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/news/get-pre-match-news)

[](#get-pre-match-news---view-sportmonks-docs)

```
$response = FootballApi::preMatchNews()->all();
```

#### Get by season id - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/news/get-pre-match-news-by-season-id)

[](#get-by-season-id---view-sportmonks-docs-7)

```
$response = FootballApi::preMatchNews()->getBySeasonId($seasonId);
```

#### Get pre-match news for upcoming fixtures - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/news/get-pre-match-news-for-upcoming-fixtures)

[](#get-pre-match-news-for-upcoming-fixtures---view-sportmonks-docs)

```
$response = FootballApi::preMatchNews()->upcomingFixtures();
```

### Rivals

[](#rivals)

#### Get all rivales - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/rivals/get-all-rivals)

[](#get-all-rivales---view-sportmonks-docs)

```
$response = FootballApi::rivals()->all();
```

#### Get by team id - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/rivals/get-rivals-by-team-id)

[](#get-by-team-id---view-sportmonks-docs-3)

```
$response = FootballApi::rivals()->getByTeamId($teamId);
```

### Commentaries

[](#commentaries)

#### Get all commentaries - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/commentaries/get-all-commentaries)

[](#get-all-commentaries---view-sportmonks-docs)

```
$response = FootballApi::commentaries()->all();
```

#### Get by team id - [View Sportmonks Docs](https://docs.sportmonks.com/football/endpoints-and-entities/endpoints/commentaries/get-commentaries-by-fixture-id)

[](#get-by-team-id---view-sportmonks-docs-4)

```
$response = FootballApi::commentaries()->getByFixtureId($fixtureId);
```

Core Endpoints
--------------

[](#core-endpoints)

Core contains all endpoints that are used in all sports.

### Continents 🗺️

[](#continents-️)

#### Get all continents - [View Sportmonks Docs](https://docs.sportmonks.com/football/v/core-api/endpoints/continents/get-all-continents)

[](#get-all-continents---view-sportmonks-docs)

```
$response = FootballApi::continents()->all();
```

#### Get by id - [View Sportmonks Docs](https://docs.sportmonks.com/football/v/core-api/endpoints/continents/get-continent-by-id)

[](#get-by-id---view-sportmonks-docs-14)

```
$response = FootballApi::continents()->getById();
```

### Countries

[](#countries)

#### Get all countries - [View Sportmonks Docs](https://docs.sportmonks.com/football/v/core-api/endpoints/countries/get-all-countries)

[](#get-all-countries---view-sportmonks-docs)

```
$response = FootballApi::countries()->all();
```

#### Get by id - [View Sportmonks Docs](https://docs.sportmonks.com/football/v/core-api/endpoints/countries/get-country-by-id)

[](#get-by-id---view-sportmonks-docs-15)

```
$response = FootballApi::countries()->getById();
```

#### Get by search - [View Sportmonks Docs](https://docs.sportmonks.com/football/v/core-api/endpoints/countries/get-countries-by-search)

[](#get-by-search---view-sportmonks-docs-2)

```
$response = FootballApi::countries()->search($searchQuery);
```

### Regions

[](#regions)

#### Get all regions - [View Sportmonks Docs](https://docs.sportmonks.com/football/v/core-api/endpoints/regions/get-all-regions)

[](#get-all-regions---view-sportmonks-docs)

```
$response = FootballApi::regions()->all();
```

#### Get by id - [View Sportmonks Docs](https://docs.sportmonks.com/football/v/core-api/endpoints/regions/get-region-by-id)

[](#get-by-id---view-sportmonks-docs-16)

```
$response = FootballApi::regions()->getById();
```

#### Get by search - [View Sportmonks Docs](https://docs.sportmonks.com/football/v/core-api/endpoints/regions/get-regions-by-search)

[](#get-by-search---view-sportmonks-docs-3)

```
$response = FootballApi::regions()->search($searchQuery);
```

### Cities 🏙️

[](#cities-️)

#### Get all cities - [View Sportmonks Docs](https://docs.sportmonks.com/football/v/core-api/endpoints/cities/get-all-cities)

[](#get-all-cities---view-sportmonks-docs)

```
$response = FootballApi::cities()->all();
```

#### Get by id - [View Sportmonks Docs](https://docs.sportmonks.com/football/v/core-api/endpoints/cities/get-city-by-id)

[](#get-by-id---view-sportmonks-docs-17)

```
$response = FootballApi::cities()->getById();
```

#### Get by search - [View Sportmonks Docs](https://docs.sportmonks.com/football/v/core-api/endpoints/cities/get-cities-by-search)

[](#get-by-search---view-sportmonks-docs-4)

```
$response = FootballApi::cities()->search($searchQuery);
```

### Types ⌨️

[](#types-️)

#### Get all types - [View Sportmonks Docs](https://docs.sportmonks.com/football/v/core-api/endpoints/types/get-all-types)

[](#get-all-types---view-sportmonks-docs)

```
$response = FootballApi::types()->all();
```

#### Get by id - [View Sportmonks Docs](https://docs.sportmonks.com/football/v/core-api/endpoints/types/get-type-by-id)

[](#get-by-id---view-sportmonks-docs-18)

```
$response = FootballApi::types()->getById();
```

#### Get by Entity - [View Sportmonks Docs](https://docs.sportmonks.com/football/v/core-api/endpoints/types/get-type-by-entity)

[](#get-by-entity---view-sportmonks-docs)

```
$response = FootballApi::types()->getByEntity();
```

### Filters ⚙️

[](#filters-️)

#### Get all entity - [View Sportmonks Docs](https://docs.sportmonks.com/football/v/core-api/endpoints/filters/get-all-entity-filters)

[](#get-all-entity---view-sportmonks-docs)

```
$response = FootballApi::filters()->entity();
```

### My Sportmonks

[](#my-sportmonks)

Retrieve information about your subscription.

#### Get my enrichments - [View Sportmonks Docs](https://docs.sportmonks.com/football/v/core-api/endpoints/my-sportmonks/get-my-enrichments)

[](#get-my-enrichments---view-sportmonks-docs)

```
$response = FootballApi::my()->enrichments();
```

#### Get my resources - [View Sportmonks Docs](https://docs.sportmonks.com/football/v/core-api/endpoints/my-sportmonks/get-my-resources)

[](#get-my-resources---view-sportmonks-docs)

```
$response = FootballApi::my()->resources();
```

#### Get my leagues - [View Sportmonks Docs](https://docs.sportmonks.com/football/v/core-api/endpoints/my-sportmonks/get-my-leagues)

[](#get-my-leagues---view-sportmonks-docs)

```
$response = FootballApi::my()->leagues();
```

License
-------

[](#license)

[MIT](https://tldrlegal.com/license/mit-license)

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 73.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~75 days

Total

5

Last Release

760d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d859af073e5e692e7af743fbe3addded22ca452d4cd66239153deb8a7908bb20?d=identicon)[tetzilla](/maintainers/tetzilla)

---

Top Contributors

[![tetzilla](https://avatars.githubusercontent.com/u/3416363?v=4)](https://github.com/tetzilla "tetzilla (36 commits)")[![kashmiry](https://avatars.githubusercontent.com/u/4423561?v=4)](https://github.com/kashmiry "kashmiry (8 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (5 commits)")

---

Tags

football-apiphpsportmonks

### Embed Badge

![Health badge](/badges/tetzilla-sportmonks-football-api/health.svg)

```
[![Health](https://phpackages.com/badges/tetzilla-sportmonks-football-api/health.svg)](https://phpackages.com/packages/tetzilla-sportmonks-football-api)
```

###  Alternatives

[storyblok/php-management-api-client

Storyblok PHP Client for Management API

1233.5k3](/packages/storyblok-php-management-api-client)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
