1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "sp_intended_usage": "Describe your intended use...",
12 "sp_improvement_suggestions": "Share your suggestions here...",
13 "sp_contact": "Share your email here...",
14 "maxItems": 10,
15 "styles": [
16 "yoga-retreats",
17 "meditation-retreats",
18 "ayahuasca-retreats"
19 ],
20 "countries": [
21 "mexico",
22 "brazil",
23 "peru",
24 "costa-rica",
25 "guatemala",
26 "colombia",
27 "nicaragua",
28 "ecuador",
29 "argentina",
30 "chile"
31 ]
32};
33
34
35const run = await client.actor("jungle_synthesizer/bookretreats-latam-yoga-meditation-scraper").call(input);
36
37
38console.log('Results from dataset');
39console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
40const { items } = await client.dataset(run.defaultDatasetId).listItems();
41items.forEach((item) => {
42 console.dir(item);
43});
44
45