This is an API which scrapes the Internet Movie Database for movie and TV show information. It supports both searching for movies and retrieving movies by ID. There is also a caching layer implemented in Redis.
The API has a public endpoint at https://imdb-scraper.herokuapp.com/ where the following functions can be found. You can also run your own instance if you wish.
GET /search?q=Game+of+Thrones&limit=20
q
- Required. The string to query IMDb with.limit
- Optional. Maximum number of results to return. Defaults to 5.See example: https://imdb-scraper.herokuapp.com/search?q=Game+of+Thrones&limit=20
GET /title?id=tt0182576
id
- Required. The ID, in tt* format, of the title to find.See example: https://imdb-scraper.herokuapp.com/title?id=tt0182576
If there is an error with your request, a message following this format will be returned:
{
"success": false,
"error": "Some error message here."
}
This API is written in TypeScript and the files in build/
are auto-generated by tsc -w
. Run npm start
to start build/index.js
.
To enable debug output on errors, set the DEBUG
environment variable.
To use Redis for caching, set the REDIS_URL
environment variable to one parsable by the NodeJS redis library.