A lightweight Node.js API that scrapes IMDb to fetch movie, series, or TV show details using Express, Axios, and Cheerio. This API allows you to search for titles and retrieve detailed metadata such as rating, plot, genres, cast, and more.
🌐 Live Demo: movieSearch, getMovieDetails
- 🔍 Search any movie or series by title
- 🎞 Get movie details by IMDb ID
- 🎭 Includes cast, director, genres, rating, plot summary, etc.
- 🚫 Filters out incomplete data automatically
Description: Search for a movie, series, or title.
Query Parameter:
q
: The title to search for.
Example:
GET /search?q=The Notebook
Response:
{
"searchResults": [
{
"id": "0332280",
"title": "The Notebook",
"year": "2004",
"type": "Movie",
"poster": "https://..."
},
...
]
}
Description:: Get full details about a movie using its IMDb ID.
Query Parameter:
id
: : IMDb ID
Example:
GET /getmoviedetails?id=0332280
Response:
{
"title": "The Notebook",
"rating": "7.8",
"description": "A poor yet passionate young man...",
"duration": "2h 3m",
"genre": ["Drama", "Romance"],
"releaseDate": "25 June 2004",
"director": "Nick Cassavetes",
"cast": [
{ "name": "Ryan Gosling", "character": "Noah" },
...
],
"poster": "https://..."
}
🚀 How to Run Locally
git clone https://github.com/milancodess/imdb-scraper-api.git
cd imdb-scraper-api
npm install
node server.js
The server will start on http://localhost:3000
.