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 "prefecture": "13",
13 "cityCodes": [
14 "13101"
15 ],
16 "layouts": [
17 "02"
18 ],
19 "urls": [
20 "https://suumo.jp/jj/chintai/ichiran/FR301FC001/?ar=030&bs=040&ta=13&sc=13101"
21 ],
22 "fetchDetails": false,
23 "maxItems": 20,
24 "maxPages": 0,
25 "incrementalMode": false,
26 "emitUnchanged": false,
27 "emitExpired": false,
28 "maxNotifyListings": 50,
29 "proxyConfiguration": {
30 "useApifyProxy": true
31 }
32};
33
34
35const run = await client.actor("abotapi/suumo-jp-scraper").call(input);
36
37
38console.log('Results from dataset');
39console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
40const { items } = await client.dataset(run.defaultDatasetId).listItems();
41items.forEach((item) => {
42 console.dir(item);
43});
44
45