1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "enableSearch": true,
12 "searchTasks": [
13 {
14 "query": "dermatologist",
15 "location": "Miami, FL",
16 "maxResults": 10
17 }
18 ],
19 "maxResultsPerQuery": 10,
20 "enableProviderDetails": false,
21 "providerUrls": [],
22 "npiNumbers": [],
23 "enableLeadDetails": true,
24 "maxItems": 10,
25 "language": "en",
26 "webhookUrl": "",
27 "webhookFormat": "json",
28 "proxyConfiguration": {
29 "useApifyProxy": true,
30 "apifyProxyGroups": [
31 "RESIDENTIAL"
32 ],
33 "apifyProxyCountry": "US"
34 }
35};
36
37
38const run = await client.actor("b2b_leads/healthgrades-real-time-data-scraper").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