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 "queries": [
13 "コーヒー"
14 ],
15 "genreIds": [],
16 "tagIds": [],
17 "shopUrlCodes": [],
18 "urls": [
19 "https://search.rakuten.co.jp/search/mall/coffee/?s=2"
20 ],
21 "maxItems": 50,
22 "maxPages": 0,
23 "maxReviewsPerItem": 30,
24 "incrementalMode": false,
25 "emitUnchanged": false,
26 "emitExpired": false,
27 "proxy": {
28 "useApifyProxy": true
29 }
30};
31
32
33const run = await client.actor("abotapi/rakuten-ichiba-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