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 "Austin, TX"
14 ],
15 "listingInputs": [
16 "https://www.padmapper.com/apartments/austin-tx",
17 "https://www.padmapper.com/apartments/toronto-on",
18 "https://www.padmapper.com/apartments/austin-tx?max-price=2000",
19 "https://www.padmapper.com/apartments/austin-tx?property-categories=house",
20 "https://www.padmapper.com/apartments/austin-tx?page=2",
21 "https://www.padmapper.com/apartments/austin-tx/2-beds",
22 "https://www.padmapper.com/apartments/austin-tx/pet-friendly",
23 "https://www.padmapper.com/apartments/austin-tx/under-1500",
24 "https://www.padmapper.com/rentals/58574913",
25 "https://www.padmapper.com/buildings/p12116/waller-creekside-apartments-at-105-w-51st-st-austin-tx-78751",
26 "https://www.padmapper.com/buildings/1717500/blueground-san-francisco-apartments-at-149-san-francisco-new-montgomery-st-san-francisco-ca-94105"
27 ],
28 "urls": [
29 "https://www.padmapper.com/apartments/austin-tx",
30 "https://www.padmapper.com/apartments/toronto-on",
31 "https://www.padmapper.com/apartments/austin-tx?max-price=2000",
32 "https://www.padmapper.com/apartments/austin-tx?property-categories=house",
33 "https://www.padmapper.com/apartments/austin-tx?page=2",
34 "https://www.padmapper.com/apartments/austin-tx/2-beds",
35 "https://www.padmapper.com/apartments/austin-tx/pet-friendly",
36 "https://www.padmapper.com/apartments/austin-tx/under-1500",
37 "https://www.padmapper.com/rentals/58574913",
38 "https://www.padmapper.com/buildings/p12116/waller-creekside-apartments-at-105-w-51st-st-austin-tx-78751",
39 "https://www.padmapper.com/buildings/1717500/blueground-san-francisco-apartments-at-149-san-francisco-new-montgomery-st-san-francisco-ca-94105"
40 ],
41 "maxItems": 20,
42 "proxyConfiguration": {
43 "useApifyProxy": true,
44 "apifyProxyGroups": [
45 "RESIDENTIAL"
46 ]
47 },
48 "incrementalMode": false,
49 "emitUnchanged": false,
50 "emitExpired": false,
51 "maxNotifyListings": 50
52};
53
54
55const run = await client.actor("abotapi/padmapper-rental-listings-scraper").call(input);
56
57
58console.log('Results from dataset');
59console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
60const { items } = await client.dataset(run.defaultDatasetId).listItems();
61items.forEach((item) => {
62 console.dir(item);
63});
64
65