1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "searchQueries": [
12 "Mobile App Development",
13 "Web Development"
14 ],
15 "startUrls": [
16 {
17 "url": "https://www.goodfirms.co/directory/platform/app-development"
18 }
19 ],
20 "maxItems": 50,
21 "includeReviews": true,
22 "maxReviewsPerCompany": 5,
23 "includePortfolio": false,
24 "maxPages": 5,
25 "proxyConfiguration": {
26 "useApifyProxy": true,
27 "apifyProxyGroups": [
28 "RESIDENTIAL"
29 ]
30 },
31 "maxConcurrency": 5,
32 "debugMode": false
33};
34
35
36const run = await client.actor("happitap/goodfirms-scraper").call(input);
37
38
39console.log('Results from dataset');
40console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
41const { items } = await client.dataset(run.defaultDatasetId).listItems();
42items.forEach((item) => {
43 console.dir(item);
44});
45
46