1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "daysBack": 30,
12 "dateFrom": "",
13 "dateTo": "",
14 "sources": [
15 "akita",
16 "ishikawa",
17 "sapporo",
18 "kyoto",
19 "kamisunagawa",
20 "yamaguchi"
21 ],
22 "prefectures": [],
23 "municipalities": [],
24 "types": [],
25 "maxItems": 200,
26 "maxRequests": 80,
27 "proxyConfiguration": {
28 "useApifyProxy": false
29 },
30 "residentialProxyConfiguration": {
31 "useApifyProxy": true,
32 "apifyProxyGroups": [
33 "RESIDENTIAL"
34 ],
35 "apifyProxyCountry": "JP"
36 }
37};
38
39
40const run = await client.actor("jpopendata/japan-bear-sightings").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