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 "states": [
15 "AZ"
16 ],
17 "specialty": "",
18 "city": "",
19 "zip": "",
20 "providerUrls": [
21 {
22 "url": "https://www.healthgrades.com/physician/dr-todd-dreitzler-3hf24"
23 },
24 {
25 "url": "https://www.healthgrades.com/physician/dr-ankit-chander-24myx"
26 },
27 {
28 "url": "https://www.healthgrades.com/physician/dr-david-gannon-27jdd"
29 }
30 ],
31 "maxItems": 3,
32 "proxyConfiguration": {
33 "useApifyProxy": true,
34 "apifyProxyCountry": "US"
35 }
36};
37
38
39const run = await client.actor("jungle_synthesizer/healthgrades-scraper").call(input);
40
41
42console.log('Results from dataset');
43console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
44const { items } = await client.dataset(run.defaultDatasetId).listItems();
45items.forEach((item) => {
46 console.dir(item);
47});
48
49