1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "subject": {
12 "address": "15 Broad St, Boston, MA",
13 "bedrooms": 2,
14 "bathrooms": 1,
15 "propertyType": "apartment"
16 },
17 "comparables": [
18 {
19 "id": "comp-1",
20 "address": "19 Broad St, Boston, MA",
21 "rentMonthly": 4200,
22 "currency": "USD",
23 "bedrooms": 2,
24 "bathrooms": 1,
25 "propertyType": "apartment",
26 "observedAt": "2026-08-15T00:00:00.000Z",
27 "sourceUrl": "https://example.com/listings/comp-1"
28 },
29 {
30 "id": "comp-2",
31 "address": "23 Broad St, Boston, MA",
32 "rentMonthly": 4350,
33 "currency": "USD",
34 "bedrooms": 2,
35 "bathrooms": 1,
36 "propertyType": "apartment",
37 "observedAt": "2026-08-20T00:00:00.000Z",
38 "sourceUrl": "https://example.com/listings/comp-2"
39 },
40 {
41 "id": "comp-3",
42 "address": "31 Broad St, Boston, MA",
43 "rentMonthly": 4100,
44 "currency": "USD",
45 "bedrooms": 2,
46 "bathrooms": 1,
47 "propertyType": "apartment",
48 "observedAt": "2026-08-27T00:00:00.000Z",
49 "sourceUrl": "https://example.com/listings/comp-3"
50 }
51 ],
52 "currency": "USD",
53 "analysisMethod": "weightedMedian",
54 "maxComparableAgeDays": 365,
55 "maxComparableDistanceMiles": 5,
56 "minimumComparableScore": 0.5,
57 "outlierStrategy": "iqr",
58 "maxComparablesInReport": 25
59};
60
61
62const run = await client.actor("khadinakbar/rentometer-alternative").call(input);
63
64
65console.log('Results from dataset');
66console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
67const { items } = await client.dataset(run.defaultDatasetId).listItems();
68items.forEach((item) => {
69 console.dir(item);
70});
71
72