{"id":26544089,"url":"https://github.com/hmerritt/php-imdb-api","last_synced_at":"2025-04-05T05:02:24.176Z","repository":{"id":37587563,"uuid":"203260021","full_name":"hmerritt/php-imdb-api","owner":"hmerritt","description":"PHP IMDB-API that can fetch film data and search results","archived":false,"fork":false,"pushed_at":"2024-12-01T23:28:29.000Z","size":142,"stargazers_count":60,"open_issues_count":2,"forks_count":21,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-29T04:02:56.428Z","etag":null,"topics":["api","film-data","films","imdb","imdb-api","php","technical-specifications"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hmerritt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-08-19T22:38:25.000Z","updated_at":"2025-03-19T19:50:05.000Z","dependencies_parsed_at":"2023-12-19T12:17:23.233Z","dependency_job_id":"f9c05b39-a90a-4496-953a-d223e45d024d","html_url":"https://github.com/hmerritt/php-imdb-api","commit_stats":{"total_commits":92,"total_committers":6,"mean_commits":"15.333333333333334","dds":"0.14130434782608692","last_synced_commit":"c1fd186a32666a235d35537d6cff5dd63b4c874b"},"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hmerritt%2Fphp-imdb-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hmerritt%2Fphp-imdb-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hmerritt%2Fphp-imdb-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hmerritt%2Fphp-imdb-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hmerritt","download_url":"https://codeload.github.com/hmerritt/php-imdb-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247289408,"owners_count":20914464,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","film-data","films","imdb","imdb-api","php","technical-specifications"],"created_at":"2025-03-22T03:17:18.397Z","updated_at":"2025-04-05T05:02:24.150Z","avatar_url":"https://github.com/hmerritt.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PHP IMDB API\n\n[![Latest Stable Version](https://poser.pugx.org/hmerritt/imdb-api/v/stable)](https://packagist.org/packages/hmerritt/imdb-api)\n[![CircleCI](https://circleci.com/gh/hmerritt/php-imdb-api/tree/master.svg?style=svg)](https://circleci.com/gh/hmerritt/php-imdb-api/tree/master)\n[![Coverage Status](https://coveralls.io/repos/github/hmerritt/php-imdb-api/badge.svg?branch=master)](https://coveralls.io/github/hmerritt/php-imdb-api?branch=master)\n\nPHP IMDB-API that can fetch film data and search results.\n\n## Install\n\nInstall the latest version using [composer](https://getcomposer.org/).\n\n```\n$ composer require hmerritt/imdb-api\n```\n\n## Usage\n\n```php\n// Assuming you installed from Composer:\nrequire \"vendor/autoload.php\";\nuse hmerritt\\Imdb;\n\n$imdb = new Imdb;\n\n// Search imdb\n// -\u003e returns array of films and people found\n$imdb-\u003esearch(\"Apocalypse\");\n\n// Get film data\n// -\u003e returns array of film data (title, year, rating...)\n$imdb-\u003efilm(\"tt0816692\");\n```\n\n### Options\n\n| Name          | Type   | Default Value                                                                                     | Description                                                                                   |\n| ------------- | ------ | ------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |\n| `curlHeaders` | array  | `['Accept-Language: en-US,en;q=0.5']`                                                             | Custom headers can be passed to `cURL` when fetching the IMDB page                            |\n| `cache`       | bool   | `true`                                                                                            | Caches film data to speed-up future requests for the same film                                |\n| `cacheType`   | string | `file` or `redis`                                                                                 | Choose how the caching is done. Either a local file database, or connect to a redis server    |\n| `cacheRedis`  | array  | `[ 'scheme' =\u003e 'tcp', 'host' =\u003e '127.0.0.1', 'port' =\u003e 6379, 'password' =\u003e '', 'database' =\u003e 0 ]` | Redis options                                                                                 |\n| `techSpecs`   | bool   | `true`                                                                                            | Loads a films technical specifications (this will take longer as it makes a separate request) |\n| `category`    | string | `all`                                                                                             | What category to search for (films `tt`, people `nm` or companies `co`)                       |\n\n```php\n$imdb = new Imdb;\n\n//  Options are passed as an array as the second argument\n//  These are the default options\n$imdb-\u003efilm(\"tt0816692\", [\n    'cache'        =\u003e true,\n    'curlHeaders'  =\u003e ['Accept-Language: en-US,en;q=0.5'],\n    'techSpecs'    =\u003e true,\n]);\n\n$imdb-\u003esearch(\"Interstellar\", [\n    'category'     =\u003e 'all',\n    'curlHeaders'  =\u003e ['Accept-Language: en-US,en;q=0.5'],\n]);\n```\n\n### Best Match\n\nIf 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.\n\n\u003e 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.\n\n```php\n// Searches imdb and gets the film data of the first result\n// -\u003e will return the film data for 'Apocalypse Now'\n$imdb-\u003efilm(\"Apocalypse\");\n```\n\n## Features\n\n### Film Data\n\n```\n- Title\n- Genres\n- Year\n- Length\n- Plot\n- Rating\n- Rating Votes (# of votes)\n- Poster\n- Trailer\n    - id\n    - link\n- Cast\n    - actor name\n    - actor id\n    - character\n    - avatar\n    - avatar_hq (high quality avatar)\n- Technical Specs\n```\n\n### Search\n\nSearch IMDB to return an array of films, people and companies\n\n```\n- Films\n    - id\n    - title\n    - image\n- People\n    - id\n    - name\n    - image\n- Companies\n    - id\n    - name\n    - image\n```\n\n## Dependencies\n\n\u003e All dependencies are managed automatically by `composer`.\n\n-   [php-html-parser](https://github.com/paquettg/php-html-parser)\n-   [filebase](https://github.com/tmarois/Filebase)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhmerritt%2Fphp-imdb-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhmerritt%2Fphp-imdb-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhmerritt%2Fphp-imdb-api/lists"}