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 "states": [
13 "CA"
14 ],
15 "listingStatus": "active",
16 "sortBy": "default",
17 "urls": [
18 "https://www.auction.com/residential/CA/active_lt",
19 "https://www.auction.com/residential/active_lt/",
20 "https://www.auction.com/residential/CA/Los-Angeles_ct/active_lt",
21 "https://www.auction.com/residential/90210_zp/active_lt",
22 "https://www.auction.com/residential/CA/active_lt/2_cp",
23 "https://www.auction.com/residential/CA/active_lt/single-family_pt/bank-owned_at",
24 "https://www.auction.com/residential/CA/active_lt/online_af",
25 "https://www.auction.com/residential/CA/active_lt/3_bd/2_bt/500_any_sqft",
26 "https://www.auction.com/residential/CA/active_lt/auction_date_order,resi_sort_v2_st",
27 "https://auction.com/residential/TX/active_lt",
28 "https://www.auction.com/residential/CA/sold_lt"
29 ],
30 "maxPages": 0,
31 "maxListings": 20,
32 "proxy": {
33 "useApifyProxy": true
34 },
35 "ignoreFieldsForChanges": []
36};
37
38
39const run = await client.actor("abotapi/auction-com-scraper").call(input);
40
41
42console.log('Results from dataset');
43console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
44const { items } = await client.dataset(run.defaultDatasetId).listItems();
45items.forEach((item) => {
46 console.dir(item);
47});
48
49