
IMDB Advanced Scraper
- epctex/imdb-advanced-scraper
- Modified
- Users 56
- Runs 1.4k
- Created by
epctex
Advanced scraping on IMDB for data on millions of movies, artists and many more. Crawl TV Episodes and extract descriptions, images, casting, rating, artists and all other properties. You can specify search terms, filters, mappings, modes and much more.
To run the code examples, you need to have an Apify account. Replace <YOUR_API_TOKEN> in the code with your API token. For a more detailed explanation, please read about running actors via the API in Apify Docs.
import { ApifyClient } from 'apify-client';
// Initialize the ApifyClient with API token
const client = new ApifyClient({
token: '<YOUR_API_TOKEN>',
});
// Prepare actor input
const input = {
"search": "warner",
"mode": "all",
"startUrls": [
"https://www.imdb.com/title/tt0056234/?ref_=adv_li_tt",
"https://www.imdb.com/name/nm0912504/?ref_=fn_al_nm_1",
"https://www.imdb.com/list/ls566706296",
"https://www.imdb.com/find?s=kw&q=warn&ref_=nv_sr_sm"
],
"maxItems": 20,
"endPage": 1,
"extendOutputFunction": ($) => { return {} },
"customMapFunction": (object) => { return {...object} },
"proxy": {
"useApifyProxy": true
}
};
(async () => {
// Run the actor and wait for it to finish
const run = await client.actor("epctex/imdb-advanced-scraper").call(input);
// Fetch and print actor results from the run's dataset (if any)
console.log('Results from dataset');
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
console.dir(item);
});
})();