1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "requestReference": "SAMPLE-SCREENING-20260809",
12 "requestText": "Rank my authorized Baldwin County record by county and listing.",
13 "years": [
14 2026
15 ],
16 "businessPurpose": "Internal due-diligence research for a possible direct purchase.",
17 "customerType": "direct_customer",
18 "expectedVolume": "under_500",
19 "deliveryMode": "portal_api",
20 "lawfulPurposeAccepted": true,
21 "restrictedUseAccepted": true,
22 "licenseAccepted": true,
23 "maxResults": 100,
24 "maxSourceAgeDays": 3650,
25 "maxTargetCost": 5000,
26 "minAssessedValue": 0,
27 "minMarketValue": 0,
28 "minValueToCostRatio": 0,
29 "preferredPropertyTypes": [
30 "land"
31 ],
32 "preferredSaleMethods": [],
33 "sortPreference": "best_value",
34 "customerDataRightsAccepted": true,
35 "customerRecords": [
36 {
37 "recordReference": "CUSTOMER-SAMPLE-001",
38 "stateCode": "AL",
39 "county": "Baldwin County",
40 "recordYear": 2026,
41 "listingStatus": "ACTIVE",
42 "dataAsOf": "2026-08-10",
43 "parcelId": "SAMPLE-PARCEL-001",
44 "propertyType": "land",
45 "saleMethod": "non auction tax sale",
46 "minimumBidUsd": 900,
47 "assessedValueUsd": 12000,
48 "marketValueUsd": 15000
49 }
50 ],
51 "rankingMode": "counties_and_listings",
52 "minQualifyingListingsPerCounty": 0,
53 "minCountyMatchRatePercent": 0,
54 "countyWeightListingCount": 30,
55 "countyWeightMatchRate": 25,
56 "countyWeightValueContext": 20,
57 "countyWeightSaleTiming": 15,
58 "countyWeightCompleteness": 10,
59 "jurisdictions": [
60 {
61 "stateCode": "AL",
62 "name": "Baldwin County",
63 "jurisdictionId": "US-AL-01003"
64 }
65 ]
66};
67
68
69const run = await client.actor("ascensionworks/ascension-works-opportunity-screening-request").call(input);
70
71
72console.log('Results from dataset');
73console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
74const { items } = await client.dataset(run.defaultDatasetId).listItems();
75items.forEach((item) => {
76 console.dir(item);
77});
78
79