1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "sp_contact": "Share your email here...",
12 "states": [
13 "AZ"
14 ],
15 "specialty": "",
16 "city": "",
17 "zip": "",
18 "providerUrls": [
19 {
20 "url": "https://www.healthgrades.com/physician/dr-todd-dreitzler-3hf24"
21 },
22 {
23 "url": "https://www.healthgrades.com/physician/dr-ankit-chander-24myx"
24 },
25 {
26 "url": "https://www.healthgrades.com/physician/dr-david-gannon-27jdd"
27 }
28 ],
29 "maxItems": 3
30};
31
32
33const run = await client.actor("jungle_synthesizer/healthgrades-scraper").call(input);
34
35
36console.log('Results from dataset');
37console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
38const { items } = await client.dataset(run.defaultDatasetId).listItems();
39items.forEach((item) => {
40 console.dir(item);
41});
42
43