1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "keywords": [
12 "iPhone 17 Pro"
13 ],
14 "categories": [],
15 "shops": [
16 "kaitorishouten",
17 "keitaispace",
18 "mobileichiban"
19 ],
20 "startUrls": [],
21 "makers": [],
22 "conditions": [],
23 "excludeWords": [],
24 "maxItems": 500,
25 "maxPagesPerShop": 5,
26 "proxyConfiguration": {
27 "useApifyProxy": false
28 },
29 "residentialProxyConfiguration": {
30 "useApifyProxy": true,
31 "apifyProxyGroups": [
32 "RESIDENTIAL"
33 ],
34 "apifyProxyCountry": "JP"
35 }
36};
37
38
39const run = await client.actor("jpopendata/japan-phone-buyback-prices").call(input);
40
41
42console.log('Results from dataset');
43console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
44const { items } = await client.dataset(run.defaultDatasetId).listItems();
45items.forEach((item) => {
46 console.dir(item);
47});
48
49