1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "operation": "photos",
12 "places": [
13 "Katz's Delicatessen New York",
14 "https://www.google.com/maps/place/Eiffel+Tower/@48.8583701,2.2944813,17z/data=!4m6!3m5!1s0x47e66e2964e34e2d:0x8ddca9ee380ef7e0!8m2!3d48.8583701!4d2.2944813"
15 ],
16 "photoCategories": [
17 "all"
18 ],
19 "maxPhotosPerPlace": 100,
20 "imageSize": "original",
21 "language": "en",
22 "includeVideos": true
23};
24
25
26const run = await client.actor("sian.agency/google-maps-photos-scraper").call(input);
27
28
29console.log('Results from dataset');
30console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
31const { items } = await client.dataset(run.defaultDatasetId).listItems();
32items.forEach((item) => {
33 console.dir(item);
34});
35
36