1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "mode": "searchPlaces",
12 "keywords": [
13 "Times Square"
14 ],
15 "placeUrls": [],
16 "cityUrls": [],
17 "categories": [],
18 "resultTypes": [
19 "places"
20 ],
21 "outputType": "placeRecords",
22 "maxResultsPerKeyword": 1,
23 "maxPlaces": 1,
24 "maxPlacesPerCity": 20,
25 "maxSnapsPerPlace": 3,
26 "includeSnapData": true,
27 "includePlaceDetails": true,
28 "includeNearbyPlaces": false,
29 "includeReviews": false,
30 "includePopularityHours": true,
31 "minRating": 0,
32 "requireLiveSnaps": false,
33 "snapMaxAgeHours": 0,
34 "sortBy": "source"
35};
36
37
38const run = await client.actor("dataspryva/snapchat-snap-map-place-and-live-snap-extractor").call(input);
39
40
41console.log('Results from dataset');
42console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
43const { items } = await client.dataset(run.defaultDatasetId).listItems();
44items.forEach((item) => {
45 console.dir(item);
46});
47
48