PHPackages                             madahost/imdb-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. madahost/imdb-api

ActiveLibrary[API Development](/categories/api)

madahost/imdb-api
=================

IMDB API that can fetch film data and search results

v1.0.0(2y ago)022Apache-2.0PHPPHP &gt;=7.1

Since Feb 5Pushed 1y ago1 watchersCompare

[ Source](https://github.com/madahost/imdb-api)[ Packagist](https://packagist.org/packages/madahost/imdb-api)[ RSS](/packages/madahost-imdb-api/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (5)Versions (2)Used By (0)

PHP IMDB-API that can fetch film data and search results.

Install
-------

[](#install)

Install the latest version using [composer](https://getcomposer.org/).

```
$ composer require madahost/imdb-api:dev-main

```

Usage
-----

[](#usage)

```
// Assuming you installed from Composer:
require "vendor/autoload.php";
use madahost\Imdb;

$imdb = new Imdb;

// Search imdb
// -> returns array of films and people found
$imdb->search("Apocalypse");

// Get film data
// -> returns array of film data (title, year, rating...)
$imdb->film("tt0816692");
```

### Options

[](#options)

NameTypeDefault ValueDescription`curlHeaders`array`['Accept-Language: en-US,en;q=0.5']`Custom headers can be passed to `cURL` when fetching the IMDB page`cache`bool`true`Caches film data to speed-up future requests for the same film`cacheType`string`file` or `redis`Choose how the caching is done. Either a local file database, or connect to a redis server`cacheRedis`array`[ 'scheme' => 'tcp', 'host' => '127.0.0.1', 'port' => 6379, 'password' => '', 'database' => 0 ]`Redis options`techSpecs`bool`true`Loads a films technical specifications (this will take longer as it makes a separate request)`category`string`all`What category to search for (films `tt`, people `nm` or companies `co`)```
$imdb = new Imdb;

//  Options are passed as an array as the second argument
//  These are the default options
$imdb->film("tt0816692", [
    'cache'        => true,
    'curlHeaders'  => ['Accept-Language: en-US,en;q=0.5'],
    'techSpecs'    => true,
]);

$imdb->search("Interstellar", [
    'category'     => 'all',
    'curlHeaders'  => ['Accept-Language: en-US,en;q=0.5'],
]);
```

### Best Match

[](#best-match)

If you do not know the imdb-id of a film, a search string can be entered. This will search imdb and use the first result as the film to fetch data for.

> Note that this will take longer than just entering the ID as it needs to first search imdb before it can get the film data.

```
// Searches imdb and gets the film data of the first result
// -> will return the film data for 'Apocalypse Now'
$imdb->film("Apocalypse");
```

Features
--------

[](#features)

### Film Data

[](#film-data)

```
- Title
- Genres
- Year
- Length
- Plot
- Rating
- Rating Votes (# of votes)
- Poster
- Trailer
    - id
    - link
- Cast
    - actor name
    - actor id
    - character
    - avatar
    - avatar_hq (high quality avatar)
- Technical Specs

```

### Search

[](#search)

Search IMDB to return an array of films, people and companies

```
- Films
    - id
    - title
    - image
- People
    - id
    - name
    - image
- Companies
    - id
    - name
    - image

```

Dependencies
------------

[](#dependencies)

> All dependencies are managed automatically by `composer`.

- [php-html-parser](https://github.com/paquettg/php-html-parser)
- [filebase](https://github.com/tmarois/Filebase)

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance27

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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

Unknown

Total

1

Last Release

832d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/25e10346da76acad4973f738b9a84f099e0b9aa5e23dced5b16b0499b34dc240?d=identicon)[madahost](/maintainers/madahost)

---

Top Contributors

[![madahost](https://avatars.githubusercontent.com/u/158782168?v=4)](https://github.com/madahost "madahost (18 commits)")

---

Tags

apisearchmovieimdbfilm

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/madahost-imdb-api/health.svg)

```
[![Health](https://phpackages.com/badges/madahost-imdb-api/health.svg)](https://phpackages.com/packages/madahost-imdb-api)
```

###  Alternatives

[hmerritt/imdb-api

IMDB API that can fetch film data and search results

6911.3k](/packages/hmerritt-imdb-api)[gigablah/sphinxphp

Sphinx Search PHP 5.3+ API with PSR compliance

861.4M16](/packages/gigablah-sphinxphp)[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)[gigablah/fsphinxphp

Facet extension for Sphinx Search

5362.8k](/packages/gigablah-fsphinxphp)[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)
