1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "mode": "place",
12 "places": [
13 "sf"
14 ],
15 "categories": [],
16 "calendars": [],
17 "events": [],
18 "locationType": "any",
19 "freeOnly": false,
20 "includeDetails": false,
21 "descriptionFormat": "text",
22 "maxEventsPerSource": 25,
23 "maxEventsTotal": 1000,
24 "maxConcurrency": 3,
25 "maxRunSecs": 240,
26 "proxyConfiguration": {
27 "useApifyProxy": true
28 }
29};
30
31
32const run = await client.actor("insight.solutions/luma-events-api").call(input);
33
34
35console.log('Results from dataset');
36console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
37const { items } = await client.dataset(run.defaultDatasetId).listItems();
38items.forEach((item) => {
39 console.dir(item);
40});
41
42