The Movie Database API wrapper for Node.js.
- Trending all
- Trending movies
- Trending people
- Trending tv shows
- Popular movies
- Popular people
- Popular tv shows
- Movies in theatres
- Top rated movies
- Top rated tv shows
npm install themoviedb.js
# Account
Create an The Movie DB account on https://www.themoviedb.org/.
# API Key
Create an API key on https://www.themoviedb.org/settings/api.
const TMDB = require('themoviedb.js');
const tmdb = new TMDB({
api_key: 'TMDB_API_KEY',
});
(async () => {
try {
const trending = await tmdb.all().getTrending();
console.log(trending);
const nowPlayingMovie = await tmdb.movie().getNowPlaying();
console.log(nowPlayingMovie);
const popularMovie = await tmdb.movie().getPopular();
console.log(popularMovie);
const trendingMovie = await tmdb.movie().getTrending();
console.log(trendingMovie);
const topRatedMovie = await tmdb.movie().getTopRated();
console.log(topRatedMovie);
} catch (error) {
console.error(error);
}
})();
This product uses the TMDB API but is not endorsed or certified by TMDB.