PHPackages                             kiwilan/php-tmdb - 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. kiwilan/php-tmdb

ActiveLibrary[API Development](/categories/api)

kiwilan/php-tmdb
================

PHP wrapper package to interact with the The Movie Database (TMDB) API.

0.1.12(4mo ago)4397[2 PRs](https://github.com/kiwilan/php-tmdb/pulls)MITPHPPHP ^8.1CI passing

Since Sep 11Pushed 4mo agoCompare

[ Source](https://github.com/kiwilan/php-tmdb)[ Packagist](https://packagist.org/packages/kiwilan/php-tmdb)[ Docs](https://github.com/kiwilan/php-tmdb)[ GitHub Sponsors](https://github.com/kiwilan)[ RSS](/packages/kiwilan-php-tmdb/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (5)Versions (26)Used By (0)

PHP TMDB
========

[](#php-tmdb)

[![Banner with a lots of movies and TV series in background and PHP TMDB title](https://raw.githubusercontent.com/kiwilan/php-tmdb/main/docs/banner.jpg)](https://raw.githubusercontent.com/kiwilan/php-tmdb/main/docs/banner.jpg)

[![php](https://camo.githubusercontent.com/2d44ab343cf5a2aab849b6954ee31dd09ba1f1f11bf0f168ccd08e186ec060b1/68747470733a2f2f696d672e736869656c64732e696f2f7374617469632f76313f7374796c653d666c6174266c6162656c3d504850266d6573736167653d76382e3126636f6c6f723d373737424234266c6f676f3d706870266c6f676f436f6c6f723d666666666666266c6162656c436f6c6f723d313831383162)](https://www.php.net/)[![version](https://camo.githubusercontent.com/4ec7c2a9940abdb450a5f78bb8906d9722d822ac83a12f1d450806d730fdd120/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6b6977696c616e2f7068702d746d64622e7376673f7374796c653d666c617426636f6c6f72413d31383138314226636f6c6f72423d373737424234)](https://packagist.org/packages/kiwilan/php-tmdb)[![downloads](https://camo.githubusercontent.com/a125cd151cd9bc6cd6bcb042bdca5f67f999e758f5373d3dbbc9b6400e749a38/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6b6977696c616e2f7068702d746d64622e7376673f7374796c653d666c617426636f6c6f72413d31383138314226636f6c6f72423d373737424234)](https://packagist.org/packages/kiwilan/php-tmdb)[![license](https://camo.githubusercontent.com/e54e7c79e1ff308eb83a5007a8c4217a8557f4a98f5b6652b1ce42f15031da2f/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6b6977696c616e2f7068702d746d64622e7376673f7374796c653d666c617426636f6c6f72413d31383138314226636f6c6f72423d373737424234)](https://github.com/kiwilan/php-tmdb/blob/main/README.md)[![tests](https://camo.githubusercontent.com/b268bdb5a7f056a2f590bac3549312e066cd42c51ab473f39904504bc4ccc6a6/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6b6977696c616e2f7068702d746d64622f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c617426636f6c6f72413d313831383142)](https://packagist.org/packages/kiwilan/php-tmdb)[![codecov](https://camo.githubusercontent.com/4a636d4dc013099a03fa9f314a67a855032db78b0c49f1a2943d5c5d89a5d8f0/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f67682f6b6977696c616e2f7068702d746d64622f6d61696e3f7374796c653d666c617426636f6c6f72413d31383138314226636f6c6f72423d373737424234)](https://codecov.io/gh/kiwilan/php-tmdb)

PHP wrapper package to interact with the [The Movie Database (TMDB) API](https://www.themoviedb.org/documentation/api).

Important

You need to create an account on [TMDB](https://www.themoviedb.org/) and get an ***API key*** to use this package. It's free and easy to do, you can read [this guide](https://developer.themoviedb.org/docs/getting-started) to get started.

Warning

This package is under development.

Requirements
------------

[](#requirements)

**PHP 8.1** and later.

Note

Package [`guzzlehttp/guzzle`](https://github.com/guzzle/guzzle) will be installed automatically by [`composer`](https://getcomposer.org/).

About
-----

[](#about)

This package uses repository pattern to interact with the TMDB API. Each repository represents an API category like *Movies*, *Search*, *Trending*, etc. And each endpoint of API is a method in repository, like `details()` for *Movies*, `movie()` for *Search*, `all()` for *Trending*, etc. If you know TMDB API, you will understand this package easily.

*This is NOT official TMDB API PHP wrapper, you can check [`php-tmdb/api`](https://github.com/php-tmdb/api) if you want official package.*

*Why this package?*

*All current PHP packages to interact with the TMDB API are not up-to-date and I need a modern and easy-to-use package to interact with the TMDB API. So I decided to create this package. You can check [`roadmap`](#roadmap) to see what I plan to do with this package.*

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

[](#installation)

You can install the package via [composer](https://getcomposer.org/):

```
composer require kiwilan/php-tmdb
```

Usage of API
------------

[](#usage-of-api)

### Basic example

[](#basic-example)

You have just to use `client()` static method to get new instance of `Tmdb` class with your API key. After that, you can use repositories with chained methods to interact with the TMDB API, first chained method is a repository, corresponding to a category of the API. And second chained method is an endpoint of the API.

```
use Kiwilan\Tmdb\Tmdb;

$results = Tmdb::client('API_KEY')
    ->search()
    ->movie(query: 'the lord of the rings'); // ?\Kiwilan\Tmdb\Results\MovieResults
```

### Collection

[](#collection)

#### [Collection: Details](https://developer.themoviedb.org/reference/collection-details)

[](#collection-details)

Get collection details by ID.

```
use Kiwilan\Tmdb\Tmdb;

$collection = Tmdb::client('API_KEY')
    ->collections()
    ->details(collection_id: 119); // ?\Kiwilan\Tmdb\Models\TmdbCollection
```

#### [Collection: Images](https://developer.themoviedb.org/reference/collection-images)

[](#collection-images)

Get the images that belong to a collection.

```
$images = Tmdb::client('API_KEY')
    ->collections()
    ->images(collection_id: 119); // ?\Kiwilan\Tmdb\Models\Images\TmdbImages
```

#### [Collection: Translations](https://developer.themoviedb.org/reference/collection-translations)

[](#collection-translations)

Get the translations that belong to a collection.

```
$translations = Tmdb::client('API_KEY')
    ->collections()
    ->translations(collection_id: 119); // ?\Kiwilan\Tmdb\Models\Translations\TmdbTranslations
```

### Companies

[](#companies)

#### [Companies: Details](https://developer.themoviedb.org/reference/company-details)

[](#companies-details)

Get the company details by ID.

```
use Kiwilan\Tmdb\Tmdb;

$company = Tmdb::client('API_KEY')
    ->companies()
    ->details(company_id: 12); // ?\Kiwilan\Tmdb\Models\TmdbCompany
```

### Configuration

[](#configuration)

#### [Configuration: Countries](https://developer.themoviedb.org/reference/configuration-countries)

[](#configuration-countries)

Get the list of countries (ISO 3166-1 tags) used throughout TMDB.

```
use Kiwilan\Tmdb\Tmdb;

$company = Tmdb::client('API_KEY')
    ->configuration()
    ->countries(); // ?\Kiwilan\Tmdb\Models\Common\TmdbCountry[]
```

#### [Configuration: Languages](https://developer.themoviedb.org/reference/configuration-languages)

[](#configuration-languages)

Get the list of languages (ISO 639-1 tags) used throughout TMDB.

```
use Kiwilan\Tmdb\Tmdb;

$company = Tmdb::client('API_KEY')
    ->configuration()
    ->languages(); // ?\Kiwilan\Tmdb\Models\Common\TmdbLanguage[]
```

### Credits

[](#credits)

#### [Credits: Details](https://developer.themoviedb.org/reference/credit-details)

[](#credits-details)

Get a movie or TV credit details by ID.

```
use Kiwilan\Tmdb\Tmdb;

$credit = Tmdb::client('API_KEY')
    ->credits()
    ->details(credit_id: '5256c8b219c2956ff6047cd8'); // ?\Kiwilan\Tmdb\Models\TmdbCredit
```

### Movie Lists

[](#movie-lists)

#### [Movie Lists: Now Playing](https://developer.themoviedb.org/reference/movie-now-playing-list)

[](#movie-lists-now-playing)

Get a list of movies that are currently in theatres.

```
use Kiwilan\Tmdb\Tmdb;

$now_playing = Tmdb::client('API_KEY')
    ->movieLists()
    ->nowPlaying(); // ?\Kiwilan\Tmdb\Results\MovieResults
```

#### [Movie Lists: Popular](https://developer.themoviedb.org/reference/movie-popular-list)

[](#movie-lists-popular)

Get a list of movies ordered by popularity.

```
$popular = Tmdb::client('API_KEY')
    ->movieLists()
    ->popular(); // ?\Kiwilan\Tmdb\Results\MovieResults
```

#### [Movie Lists: Top Rated](https://developer.themoviedb.org/reference/movie-top-rated-list)

[](#movie-lists-top-rated)

Get a list of movies ordered by rating.

```
$top_rated = Tmdb::client('API_KEY')
    ->movieLists()
    ->topRated(); // ?\Kiwilan\Tmdb\Results\MovieResults
```

#### [Movie Lists: Upcoming](https://developer.themoviedb.org/reference/movie-upcoming-list)

[](#movie-lists-upcoming)

Get a list of movies that are being released soon.

```
$upcoming = Tmdb::client('API_KEY')
    ->movieLists()
    ->upcoming(); // ?\Kiwilan\Tmdb\Results\MovieResults
```

### Movies

[](#movies)

#### [Movies: Details](https://developer.themoviedb.org/reference/movie-details)

[](#movies-details)

Get the top level details of a movie by ID (you can use `append_to_response` option to get more details).

```
use Kiwilan\Tmdb\Tmdb;

$movie = Tmdb::client('API_KEY')
    ->movies()
    ->details(movie_id: 120); // ?\Kiwilan\Tmdb\Models\TmdbMovie
```

### Networks

[](#networks)

#### [Networks: Details](https://developer.themoviedb.org/reference/network-details)

[](#networks-details)

Get the details of a network by ID.

```
use Kiwilan\Tmdb\Tmdb;

$network = Tmdb::client('API_KEY')
    ->networks()
    ->details(network_id: 49); // ?\Kiwilan\Tmdb\Models\TvSeries\TmdbNetwork
```

### Search

[](#search)

#### [Search: Collection](https://developer.themoviedb.org/reference/search-collection)

[](#search-collection)

Search for collections by their original, translated and alternative names.

```
use Kiwilan\Tmdb\Tmdb;

$results = Tmdb::client('API_KEY')
    ->search()
    ->movie(query: 'the lord of the rings');

$collections = $results->getResults(); // \Kiwilan\Tmdb\Models\TmdbCollection[]
$firstCollection = $results->getFirstResult(); // ?\Kiwilan\Tmdb\Models\TmdbCollection
```

You can use options into your search:

```
use Kiwilan\Tmdb\Tmdb;
use Kiwilan\Tmdb\Query\SearchCollectionQuery;

$results = Tmdb::client('API_KEY')
    ->search()
    ->collection(query: 'le seigneur des anneaux', params: new SearchCollectionQuery(
        include_adult: true,
        language: 'fr-FR',
        page: 1,
        year: 2001,
    ));
```

#### [Search: Movie](https://developer.themoviedb.org/reference/search-movie)

[](#search-movie)

Search for movies by their original, translated and alternative titles.

```
use Kiwilan\Tmdb\Tmdb;

$results = Tmdb::client('API_KEY')
    ->search()
    ->movie(query:'the fellowship of the ring');

$movies = $results->getResults(); // \Kiwilan\Tmdb\Models\TmdbMovie[]
$firstMovie = $results->getFirstResult(); // ?\Kiwilan\Tmdb\Models\TmdbMovie
```

You can use options into your search:

```
use Kiwilan\Tmdb\Tmdb;
use Kiwilan\Tmdb\Query\SearchMovieQuery;

$results = Tmdb::client('API_KEY')
    ->search()
    ->movie(query: 'le seigneur des anneaux', params: new SearchMovieQuery(
        include_adult: true,
        language: 'fr-FR',
        primary_release_year: 2001,
        page: 1,
        region: 'en-US',
        year: 2001,
    ));
```

#### [Search: TV](https://developer.themoviedb.org/reference/search-tv)

[](#search-tv)

Search for TV shows by their original, translated and also known as names.

```
use Kiwilan\Tmdb\Tmdb;

$results = Tmdb::client('API_KEY')
    ->search()
    ->tv(query: 'game of thrones');

$tvSeries = $results->getResults(); // \Kiwilan\Tmdb\Models\TmdbTvSeries[]
$firstTvSeries = $results->getFirstResult(); // ?\Kiwilan\Tmdb\Models\TmdbTvSeries
```

You can use options into your search:

```
use Kiwilan\Tmdb\Tmdb;
use Kiwilan\Tmdb\Query\SearchTvSeriesQuery;

$results = Tmdb::client('API_KEY')
    ->search()
    ->tv(query: 'game of thrones', params: new SearchTvSeriesQuery(
        first_air_date_year: 2011,
        include_adult: true,
        language: 'fr-FR',
        page: 1,
        year: 2011,
    ));
```

### Trending

[](#trending)

#### [Trending: All](https://developer.themoviedb.org/reference/trending-all)

[](#trending-all)

Get the trending movies, TV shows and people.

```
use Kiwilan\Tmdb\Tmdb;

$all = Tmdb::client('API_KEY')
    ->trending()
    ->all(); // ?\Kiwilan\Tmdb\Results\MediaResults
```

#### [Trending: Movies](https://developer.themoviedb.org/reference/trending-movies)

[](#trending-movies)

Get the trending movies on TMDB.

```
use Kiwilan\Tmdb\Tmdb;

$movies = Tmdb::client('API_KEY')
    ->trending()
    ->movies(); // ?\Kiwilan\Tmdb\Results\MovieResults
```

#### [Trending: People](https://developer.themoviedb.org/reference/trending-people)

[](#trending-people)

Get the trending people on TMDB.

```
use Kiwilan\Tmdb\Tmdb;

$people = Tmdb::client('API_KEY')
    ->trending()
    ->people(); // ?\Kiwilan\Tmdb\Results\PeopleResults
```

#### [Trending: TV](https://developer.themoviedb.org/reference/trending-tv)

[](#trending-tv)

Get the trending TV shows on TMDB.

```
use Kiwilan\Tmdb\Tmdb;

$tv = Tmdb::client('API_KEY')
    ->trending()
    ->tv(); // ?\Kiwilan\Tmdb\Results\TvSerieResults
```

### TV Series List

[](#tv-series-list)

#### [TV Series List: Airing Today](https://developer.themoviedb.org/reference/tv-series-airing-today-list)

[](#tv-series-list-airing-today)

Get a list of TV shows airing today.

```
$airing_today = Tmdb::client('API_KEY')
    ->tvSeriesList()
    ->airingToday(); // ?\Kiwilan\Tmdb\Results\TvSerieResults
```

#### [TV Series List: On The Air](https://developer.themoviedb.org/reference/tv-series-on-the-air-list)

[](#tv-series-list-on-the-air)

Get a list of TV shows that air in the next 7 days.

```
$on_the_air = Tmdb::client('API_KEY')
    ->tvSeriesList()
    ->onTheAir(); // ?\Kiwilan\Tmdb\Results\TvSerieResults
```

#### [TV Series List: Popular](https://developer.themoviedb.org/reference/tv-series-popular-list)

[](#tv-series-list-popular)

Get a list of TV shows ordered by popularity.

```
$popular = Tmdb::client('API_KEY')
    ->tvSeriesList()
    ->popular(); // ?\Kiwilan\Tmdb\Results\TvSerieResults
```

#### [TV Series List: Top Rated](https://developer.themoviedb.org/reference/tv-series-top-rated-list)

[](#tv-series-list-top-rated)

Get a list of TV shows ordered by rating.

```
$top_rated = Tmdb::client('API_KEY')
    ->tvSeriesList()
    ->topRated(); // ?\Kiwilan\Tmdb\Results\TvSerieResults
```

### TV Series

[](#tv-series)

#### [TV Series: Details](https://developer.themoviedb.org/reference/tv-series-details)

[](#tv-series-details)

Get the details of a TV show (you can use `append_to_response` option to get more details).

```
use Kiwilan\Tmdb\Tmdb;

$tvSeries = Tmdb::client('API_KEY')
    ->tvSeries()
    ->details(series_id: 1399); // ?\Kiwilan\Tmdb\Models\TmdbTvSeries
```

### TV Seasons

[](#tv-seasons)

#### [TV Seasons: Details](https://developer.themoviedb.org/reference/tv-season-details)

[](#tv-seasons-details)

Query the details of a TV season (you can use `append_to_response` option to get more details).

```
use Kiwilan\Tmdb\Tmdb;

$season = Tmdb::client('API_KEY')
    ->tvSeasons()
    ->details(series_id: 1399, season_number: 1); // ?\Kiwilan\Tmdb\Models\TmdbSeason
```

### TV Episodes

[](#tv-episodes)

#### [TV Episodes: Details](https://developer.themoviedb.org/reference/tv-episode-details)

[](#tv-episodes-details)

Query the details of a TV episode (you can use `append_to_response` option to get more details).

```
use Kiwilan\Tmdb\Tmdb;

$episode = Tmdb::client('API_KEY')
    ->tvEpisodes()
    ->details(series_id: 1399, season_number: 1, episode_number: 1); // ?\Kiwilan\Tmdb\Models\TmdbEpisode
```

Advanced
--------

[](#advanced)

### Results

[](#results)

For any method that returns a list of results, you can use multiple methods:

```
use Kiwilan\Tmdb\Tmdb;

$movies = Tmdb::client('API_KEY')
    ->movieLists()
    ->popular(); // ?\Kiwilan\Tmdb\Results\MovieResults

$results = $movies->getResults(); // \Kiwilan\Tmdb\Models\TmdbMovie[]
$firstResult = $movies->getFirstResult(); // ?\Kiwilan\Tmdb\Models\TmdbMovie
$lastResult = $movies->getLastResult(); // ?\Kiwilan\Tmdb\Models\TmdbMovie
$filterResults = $movies->filter(fn (\Kiwilan\Tmdb\Models\TmdbMovie $movie) => $movie->getVoteAverage() > 8); // \Kiwilan\Tmdb\Models\TmdbMovie[]
$findResult = $movies->find(fn (\Kiwilan\Tmdb\Models\TmdbMovie $movie) => $movie->getVoteAverage() > 8); // ?\Kiwilan\Tmdb\Models\TmdbMovie
```

### Images

[](#images)

For any model with image (poster, backdrop, logo, profile, still), you can use multiple methods:

```
use Kiwilan\Tmdb\Tmdb;

$movie = Tmdb::client('API_KEY')
    ->movies()
    ->details(movie_id: 120); // ?\Kiwilan\Tmdb\Models\TmdbMovie

$poster_path = $movie->getPosterPath(); // string|null (path to poster)
$poster_url = $movie->getPosterUrl(); // string|null (URL to poster)
$poster_image = $movie->getPosterImage(); // string|null (binary image)
$success = $movie->savePosterImage('path/to/save/poster.jpg'); // bool (true if success)
```

You can change the size of the image with `size` option, available for `get*Url`, `get*Image` and `save*Image` methods:

```
use Kiwilan\Tmdb\Tmdb;
use Kiwilan\Tmdb\Enums\PosterSize;

$movie = Tmdb::client('API_KEY')
    ->movies()
    ->details(movie_id: 120); // ?\Kiwilan\Tmdb\Models\TmdbMovie

$poster_url = $movie->getPosterUrl(size: PosterSize::W500); // string|null (URL to poster)
```

These methods are available for `Poster`, `Backdrop`, `Logo`, `Profile` and `Still`.

### Append to response

[](#append-to-response)

TMDB offers an easy way to get more details with `append_to_response` option. You can add more data in same request, it's really useful to get all data you need in one request.

> `append_to_response` is an easy and efficient way to append extra requests to any top level namespace. The movie, TV show, TV season, TV episode and person detail methods all support a query parameter called `append_to_response`. This makes it possible to make sub requests within the same namespace in a single HTTP request. Each request will get appended to the response as a new JSON object. From

To know which methods support `append_to_response`, check if method has `append_to_response` parameter (always optional and at the end of parameters). And to know what you can add, check the [official documentation](https://developer.themoviedb.org/docs/getting-started).

Example with `append_to_response`:

```
use Kiwilan\Tmdb\Tmdb;

$movie = Tmdb::client('API_KEY')
    ->movies()
    ->details(movie_id: 120, append_to_response: ['credits' ,'videos']); // ?\Kiwilan\Tmdb\Models\TmdbMovie
```

### Get raw data

[](#get-raw-data)

If you want to get raw data from TMDB API, you can use `getRawData()` method and `getRawDataKey()` method to get a specific key.

Note

If a key hasn't dedicated method, you can use `getRawDataKey()` method to get it but don't hesitate to open an issue to ask for a dedicated method.

```
use Kiwilan\Tmdb\Tmdb;

$movie = Tmdb::client('API_KEY')
    ->movies()
    ->details(movie_id: 120); // ?\Kiwilan\Tmdb\Models\TmdbMovie

$raw_data = $movie->getRawData(); // array
$raw_title_key = $movie->getRawDataKey('title'); // mixed
```

### Send raw request

[](#send-raw-request)

If you want to send a raw request to TMDB API, you can use `raw()` method, API key will be added automatically.

```
use Kiwilan\Tmdb\Tmdb;

$response = Tmdb::client(apiKey())
    ->raw()
    ->url('/movie/now_playing', ['language' => 'en-US', 'page' => 1]); // ?Kiwi\Tmdb\Repositories\RawRepository

$response->isSuccess(); // bool
$response->getStatusCode(); // int
$response->getBody(); // array
$response->getUrl(); // string
```

Testing
-------

[](#testing)

```
composer test
```

Contributing
------------

[](#contributing)

A fix? A new feature? A typo? You're welcome to contribute to this project. Just open a pull request.

### Roadmap

[](#roadmap)

- [Account](https://developer.themoviedb.org/reference/account-details)
- [Authentication](https://developer.themoviedb.org/reference/authentication-create-guest-session)
- Certifications
    - [Movie Certifications](https://developer.themoviedb.org/reference/certification-movie-list)
    - [TV Certifications](https://developer.themoviedb.org/reference/certifications-tv-list)
- Changes
    - [Movie List](https://developer.themoviedb.org/reference/changes-movie-list)
    - [People List](https://developer.themoviedb.org/reference/changes-people-list)
    - [TV List](https://developer.themoviedb.org/reference/changes-tv-list)
- Collections
    - [Details](https://developer.themoviedb.org/reference/collection-details)
    - [Images](https://developer.themoviedb.org/reference/collection-images)
    - [Translations](https://developer.themoviedb.org/reference/collection-translations)
- Companies
    - [Details](https://developer.themoviedb.org/reference/company-details)
    - [Alternative Names](https://developer.themoviedb.org/reference/company-alternative-names)
    - [Images](https://developer.themoviedb.org/reference/company-images)
- Configuration
    - [Details](https://developer.themoviedb.org/reference/configuration-details)
    - [Countries](https://developer.themoviedb.org/reference/configuration-countries)
    - [Jobs](https://developer.themoviedb.org/reference/configuration-jobs)
    - [Languages](https://developer.themoviedb.org/reference/configuration-languages)
    - [Primary Translations](https://developer.themoviedb.org/reference/configuration-primary-translations)
    - [Timezones](https://developer.themoviedb.org/reference/configuration-timezones)
- Credits
    - [Details](https://developer.themoviedb.org/reference/credit-details)
- Discover
    - [Movie](https://developer.themoviedb.org/reference/discover-movie)
    - [TV](https://developer.themoviedb.org/reference/discover-tv)
- Find
    - [By ID](https://developer.themoviedb.org/reference/find-by-id)
- Genres
    - [Movie List](https://developer.themoviedb.org/reference/genre-movie-list)
    - [TV List](https://developer.themoviedb.org/reference/genre-tv-list)
- [Guest Sessions](https://developer.themoviedb.org/reference/guest-session-rated-movies)
- Keywords
    - [Details](https://developer.themoviedb.org/reference/keyword-details)
    - [Movies](https://developer.themoviedb.org/reference/keyword-movies) (deprecated)
- [Lists](https://developer.themoviedb.org/reference/list-add-movie)
- Movie Lists
    - [Now playing](https://developer.themoviedb.org/reference/movie-now-playing-list)
    - [Popular](https://developer.themoviedb.org/reference/movie-popular-list)
    - [Top Rated](https://developer.themoviedb.org/reference/movie-top-rated-list)
    - [Upcoming](https://developer.themoviedb.org/reference/movie-upcoming-list)
- Movies
    - [Details](https://developer.themoviedb.org/reference/movie-details)
    - [Account States](https://developer.themoviedb.org/reference/movie-account-states)
    - [Alternative Titles](https://developer.themoviedb.org/reference/movie-alternative-titles): for v1
    - [Changes](https://developer.themoviedb.org/reference/movie-changes)
    - [Credits](https://developer.themoviedb.org/reference/movie-credits): for v1
    - [External IDs](https://developer.themoviedb.org/reference/movie-external-ids)
    - [Images](https://developer.themoviedb.org/reference/movie-images)
    - [Keywords](https://developer.themoviedb.org/reference/movie-keywords): for v1
    - [Latest](https://developer.themoviedb.org/reference/movie-latest-id)
    - [Lists](https://developer.themoviedb.org/reference/movie-lists)
    - [Recommendations](https://developer.themoviedb.org/reference/movie-recommendations): for v1
    - [Release Dates](https://developer.themoviedb.org/reference/movie-release-dates): for v1
    - [Reviews](https://developer.themoviedb.org/reference/movie-reviews): for v1
    - [Similar](https://developer.themoviedb.org/reference/movie-similar): for v1
    - [Translations](https://developer.themoviedb.org/reference/movie-translations)
    - [Videos](https://developer.themoviedb.org/reference/movie-videos): for v1
    - [Watch Providers](https://developer.themoviedb.org/reference/movie-watch-providers)
    - [Add Rating](https://developer.themoviedb.org/reference/movie-add-rating)
    - [Delete Rating](https://developer.themoviedb.org/reference/movie-delete-rating)
- Networks
    - [Details](https://developer.themoviedb.org/reference/network-details)
    - [Alternative Names](https://developer.themoviedb.org/reference/details-copy)
    - [Images](https://developer.themoviedb.org/reference/alternative-names-copy)
- People Lists
    - [Popular](https://developer.themoviedb.org/reference/person-popular-list)
- People
    - [Details](https://developer.themoviedb.org/reference/person-details): for v1
    - [Changes](https://developer.themoviedb.org/reference/person-changes)
    - [Combined Credits](https://developer.themoviedb.org/reference/person-combined-credits)
    - [External IDs](https://developer.themoviedb.org/reference/person-external-ids)
    - [Images](https://developer.themoviedb.org/reference/person-images)
    - [Latest](https://developer.themoviedb.org/reference/person-popular-list)
    - [Movie Credits](https://developer.themoviedb.org/reference/person-movie-credits)
    - [TV Credits](https://developer.themoviedb.org/reference/person-tv-credits)
    - [Translations](https://developer.themoviedb.org/reference/translations)
- Reviews
    - [Details](https://developer.themoviedb.org/reference/review-details)
- Search
    - [Collection](https://developer.themoviedb.org/reference/search-collection)
    - [Company](https://developer.themoviedb.org/reference/search-company): for v1
    - [Keyword](https://developer.themoviedb.org/reference/search-keyword): for v1
    - [Movie](https://developer.themoviedb.org/reference/search-movie)
    - [Multi](https://developer.themoviedb.org/reference/search-multi): for v1
    - [Person](https://developer.themoviedb.org/reference/search-person): for v1
    - [TV](https://developer.themoviedb.org/reference/search-tv)
- Trending
    - [All](https://developer.themoviedb.org/reference/trending-all)
    - [Movie](https://developer.themoviedb.org/reference/trending-movies)
    - [TV](https://developer.themoviedb.org/reference/trending-tv)
    - [People](https://developer.themoviedb.org/reference/trending-people)
- TV Series List
    - [Airing Today](https://developer.themoviedb.org/reference/tv-series-airing-today-list)
    - [On The Air](https://developer.themoviedb.org/reference/tv-series-on-the-air-list)
    - [Popular](https://developer.themoviedb.org/reference/tv-series-popular-list)
    - [Top Rated](https://developer.themoviedb.org/reference/tv-series-top-rated-list)
- TV Series
    - [Details](https://developer.themoviedb.org/reference/tv-series-details)
    - [Account States](https://developer.themoviedb.org/reference/tv-series-account-states)
    - [Aggregate Credits](https://developer.themoviedb.org/reference/tv-series-aggregate-credits): for v1.5
    - [Alternative Titles](https://developer.themoviedb.org/reference/tv-series-alternative-titles): for v1
    - [Changes](https://developer.themoviedb.org/reference/tv-series-changes)
    - [Content Ratings](https://developer.themoviedb.org/reference/tv-series-content-ratings)
    - [Credits](https://developer.themoviedb.org/reference/tv-series-credits): for v1
    - [Episode Groups](https://developer.themoviedb.org/reference/tv-series-episode-groups)
    - [External IDs](https://developer.themoviedb.org/reference/tv-series-external-ids)
    - [Images](https://developer.themoviedb.org/reference/tv-series-images)
    - [Keywords](https://developer.themoviedb.org/reference/tv-series-keywords): for v1
    - [Latest](https://developer.themoviedb.org/reference/tv-series-latest-id): for v1
    - [List](https://developer.themoviedb.org/reference/lists-copy)
    - [Recommendations](https://developer.themoviedb.org/reference/tv-series-recommendations): for v1
    - [Reviews](https://developer.themoviedb.org/reference/tv-series-reviews): for v1
    - [Screened Theatrically](https://developer.themoviedb.org/reference/tv-series-screened-theatrically)
    - [Similar](https://developer.themoviedb.org/reference/tv-series-similar): for v1
    - [Translations](https://developer.themoviedb.org/reference/tv-series-translations)
    - [Videos](https://developer.themoviedb.org/reference/tv-series-videos): for v1
    - [Watch Providers](https://developer.themoviedb.org/reference/tv-series-watch-providers)
    - [Add Rating](https://developer.themoviedb.org/reference/tv-series-add-rating)
    - [Delete Rating](https://developer.themoviedb.org/reference/tv-series-delete-rating)
- TV Season
    - [Details](https://developer.themoviedb.org/reference/tv-season-details)
    - [Account States](https://developer.themoviedb.org/reference/tv-season-account-states)
    - [Aggregate Credits](https://developer.themoviedb.org/reference/tv-season-aggregate-credits): for v1.5
    - [Changes](https://developer.themoviedb.org/reference/tv-season-changes-by-id)
    - [Credits](https://developer.themoviedb.org/reference/tv-season-credits): for v1
    - [External IDs](https://developer.themoviedb.org/reference/tv-season-external-ids)
    - [Images](https://developer.themoviedb.org/reference/tv-season-images)
    - [Translations](https://developer.themoviedb.org/reference/tv-season-translations)
    - [Videos](https://developer.themoviedb.org/reference/tv-season-videos): for v1
    - [Watch Providers](https://developer.themoviedb.org/reference/tv-season-watch-providers)
- TV Episode
    - [Details](https://developer.themoviedb.org/reference/tv-episode-details)
    - [Account States](https://developer.themoviedb.org/reference/tv-episode-account-states)
    - [Changes](https://developer.themoviedb.org/reference/tv-episode-changes-by-id)
    - [Credits](https://developer.themoviedb.org/reference/tv-episode-credits): for v1
    - [External IDs](https://developer.themoviedb.org/reference/tv-episode-external-ids)
    - [Images](https://developer.themoviedb.org/reference/tv-episode-images)
    - [Translations](https://developer.themoviedb.org/reference/tv-episode-translations)
    - [Videos](https://developer.themoviedb.org/reference/tv-episode-videos): for v1
    - [Add Rating](https://developer.themoviedb.org/reference/tv-episode-add-rating)
    - [Delete Rating](https://developer.themoviedb.org/reference/tv-episode-delete-rating)
- TV Episode Group
    - [Details](https://developer.themoviedb.org/reference/tv-episode-group-details)
- Watch Providers
    - [Available Regions](https://developer.themoviedb.org/reference/watch-providers-available-regions)
    - [Movie Providers](https://developer.themoviedb.org/reference/watch-providers-movie-list)
    - [TV Providers](https://developer.themoviedb.org/reference/watch-provider-tv-list)

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Credits
-------

[](#credits-1)

- [TMDB](https://www.themoviedb.org/) for their awesome API
- [`spatie`](https://github.com/spatie) for `spatie/package-skeleton-php`
- [Ewilan Rivière](https://github.com/ewilan-riviere) author of this package
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

 [![https://github.com/kiwilan/php-tmdb](https://user-images.githubusercontent.com/48261459/201463225-0a5a084e-df15-4b11-b1d2-40fafd3555cf.svg)](https://user-images.githubusercontent.com/48261459/201463225-0a5a084e-df15-4b11-b1d2-40fafd3555cf.svg)

###  Health Score

40

—

FairBetter than 88% of packages

Maintenance78

Regular maintenance activity

Popularity17

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 99.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 ~22 days

Recently: every ~77 days

Total

23

Last Release

121d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/58eb34eac9af07c3352e83060e472e1c280838ebe0568692561c00a2cfde9e57?d=identicon)[ewilan-riviere](/maintainers/ewilan-riviere)

---

Top Contributors

[![ewilan-riviere](https://avatars.githubusercontent.com/u/48261459?v=4)](https://github.com/ewilan-riviere "ewilan-riviere (198 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")

---

Tags

apimoviephpseriestmdbtvphpapimovietvtmdbseries

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/kiwilan-php-tmdb/health.svg)

```
[![Health](https://phpackages.com/badges/kiwilan-php-tmdb/health.svg)](https://phpackages.com/packages/kiwilan-php-tmdb)
```

###  Alternatives

[php-tmdb/api

PHP wrapper for TMDB (TheMovieDatabase) API v3. Supports two types of approaches, one modelled with repositories, models and factories. And the other by simple array access to RAW data from The Movie Database.

424378.6k16](/packages/php-tmdb-api)[php-tmdb/laravel

Laravel Package for TMDB ( The Movie Database ) API. Provides easy access to the wtfzdotnet/php-tmdb-api library.

16553.3k1](/packages/php-tmdb-laravel)[wtfzdotnet/php-tmdb-api

PHP wrapper for TMDB (TheMovieDatabase) API v3. Supports two types of approaches, one modelled with repositories, models and factories. And the other by simple array access to RAW data from The Movie Database.

4252.9k](/packages/wtfzdotnet-php-tmdb-api)[dariusiii/tmdb-laravel

Laravel Package for TMDB ( The Movie Database ) API. Provides easy access to the wtfzdotnet/php-tmdb-api library.

1821.1k](/packages/dariusiii-tmdb-laravel)[theodo-group/llphant

LLPhant is a library to help you build Generative AI applications.

1.5k311.5k5](/packages/theodo-group-llphant)[php-tmdb/symfony

Symfony Bundle for TMDB (The Movie Database) API. Provides easy access to the php-tmdb/api library.

3649.7k](/packages/php-tmdb-symfony)

PHPackages © 2026

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