1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "country": "fr",
12 "specialty": "medecin-generaliste",
13 "city": "Paris",
14 "viewport": {
15 "northeast": {
16 "lat": 49,
17 "lng": 2.6
18 },
19 "southwest": {
20 "lat": 48.6,
21 "lng": 2.1
22 }
23 },
24 "maxResults": 100,
25 "scrapeProfileDetails": false,
26 "proxy": {
27 "useApifyProxy": false
28 }
29};
30
31
32const run = await client.actor("ahmed_jasarevic/doctolib-fr-scraper").call(input);
33
34
35console.log('Results from dataset');
36console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
37const { items } = await client.dataset(run.defaultDatasetId).listItems();
38items.forEach((item) => {
39 console.dir(item);
40});
41
42