1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "mode": "search",
12 "areas": [
13 "新宿"
14 ],
15 "urls": [
16 "https://beauty.hotpepper.jp/svcSA/macAA/salon/",
17 "https://beauty.hotpepper.jp/svcSA/macAA/",
18 "https://beauty.hotpepper.jp/svcSA/macAA/salon/sacX001/",
19 "https://beauty.hotpepper.jp/svcSA/macAA/salon/PN2.html?searchGender=ALL&sortType=popular",
20 "https://beauty.hotpepper.jp/nail/svcSA/macAA/salon/",
21 "https://beauty.hotpepper.jp/slnH000145984/",
22 "https://beauty.hotpepper.jp/slnH000145984/coupon/",
23 "https://beauty.hotpepper.jp/CSP/bt/salonSearch/search/?freeword=%E6%B8%8B%E8%B0%B7&searchGender=ALL&sortType=popular"
24 ],
25 "includeReviews": false,
26 "maxReviewsPerSalon": 30,
27 "maxItems": 20,
28 "proxy": {
29 "useApifyProxy": true
30 },
31 "incrementalMode": false,
32 "emitUnchanged": false,
33 "emitExpired": false
34};
35
36
37const run = await client.actor("abotapi/beauty-hotpepper-jp-scraper").call(input);
38
39
40console.log('Results from dataset');
41console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
42const { items } = await client.dataset(run.defaultDatasetId).listItems();
43items.forEach((item) => {
44 console.dir(item);
45});
46
47