1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "operation": "search",
12 "locations": [
13 "Texas"
14 ],
15 "propertyType": "any",
16 "availability": "available",
17 "minPrice": 0,
18 "maxPrice": 0,
19 "minAcres": 0,
20 "maxAcres": 0,
21 "minBeds": 0,
22 "hasResidence": "any",
23 "mineralRights": false,
24 "ownerFinancing": false,
25 "activity": "any",
26 "maxResults": 100,
27 "includeDetails": false,
28 "propertyUrls": [],
29 "searchUrls": []
30};
31
32
33const run = await client.actor("sian.agency/landwatch-property-scraper").call(input);
34
35
36console.log('Results from dataset');
37console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
38const { items } = await client.dataset(run.defaultDatasetId).listItems();
39items.forEach((item) => {
40 console.dir(item);
41});
42
43