1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "searchQueries": [
12 "The Odyssey"
13 ],
14 "lists": [
15 "movie_popular"
16 ],
17 "startUrls": [
18 {
19 "url": "https://www.themoviedb.org/movie"
20 }
21 ],
22 "genres": [
23 "Action",
24 "Adventure"
25 ],
26 "maxItems": 10,
27 "proxyConfiguration": {
28 "useApifyProxy": true,
29 "apifyProxyGroups": [
30 "RESIDENTIAL"
31 ]
32 }
33};
34
35
36const run = await client.actor("datascrapers/themoviedb-scraper").call(input);
37
38
39console.log('Results from dataset');
40console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
41const { items } = await client.dataset(run.defaultDatasetId).listItems();
42items.forEach((item) => {
43 console.dir(item);
44});
45
46