🎬 IMDb Scraper API

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


📌 Features


📁 Endpoints

1. /search?q=title

Description: Search for a movie, series, or title.

Query Parameter: q — The title to search for.

Example: GET /search?q=The Notebook

{
  "searchResults": [
    {
      "id": "0332280",
      "title": "The Notebook",
      "year": "2004",
      "type": "Movie",
      "poster": "https://..."
    }
  ]
}

2. /getmoviedetails?id=0332280

Description: Get full details about a movie using its IMDb ID.

Query Parameter: id — IMDb ID

Example: GET /getmoviedetails?id=0332280

{
  "title": "The Notebook",
  "rating": "7.8",
  "totalRatings": "657K",
  "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.


🛠 Built With

Node.js Express Axios Cheerio IMDb