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 "country": "gb",
15 "categories": [
16 "electricians",
17 "plumbers",
18 "gardeners",
19 "painter-decorator",
20 "cleaners"
21 ],
22 "cities": [
23 "london",
24 "manchester",
25 "bristol",
26 "liverpool",
27 "edinburgh"
28 ],
29 "enrich_with_profile_data": true,
30 "maxItems": 15
31};
32
33
34const run = await client.actor("jungle_synthesizer/bark-com-service-pros-scraper").call(input);
35
36
37console.log('Results from dataset');
38console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
39const { items } = await client.dataset(run.defaultDatasetId).listItems();
40items.forEach((item) => {
41 console.dir(item);
42});
43
44