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 "urls": [
13 "https://search.rakuten.co.jp/search/mall/coffee/?s=2",
14 "https://search.rakuten.co.jp/search/mall/coffee/100316/",
15 "https://search.rakuten.co.jp/search/mall/-/100316/?p=2",
16 "https://www.rakuten.co.jp/category/100316/",
17 "https://search.rakuten.co.jp/search/mall/%E3%82%B3%E3%83%BC%E3%83%92%E3%83%BC/-/tg1011693/",
18 "https://search.rakuten.co.jp/search/mall/coffee/?p=3",
19 "https://search.rakuten.co.jp/search/mall/coffee/?sid=193811",
20 "https://search.rakuten.co.jp/search/mall/coffee/?min=500&max=2000&review=4&used=0&s=5",
21 "https://search.rakuten.co.jp/search/inshop/ajinomoto/",
22 "https://www.rakuten.co.jp/ajinomoto/",
23 "https://item.rakuten.co.jp/ajinomoto/nb38/",
24 "https://review.rakuten.co.jp/item/1/193811_10001806/2.1/"
25 ],
26 "queries": [
27 "コーヒー"
28 ],
29 "genreIds": [],
30 "tagIds": [],
31 "shopUrlCodes": [],
32 "maxItems": 50,
33 "maxPages": 0,
34 "maxReviewsPerItem": 20,
35 "proxy": {
36 "useApifyProxy": true
37 },
38 "incrementalMode": false,
39 "emitUnchanged": false,
40 "emitExpired": false,
41 "ignoreFieldsForChanges": []
42};
43
44
45const run = await client.actor("abotapi/rakuten-ichiba-scraper").call(input);
46
47
48console.log('Results from dataset');
49console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
50const { items } = await client.dataset(run.defaultDatasetId).listItems();
51items.forEach((item) => {
52 console.dir(item);
53});
54
55