1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "cities": [
12 "albuquerque-nm",
13 "anaheim-ca",
14 "anchorage-ak",
15 "arlington-tx",
16 "atlanta-ga",
17 "aurora-co",
18 "austin-tx",
19 "bakersfield-ca",
20 "baltimore-md",
21 "baton-rouge-la",
22 "boise-id",
23 "boston-ma",
24 "buffalo-ny",
25 "chandler-az",
26 "charlotte-nc",
27 "chesapeake-va",
28 "chicago-il",
29 "chula-vista-ca",
30 "cincinnati-oh",
31 "cleveland-oh",
32 "colorado-springs-co",
33 "columbus-oh",
34 "corpus-christi-tx",
35 "dallas-tx",
36 "denver-co",
37 "detroit-mi",
38 "durham-nc",
39 "el-paso-tx",
40 "fort-wayne-in",
41 "fort-worth-tx",
42 "fremont-ca",
43 "fresno-ca",
44 "garland-tx",
45 "gilbert-az",
46 "glendale-az",
47 "greensboro-nc",
48 "henderson-nv",
49 "hialeah-fl",
50 "honolulu-hi",
51 "houston-tx",
52 "indianapolis-in",
53 "irvine-ca",
54 "irving-tx",
55 "jacksonville-fl",
56 "jersey-city-nj",
57 "kansas-city-mo",
58 "laredo-tx",
59 "las-vegas-nv",
60 "lexington-ky",
61 "lincoln-ne",
62 "long-beach-ca",
63 "los-angeles-ca",
64 "louisville-ky",
65 "lubbock-tx",
66 "madison-wi",
67 "memphis-tn",
68 "mesa-az",
69 "miami-fl",
70 "milwaukee-wi",
71 "minneapolis-mn",
72 "nashville-tn",
73 "new-orleans-la",
74 "new-york-ny",
75 "newark-nj",
76 "norfolk-va",
77 "north-las-vegas-nv",
78 "oakland-ca",
79 "oklahoma-city-ok",
80 "omaha-ne",
81 "orlando-fl",
82 "philadelphia-pa",
83 "phoenix-az",
84 "pittsburgh-pa",
85 "plano-tx",
86 "portland-or",
87 "raleigh-nc",
88 "reno-nv",
89 "richmond-va",
90 "riverside-ca",
91 "sacramento-ca",
92 "san-antonio-tx",
93 "san-diego-ca",
94 "san-francisco-ca",
95 "san-jose-ca",
96 "santa-ana-ca",
97 "scottsdale-az",
98 "seattle-wa",
99 "spokane-wa",
100 "st-louis-mo",
101 "st-paul-mn",
102 "st-petersburg-fl",
103 "stockton-ca",
104 "tampa-fl",
105 "toledo-oh",
106 "tucson-az",
107 "tulsa-ok",
108 "virginia-beach-va",
109 "washington-dc",
110 "wichita-ks",
111 "winston-salem-nc"
112 ],
113 "proxyConfiguration": {
114 "useApifyProxy": true,
115 "apifyProxyGroups": [
116 "RESIDENTIAL"
117 ]
118 }
119};
120
121
122const run = await client.actor("moving_beacon-owner1/apartments-com-scraper").call(input);
123
124
125console.log('Results from dataset');
126console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
127const { items } = await client.dataset(run.defaultDatasetId).listItems();
128items.forEach((item) => {
129 console.dir(item);
130});
131
132