{"id":13823020,"url":"https://github.com/worr/node-imdb-api","last_synced_at":"2025-05-16T17:32:59.243Z","repository":{"id":4513929,"uuid":"5653708","full_name":"worr/node-imdb-api","owner":"worr","description":"A non-scraping, functional node.js interface to imdb (mirror of gitlab.com/worr/node-imdb-api)","archived":false,"fork":false,"pushed_at":"2023-03-05T15:26:12.000Z","size":3115,"stargazers_count":339,"open_issues_count":24,"forks_count":50,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-11-19T23:37:38.239Z","etag":null,"topics":["api-client","imdb","javascript","omdb","omdb-api-consumer","typescript"],"latest_commit_sha":null,"homepage":"https://gitlab.com/worr/node-imdb-api","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/worr.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2012-09-03T02:20:35.000Z","updated_at":"2024-09-25T00:51:57.000Z","dependencies_parsed_at":"2023-07-06T07:27:46.925Z","dependency_job_id":null,"html_url":"https://github.com/worr/node-imdb-api","commit_stats":{"total_commits":287,"total_committers":13,"mean_commits":"22.076923076923077","dds":"0.13937282229965153","last_synced_commit":"0ec8ae4b9194355e1b99ae7c2ff51cac0c1e3ae5"},"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/worr%2Fnode-imdb-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/worr%2Fnode-imdb-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/worr%2Fnode-imdb-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/worr%2Fnode-imdb-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/worr","download_url":"https://codeload.github.com/worr/node-imdb-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254576782,"owners_count":22094453,"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-client","imdb","javascript","omdb","omdb-api-consumer","typescript"],"created_at":"2024-08-04T08:02:30.413Z","updated_at":"2025-05-16T17:32:58.232Z","avatar_url":"https://github.com/worr.png","language":"TypeScript","readme":"# node-imdb-api\n\nA non-scraping, functional node.js interface to imdb\n\n# Badges\n\n[![NPM version](https://badge.fury.io/js/imdb-api.svg)](http://badge.fury.io/js/imdb-api) [![pipeline status](https://gitlab.com/worr/node-imdb-api/badges/master/pipeline.svg)](https://gitlab.com/worr/node-imdb-api/-/commits/master)  [![Dependency Freshness](https://david-dm.org/worr/node-imdb-api.svg)](https://david-dm.org/worr/node-imdb-api) [![coverage report](https://gitlab.com/worr/node-imdb-api/badges/master/coverage.svg)](https://gitlab.com/worr/node-imdb-api/-/commits/master) [![Join the chat at https://gitter.im/worr/node-imdb-api](https://badges.gitter.im/worr/node-imdb-api.svg)](https://gitter.im/worr/node-imdb-api?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n\n# Github / Gitlab\n\n[Gitlab](https://gitlab.com/worr/node-imdb-api) is the official upstream, and\ncommits are mirrored to [Github](https://github.com/worr/node-imdb-api). I look\nat issues and PRs/MRs on both. Feel free to contribute on either.\n\n# API Docs\n\n[API docs are now here](https://docs.worrbase.com/node/imdb-api/)\n\n# Use\n\nImport the library using `require`\n\n```js\nconst imdb = require('imdb-api')\n```\n\nor ES6 `import`\n\n```js\nimport imdb from 'imdb-api'\n```\n\nCall `get` to get a single movie\n```js\nimdb.get({name: 'The Toxic Avenger'}, {apiKey: 'foo', timeout: 30000}).then(console.log).catch(console.log);\n\nMovie {\n  title: 'The Toxic Avenger',\n  ...\n}\n```\nFurthermore if you already know the id you can call `get` with different args:\n```js\nimdb.get({id: 'tt0090190'}, {apiKey: 'foo'}).then(console.log);\n\nMovie {\n  title: 'The Toxic Avenger',\n  ...\n}\n```\n\nYou can search for movies, and get multiple results by using the `search` function.\n\n```js\nimdb.search({\n  name: 'Toxic Avenger'\n}, {\n  apiKey: 'foo'\n}).then(console.log).catch(console.log);\n```\n\nTV shows have an `episodes` method that you can use to fetch all of the episodes\nfrom that TV series.\n\n```js\nimdb.get({name: 'How I Met Your Mother'}, {apiKey: 'foo'}).then((things) =\u003e {\n    return things.episodes()\n}).then((eps) =\u003e {\n    console.log(eps);\n});\n\nEpisode {\n  season: 2,\n  name: 'The Scorpion and the Toad',\n  released: '2006-10-25T07:00:00.000Z',\n  episode: 2,\n  rating: '8.3',\n  imdbid: 'tt0869673' },\n...\n```\n\n# Using a `Client` object\n\n`imdb-api` also exported a `Client` object that you can use to store options for subsequent requests.\n\n```js\nimport imdb = require('imdb');\nconst cli = new imdb.Client({apiKey: 'xxxxxx'});\ncli.get({'name': 'The Toxic Avenger'}).then(console.log);\n```\n\n`Client` also has a `search` method for searching.\n\n```js\nimport imdb = require('imdb');\nconst cli = new imdb.Client({apiKey: 'xxxxxx'});\ncli.search({'name': 'The Toxic Avenger'}).then((search) =\u003e {\n  for (const result of search.results) {\n    console.log(result.title);\n  }\n});\n```\n\n# FAQ\n\n## I see an API key in your examples? Is it required? How do I get one?\n\nYes, it is required! omdb made this a requirement as of May 8, 2017. This is unfortunate,\nbut totally understandable. While I plan on working on finding an alternative to provide\nthe movie info you crave, I've enabled you to pass in an apikey.\n\nYou can get one by going [here](https://www.patreon.com/posts/api-is-going-10743518).\n\n## Why? There are like 3 other interfaces to imdb in npm\n\nMost of them scrape imdb. imdb explicitly forbids scraping.\n\nAnd what happens when the site layout changes? Well then your screen scraping\nsolution fails in interesting ways. Screen scraping is also pretty slow,\nand we can't have that.\n\n## WOAH I looked at your code and you're using unofficial APIs!\n\nThere isn't an official API to imdb. As soon as one is released (and I\nnotice), I'll update the module.\n\nimdb DOES release all of their data in text files nightly, so unofficial sites\nhave popped up providing RESTful APIs against that data.\n\nI have to use a few, since none of them are complete.\n\n## What if one of the unofficial APIs disappears?\n\nFile a bug. I'll get creative.\n","funding_links":["https://www.patreon.com/posts/api-is-going-10743518"],"categories":["TypeScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fworr%2Fnode-imdb-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fworr%2Fnode-imdb-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fworr%2Fnode-imdb-api/lists"}