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 "Nintendo Switch",
13 "ポケモンカード"
14 ],
15 "sources": [
16 "yahoo-auctions-sold",
17 "yahoo-flea-market",
18 "bookoff",
19 "hareruya"
20 ],
21 "maxItemsPerSource": 20,
22 "maxPagesPerSource": 2,
23 "soldWithinDays": 0,
24 "condition": "any",
25 "excludeWords": [],
26 "bookoffCategory": "game",
27 "proxyConfiguration": {
28 "useApifyProxy": false
29 },
30 "surugayaProxyConfiguration": {
31 "useApifyProxy": true,
32 "apifyProxyGroups": [
33 "RESIDENTIAL"
34 ],
35 "apifyProxyCountry": "JP"
36 }
37};
38
39
40const run = await client.actor("jpopendata/japan-resale-price-comps").call(input);
41
42
43console.log('Results from dataset');
44console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
45const { items } = await client.dataset(run.defaultDatasetId).listItems();
46items.forEach((item) => {
47 console.dir(item);
48});
49
50