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 "locations": [
13 "Texas"
14 ],
15 "urls": [
16 "https://www.landwatch.com/texas-land-for-sale",
17 "https://www.landwatch.com/land",
18 "https://www.landwatch.com/texas-land-for-sale/bandera-county",
19 "https://www.landwatch.com/texas-land-for-sale/page-2",
20 "https://www.landwatch.com/texas-land-for-sale/bandera-county/page-2",
21 "https://www.landwatch.com/land/page-2",
22 "https://www.landwatch.com/texas-land-for-sale/acres-101-200",
23 "https://www.landwatch.com/texas-land-for-sale/price-100000-249999",
24 "https://www.landwatch.com/texas-land-for-sale/hunting-property",
25 "https://www.landwatch.com/hunting-property",
26 "https://www.landwatch.com/texas-land-for-sale/page-2/acres-101-200",
27 "https://www.landwatch.com/bandera-county-texas-farms-and-ranches-for-sale/pid/416370332",
28 "https://www.landwatch.com/texas-land-for-sale/farms-ranches",
29 "https://www.landwatch.com/texas-land-for-sale/camping-activity",
30 "https://www.landwatch.com/profile/mark-connally-jr-broker-associate/3584690"
31 ],
32 "proxy": {
33 "useApifyProxy": true
34 },
35 "incrementalMode": false,
36 "emitUnchanged": false,
37 "emitExpired": false,
38 "ignoreFieldsForChanges": []
39};
40
41
42const run = await client.actor("abotapi/landwatch-scraper").call(input);
43
44
45console.log('Results from dataset');
46console.log(`๐พ Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
47const { items } = await client.dataset(run.defaultDatasetId).listItems();
48items.forEach((item) => {
49 console.dir(item);
50});
51
52