PHPackages                             developing-sonder/omdb - 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. developing-sonder/omdb

ActiveLibrary[API Development](/categories/api)

developing-sonder/omdb
======================

oMDB API Client

0.1.0(7y ago)02MITPHPPHP ^7.1

Since Mar 17Pushed 7y agoCompare

[ Source](https://github.com/developing-sonder/omdb)[ Packagist](https://packagist.org/packages/developing-sonder/omdb)[ Docs](https://github.com/developing-sonder/omdb)[ RSS](/packages/developing-sonder-omdb/feed)WikiDiscussions master Synced 3d ago

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

Very short description of the package
=====================================

[](#very-short-description-of-the-package)

[![Latest Version on Packagist](https://camo.githubusercontent.com/94b3092531df11ffd6eb78eaf5fd45a6766c0c46409923a2896f18d8151ba799/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f646576656c6f70696e672d736f6e6465722f6f6d64622e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/developing-sonder/omdb)[![Build Status](https://camo.githubusercontent.com/41bbcd94e3d66a2a17a8480411c3f5475c8f31df149252c8d38dc0b7c833eb12/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f646576656c6f70696e672d736f6e6465722f6f6d64622f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/developing-sonder/omdb)[![Quality Score](https://camo.githubusercontent.com/9867a06c99ec0a8f23623e7271a33215ed73a6025c82197a9acd461c31816994/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f646576656c6f70696e672d736f6e6465722f6f6d64622e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/developing-sonder/omdb)[![Total Downloads](https://camo.githubusercontent.com/8ccbfc1bc3eaee371cd42f998b05f4b46be236c524b218a67eda692c2a62ead4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f646576656c6f70696e672d736f6e6465722f6f6d64622e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/developing-sonder/omdb)

This is where your description should go. Try and limit it to a paragraph or two, and maybe throw in a mention of what PSRs you support to avoid any confusion with users and contributors.

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

[](#installation)

You can install the package via composer:

```
composer require developing-sonder/omdb
```

Obtain an API Key from OMDB at:

Usage
-----

[](#usage)

Any call that includes a search term will return a stdClass object. The $obj-&gt;Search attribute will hold an array of the results.

Otherwise, a single object will be returned containing information about the first movie that met your criteria.

The above distinction is handled by OMDB's API and outside the control of this package.

#### Find by Title

[](#find-by-title)

```
$omdb = new Omdb;
$shawshank = $omdb->byTitle('The Shawshank Redemption');
```

```
{
    "Title": "The Shawshank Redemption",
    "Year": "1994",
    "Rated": "R",
    "Released": "14 Oct 1994",
    "Runtime": "142 min",
    "Genre": "Drama",
    "Director": "Frank Darabont",
    "Writer": "Stephen King (short story \"Rita Hayworth and Shawshank Redemption\"), Frank Darabont (screenplay)",
    "Actors": "Tim Robbins, Morgan Freeman, Bob Gunton, William Sadler",
    "Plot": "Two imprisoned men bond over a number of years, finding solace and eventual redemption through acts of common decency.",
    "Language": "English",
    "Country": "USA",
    "Awards": "Nominated for 7 Oscars. Another 19 wins & 32 nominations.",
    "Poster": "https://m.media-amazon.com/images/M/MV5BMDFkYTc0MGEtZmNhMC00ZDIzLWFmNTEtODM1ZmRlYWMwMWFmXkEyXkFqcGdeQXVyMTMxODk2OTU@._V1_SX300.jpg",
    "Ratings": [
        {
            "Source": "Internet Movie Database",
            "Value": "9.3/10"
        },
        {
            "Source": "Rotten Tomatoes",
            "Value": "91%"
        },
        {
            "Source": "Metacritic",
            "Value": "80/100"
        }
    ],
    "Metascore": "80",
    "imdbRating": "9.3",
    "imdbVotes": "2,058,865",
    "imdbID": "tt0111161",
    "Type": "movie",
    "DVD": "27 Jan 1998",
    "BoxOffice": "N/A",
    "Production": "Columbia Pictures",
    "Website": "N/A",
    "Response": "True"
}
```

#### Find By Id

[](#find-by-id)

```
$omdb = new Omdb;
$theMatrix = $omdb->find('tt0111161');
```

```
{
    "Title": "The Shawshank Redemption",
    "Year": "1994",
    "Rated": "R",
    "Released": "14 Oct 1994",
    "Runtime": "142 min",
    "Genre": "Drama",
    "Director": "Frank Darabont",
    "Writer": "Stephen King (short story \"Rita Hayworth and Shawshank Redemption\"), Frank Darabont (screenplay)",
    "Actors": "Tim Robbins, Morgan Freeman, Bob Gunton, William Sadler",
    "Plot": "Two imprisoned men bond over a number of years, finding solace and eventual redemption through acts of common decency.",
    "Language": "English",
    "Country": "USA",
    "Awards": "Nominated for 7 Oscars. Another 19 wins & 32 nominations.",
    "Poster": "https://m.media-amazon.com/images/M/MV5BMDFkYTc0MGEtZmNhMC00ZDIzLWFmNTEtODM1ZmRlYWMwMWFmXkEyXkFqcGdeQXVyMTMxODk2OTU@._V1_SX300.jpg",
    "Ratings": [
        {
            "Source": "Internet Movie Database",
            "Value": "9.3/10"
        },
        {
            "Source": "Rotten Tomatoes",
            "Value": "91%"
        },
        {
            "Source": "Metacritic",
            "Value": "80/100"
        }
    ],
    "Metascore": "80",
    "imdbRating": "9.3",
    "imdbVotes": "2,058,865",
    "imdbID": "tt0111161",
    "Type": "movie",
    "DVD": "27 Jan 1998",
    "BoxOffice": "N/A",
    "Production": "Columbia Pictures",
    "Website": "N/A",
    "Response": "True"
}
```

#### Search

[](#search)

```
$omdb = new Omdb;
$results = $client->search('wife');
```

```
{
    "Search": [
        {
            "Title": "The Time Traveler's Wife",
            "Year": "2009",
            "imdbID": "tt0452694",
            "Type": "movie",
            "Poster": "https://m.media-amazon.com/images/M/MV5BZWNlN2RmZDktNzllNC00NDVlLTllMzgtZGQ1YmRmZThmZjZmXkEyXkFqcGdeQXVyNTA4NzY1MzY@._V1_SX300.jpg"
        },
        {
            "Title": "The Good Wife",
            "Year": "2009–2016",
            "imdbID": "tt1442462",
            "Type": "series",
            "Poster": "https://m.media-amazon.com/images/M/MV5BMTI2OTk4MDk3OF5BMl5BanBnXkFtZTcwMTY3NTc3Mg@@._V1_SX300.jpg"
        },
        {
            "Title": "The Astronaut's Wife",
            "Year": "1999",
            "imdbID": "tt0138304",
            "Type": "movie",
            "Poster": "https://m.media-amazon.com/images/M/MV5BMTUxNGI2NzUtYzgwNy00NmIyLTgwNjMtZGMzYjhlYjY1MThkXkEyXkFqcGdeQXVyMTQxNzMzNDI@._V1_SX300.jpg"
        },
        {
            "Title": "The Cook, the Thief, His Wife & Her Lover",
            "Year": "1989",
            "imdbID": "tt0097108",
            "Type": "movie",
            "Poster": "https://m.media-amazon.com/images/M/MV5BZTlmM2U5YmQtMTcxYy00MzgyLTkyMDItZjY5Yjc3OTJkMTAzXkEyXkFqcGdeQXVyMTQxNzMzNDI@._V1_SX300.jpg"
        },
        {
            "Title": "The Zookeeper's Wife",
            "Year": "2017",
            "imdbID": "tt1730768",
            "Type": "movie",
            "Poster": "https://m.media-amazon.com/images/M/MV5BNTY3YmZmYmMtZjc3Zi00N2VjLWE5ZGMtN2M0ODkzOGQ5M2UyL2ltYWdlL2ltYWdlXkEyXkFqcGdeQXVyNTk1MTQ3NDI@._V1_SX300.jpg"
        },
        {
            "Title": "My Wife and Kids",
            "Year": "2001–2005",
            "imdbID": "tt0273855",
            "Type": "series",
            "Poster": "https://m.media-amazon.com/images/M/MV5BNjE0YjkzNDAtMDQ1MC00MmQ5LTgxNDktNmQ0ODU2MGY0Njk1XkEyXkFqcGdeQXVyNjU2NjA5NjM@._V1_SX300.jpg"
        },
        {
            "Title": "I Think I Love My Wife",
            "Year": "2007",
            "imdbID": "tt0770772",
            "Type": "movie",
            "Poster": "https://m.media-amazon.com/images/M/MV5BMzA0NTcxODEyN15BMl5BanBnXkFtZTcwOTA4MjI0MQ@@._V1_SX300.jpg"
        },
        {
            "Title": "The Wife",
            "Year": "2017",
            "imdbID": "tt3750872",
            "Type": "movie",
            "Poster": "https://m.media-amazon.com/images/M/MV5BNzA2Yzk4YjItZmU5OS00ZjFjLTlkNTEtMzJjZDVlOGY0OWRlXkEyXkFqcGdeQXVyMjM4NTM5NDY@._V1_SX300.jpg"
        },
        {
            "Title": "The Bishop's Wife",
            "Year": "1947",
            "imdbID": "tt0039190",
            "Type": "movie",
            "Poster": "https://m.media-amazon.com/images/M/MV5BNjU4ZTEwY2UtMDg2OS00YTgxLTlkZTQtY2M1ZGM1YTc0NWFmXkEyXkFqcGdeQXVyMDI2NDg0NQ@@._V1_SX300.jpg"
        },
        {
            "Title": "The Preacher's Wife",
            "Year": "1996",
            "imdbID": "tt0117372",
            "Type": "movie",
            "Poster": "https://m.media-amazon.com/images/M/MV5BOWFiMGMzYmYtMGZjNy00ZWVkLTllMjAtMTQ2NmU1OWVhMjkxXkEyXkFqcGdeQXVyNjU0NTI0Nw@@._V1_SX300.jpg"
        }
    ],
    "totalResults": "1116",
    "Response": "True"
}
```

#### Complicated Query

[](#complicated-query)

```
$query = new Query();
$query->movie()
      ->plot('short')
      ->setSearchTerm('lego');

$client = new Omdb($query);
$results = $client->get();
```

```
{
    "Search": [
        {
            "Title": "The Lego Movie",
            "Year": "2014",
            "imdbID": "tt1490017",
            "Type": "movie",
            "Poster": "https://m.media-amazon.com/images/M/MV5BMTg4MDk1ODExN15BMl5BanBnXkFtZTgwNzIyNjg3MDE@._V1_SX300.jpg"
        },
        {
            "Title": "The Lego Batman Movie",
            "Year": "2017",
            "imdbID": "tt4116284",
            "Type": "movie",
            "Poster": "https://m.media-amazon.com/images/M/MV5BMTcyNTEyOTY0M15BMl5BanBnXkFtZTgwOTAyNzU3MDI@._V1_SX300.jpg"
        },
        {
            "Title": "The Lego Ninjago Movie",
            "Year": "2017",
            "imdbID": "tt3014284",
            "Type": "movie",
            "Poster": "https://m.media-amazon.com/images/M/MV5BNDI3MDljMTQtYzBiYS00NDk2LTlhYzUtYmM0NWIyMmZkMDZkXkEyXkFqcGdeQXVyNjk5NDA3OTk@._V1_SX300.jpg"
        },
        {
            "Title": "The Lego Movie 2: The Second Part",
            "Year": "2019",
            "imdbID": "tt3513498",
            "Type": "movie",
            "Poster": "https://m.media-amazon.com/images/M/MV5BMTkyOTkwNDc1N15BMl5BanBnXkFtZTgwNzkyMzk3NjM@._V1_SX300.jpg"
        },
        {
            "Title": "Lego Batman: The Movie - DC Super Heroes Unite",
            "Year": "2013",
            "imdbID": "tt2465238",
            "Type": "movie",
            "Poster": "https://m.media-amazon.com/images/M/MV5BMjE4MTU5MDk5OF5BMl5BanBnXkFtZTgwNDQ1NzA2MDE@._V1_SX300.jpg"
        },
        {
            "Title": "Lego Marvel Super Heroes",
            "Year": "2013",
            "imdbID": "tt2620204",
            "Type": "game",
            "Poster": "https://ia.media-imdb.com/images/M/MV5BOTA5ODA2NTI2M15BMl5BanBnXkFtZTgwNTcxMzU1MDE@._V1_SX300.jpg"
        },
        {
            "Title": "Lego Batman: The Videogame",
            "Year": "2008",
            "imdbID": "tt1149317",
            "Type": "game",
            "Poster": "https://images-na.ssl-images-amazon.com/images/M/MV5BMTI5MjA2MjY4MF5BMl5BanBnXkFtZTcwNzgyOTc3MQ@@._V1_SX300.jpg"
        },
        {
            "Title": "A Lego Brickumentary",
            "Year": "2014",
            "imdbID": "tt3214286",
            "Type": "movie",
            "Poster": "https://m.media-amazon.com/images/M/MV5BMTA5Njk2MTQ1NjBeQTJeQWpwZ15BbWU4MDM2MDA0NjUx._V1_SX300.jpg"
        },
        {
            "Title": "Lego DC Comics Super Heroes: Justice League vs. Bizarro League",
            "Year": "2015",
            "imdbID": "tt4189260",
            "Type": "movie",
            "Poster": "https://m.media-amazon.com/images/M/MV5BMjIzMTYxMjk5MV5BMl5BanBnXkFtZTgwMjY5OTgyNDE@._V1_SX300.jpg"
        },
        {
            "Title": "Lego: The Adventures of Clutch Powers",
            "Year": "2010",
            "imdbID": "tt1587414",
            "Type": "movie",
            "Poster": "https://m.media-amazon.com/images/M/MV5BMjQ1NzM2MDE2Nl5BMl5BanBnXkFtZTcwNjg4NDcxMw@@._V1_SX300.jpg"
        }
    ],
    "totalResults": "230",
    "Response": "True"
}
```

### Testing

[](#testing)

```
vendor/bin/phpunit
```

Update your phpunit.xml.dist to include env variable with your OMDB\_API\_KEY;

```

```

### Road Map

[](#road-map)

#### v0.1

[](#v01)

- Client Object
- Query Object
- Search Endpoint
- By Id Endpoint
- By Title Endpoint (Same as By Id)

#### v0.2

[](#v02)

- Response converted to Custom Object
- Movie Resource Created
- Movie Resource returned by non-Search endpoints.

### Changelog

[](#changelog)

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

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

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Matthew Moore](https://github.com/developing-sonder)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

PHP Package Boilerplate
-----------------------

[](#php-package-boilerplate)

This package was generated using the [PHP Package Boilerplate](https://laravelpackageboilerplate.com).

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

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

2616d ago

### Community

Maintainers

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

---

Tags

api clientomdbmovie databasedeveloping-sonder

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/developing-sonder-omdb/health.svg)

```
[![Health](https://phpackages.com/badges/developing-sonder-omdb/health.svg)](https://phpackages.com/packages/developing-sonder-omdb)
```

###  Alternatives

[netflie/whatsapp-cloud-api

The first PHP SDK to send and receive messages using a cloud-hosted version of the WhatsApp Business Platform

640431.7k4](/packages/netflie-whatsapp-cloud-api)[crowdin/crowdin-api-client

PHP client library for Crowdin API v2

611.5M5](/packages/crowdin-crowdin-api-client)[jasara/php-amzn-selling-partner-api

A fluent interface for Amazon's Selling Partner API in PHP

1344.8k1](/packages/jasara-php-amzn-selling-partner-api)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)[boci/hetzner-laravel

A Laravel SDK for interacting with the Hetzner Cloud API - inspired by Nuno Maduro's OpenAI PHP client

901.4k](/packages/boci-hetzner-laravel)[grantholle/powerschool-api

A Laravel package to make interacting with PowerSchool less painful.

1715.6k1](/packages/grantholle-powerschool-api)

PHPackages © 2026

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