@rent-scraper/api 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -0
- package/dist/config.d.mts +12 -0
- package/dist/config.mjs +1 -0
- package/dist/index.d.mts +774 -0
- package/dist/index.mjs +2461 -0
- package/dist/shared/api.ucFn6Zgb.mjs +1 -0
- package/package.json +49 -0
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,774 @@
|
|
|
1
|
+
import dayjs from 'dayjs';
|
|
2
|
+
import { ScreenshotOptions } from 'puppeteer';
|
|
3
|
+
|
|
4
|
+
declare const getRedfinListingDetailsById: (id: string) => Promise<any>;
|
|
5
|
+
|
|
6
|
+
interface RedfinListingResultsOptions {
|
|
7
|
+
regionId?: number | null;
|
|
8
|
+
zipCode?: number;
|
|
9
|
+
timeoutMs?: number;
|
|
10
|
+
daysListed?: number;
|
|
11
|
+
}
|
|
12
|
+
declare const getRedfinListingResults: ({ regionId, zipCode, timeoutMs, daysListed }: RedfinListingResultsOptions) => Promise<{
|
|
13
|
+
regionId: number | null | undefined;
|
|
14
|
+
numResults: any;
|
|
15
|
+
totalResultCount: any;
|
|
16
|
+
results: any;
|
|
17
|
+
urls: any;
|
|
18
|
+
zipCode?: number | undefined;
|
|
19
|
+
timestamp: dayjs.Dayjs;
|
|
20
|
+
} | null>;
|
|
21
|
+
declare const fetchRedfinListingResults: ({ regionId, timeoutMs }: RedfinListingResultsOptions) => Promise<any>;
|
|
22
|
+
|
|
23
|
+
declare enum Browser {
|
|
24
|
+
chrome = "Google Chrome",
|
|
25
|
+
brave = "Brave Browser"
|
|
26
|
+
}
|
|
27
|
+
type BrowserKey = keyof typeof Browser;
|
|
28
|
+
type ZipCode = number;
|
|
29
|
+
type RegionId = number;
|
|
30
|
+
type ListingsSource = 'zillow' | 'redfin';
|
|
31
|
+
|
|
32
|
+
interface RegionIdOptions {
|
|
33
|
+
fromFile?: boolean;
|
|
34
|
+
}
|
|
35
|
+
declare const getRedfinRegionIdByZipCode: (zipCode: ZipCode, options?: RegionIdOptions) => Promise<RegionId | null>;
|
|
36
|
+
declare const parseRedfinResponse: (response: string) => any;
|
|
37
|
+
declare const fetchRedfinRegionIdByZipCode: (zipCode: ZipCode) => Promise<RegionId | null>;
|
|
38
|
+
|
|
39
|
+
declare const getHtmlFromRedfinListingUrl: (url: string) => Promise<{
|
|
40
|
+
data: string;
|
|
41
|
+
}>;
|
|
42
|
+
declare const scrapeDataFromRedfinListingUrl: (url: string) => Promise<{
|
|
43
|
+
hasPropertyHistory: boolean;
|
|
44
|
+
propertyId: any;
|
|
45
|
+
rentalId: any;
|
|
46
|
+
initialInfo: any;
|
|
47
|
+
homeCards: any;
|
|
48
|
+
floorPlans: any;
|
|
49
|
+
belowTheFold: any;
|
|
50
|
+
propertyParcelInfo: any;
|
|
51
|
+
timestamp: dayjs.Dayjs;
|
|
52
|
+
}>;
|
|
53
|
+
declare const scrapeDataFromRedfinListingHtml: (html: string) => {
|
|
54
|
+
hasPropertyHistory: boolean;
|
|
55
|
+
propertyId: any;
|
|
56
|
+
rentalId: any;
|
|
57
|
+
initialInfo: any;
|
|
58
|
+
homeCards: any;
|
|
59
|
+
floorPlans: any;
|
|
60
|
+
belowTheFold: any;
|
|
61
|
+
propertyParcelInfo: any;
|
|
62
|
+
timestamp: dayjs.Dayjs;
|
|
63
|
+
};
|
|
64
|
+
interface RedfinListingHtmlOptions {
|
|
65
|
+
timeoutMs?: number;
|
|
66
|
+
}
|
|
67
|
+
declare const fetchHtmlFromRedfinListingUrl: (url: string, options?: RedfinListingHtmlOptions) => Promise<string>;
|
|
68
|
+
|
|
69
|
+
declare const isZillowBotFiltering: (status: number, data: string) => boolean;
|
|
70
|
+
declare const getRandomZipCode: (zipCodes: ZipCode[]) => ZipCode;
|
|
71
|
+
interface CheckForZillowBotFilteringOptions {
|
|
72
|
+
fetchListings?: boolean;
|
|
73
|
+
regionId?: string;
|
|
74
|
+
}
|
|
75
|
+
declare const checkForZillowBotFiltering: (options?: CheckForZillowBotFilteringOptions) => Promise<true | void>;
|
|
76
|
+
declare const waitForSolvedZillowCaptcha: () => Promise<unknown>;
|
|
77
|
+
|
|
78
|
+
type ListingEventType = 'Listed for rent' | 'Price change';
|
|
79
|
+
type NonListingEventType = 'Contingent' | 'Listed for sale' | 'Listing removed' | 'Pending sale' | 'Sold';
|
|
80
|
+
type HistoryItemEventType = ListingEventType | NonListingEventType;
|
|
81
|
+
interface PriceHistoryItemBase {
|
|
82
|
+
date: string;
|
|
83
|
+
price: number | null;
|
|
84
|
+
time: number | null;
|
|
85
|
+
pricePerSquareFoot: number | null;
|
|
86
|
+
priceChangeRate: number | null;
|
|
87
|
+
event: HistoryItemEventType;
|
|
88
|
+
source: string;
|
|
89
|
+
buyerAgent: any;
|
|
90
|
+
sellerAgent: {
|
|
91
|
+
photo: any;
|
|
92
|
+
profileUrl: string;
|
|
93
|
+
name: string;
|
|
94
|
+
} | null;
|
|
95
|
+
showCountyLink: boolean;
|
|
96
|
+
postingIsRental: boolean;
|
|
97
|
+
attributeSource: {
|
|
98
|
+
infoString1: string | null;
|
|
99
|
+
infoString2: string | null;
|
|
100
|
+
infoString3: string | null;
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
interface PriceHistoryItemRental extends PriceHistoryItemBase {
|
|
104
|
+
event: ListingEventType;
|
|
105
|
+
price: number;
|
|
106
|
+
}
|
|
107
|
+
interface PriceHistoryItemOther extends PriceHistoryItemBase {
|
|
108
|
+
event: NonListingEventType;
|
|
109
|
+
price: number | null;
|
|
110
|
+
}
|
|
111
|
+
type PriceHistoryItem = PriceHistoryItemRental | PriceHistoryItemOther;
|
|
112
|
+
type CheckProps = 'date' | 'price' | 'event' | 'postingIsRental';
|
|
113
|
+
type PriceHistoryItemRentalForCheck = Pick<PriceHistoryItemRental, CheckProps>;
|
|
114
|
+
type PriceHistoryItemOtherForCheck = Pick<PriceHistoryItemOther, CheckProps>;
|
|
115
|
+
type PriceHistoryItemForCheck = PriceHistoryItemRentalForCheck | PriceHistoryItemOtherForCheck;
|
|
116
|
+
interface TaxHistoryItem {
|
|
117
|
+
time: number;
|
|
118
|
+
taxPaid: number | null;
|
|
119
|
+
taxIncreaseRate: number;
|
|
120
|
+
value: number | null;
|
|
121
|
+
valueIncreaseRate: number;
|
|
122
|
+
}
|
|
123
|
+
interface ZillowListing {
|
|
124
|
+
listingDataSource: string;
|
|
125
|
+
zpid: number;
|
|
126
|
+
city: string;
|
|
127
|
+
state: string;
|
|
128
|
+
homeStatus: string;
|
|
129
|
+
address: {
|
|
130
|
+
streetAddress: string;
|
|
131
|
+
city: string;
|
|
132
|
+
state: string;
|
|
133
|
+
zipcode: string;
|
|
134
|
+
neighborhood: string | null;
|
|
135
|
+
community: string | null;
|
|
136
|
+
subdivision: string | null;
|
|
137
|
+
};
|
|
138
|
+
isListingClaimedByCurrentSignedInUser: boolean;
|
|
139
|
+
isCurrentSignedInAgentResponsible: boolean;
|
|
140
|
+
bedrooms: number;
|
|
141
|
+
bathrooms: number;
|
|
142
|
+
price: number;
|
|
143
|
+
yearBuilt: number | null;
|
|
144
|
+
streetAddress: string;
|
|
145
|
+
zipcode: string;
|
|
146
|
+
isCurrentSignedInUserVerifiedOwner: boolean;
|
|
147
|
+
propertyUpdatePageLink: string | null;
|
|
148
|
+
moveHomeMapLocationLink: string | null;
|
|
149
|
+
propertyEventLogLink: string | null;
|
|
150
|
+
editPropertyHistorylink: string | null;
|
|
151
|
+
listing_sub_type: {
|
|
152
|
+
is_forAuction: boolean;
|
|
153
|
+
is_newHome: boolean;
|
|
154
|
+
is_FSBO: boolean;
|
|
155
|
+
is_FSBA: boolean;
|
|
156
|
+
is_foreclosure: boolean;
|
|
157
|
+
is_bankOwned: boolean;
|
|
158
|
+
is_comingSoon: boolean;
|
|
159
|
+
is_pending: boolean;
|
|
160
|
+
is_openHouse: boolean;
|
|
161
|
+
};
|
|
162
|
+
providerListingID: string;
|
|
163
|
+
isRentalListingOffMarket: boolean;
|
|
164
|
+
hdpUrl: string;
|
|
165
|
+
country: string;
|
|
166
|
+
cityId: number;
|
|
167
|
+
citySearchUrl: {
|
|
168
|
+
text?: string;
|
|
169
|
+
path: string;
|
|
170
|
+
};
|
|
171
|
+
zipcodeSearchUrl: {
|
|
172
|
+
path: string;
|
|
173
|
+
};
|
|
174
|
+
apartmentsForRentInZipcodeSearchUrl: {
|
|
175
|
+
path: string;
|
|
176
|
+
};
|
|
177
|
+
housesForRentInZipcodeSearchUrl: {
|
|
178
|
+
path: string;
|
|
179
|
+
};
|
|
180
|
+
abbreviatedAddress: string;
|
|
181
|
+
county: string;
|
|
182
|
+
neighborhoodRegion: {
|
|
183
|
+
name: string;
|
|
184
|
+
} | null;
|
|
185
|
+
building: any;
|
|
186
|
+
isUndisclosedAddress: boolean;
|
|
187
|
+
boroughId: number | null;
|
|
188
|
+
neighborhoodSearchUrl: {
|
|
189
|
+
path: string;
|
|
190
|
+
};
|
|
191
|
+
stateSearchUrl: {
|
|
192
|
+
path: string;
|
|
193
|
+
};
|
|
194
|
+
countySearchUrl: {
|
|
195
|
+
text: string;
|
|
196
|
+
path: string;
|
|
197
|
+
};
|
|
198
|
+
boroughSearchUrl: string | null;
|
|
199
|
+
communityUrl: string | null;
|
|
200
|
+
isShowcaseListing: boolean;
|
|
201
|
+
isPremierBuilder: boolean;
|
|
202
|
+
homeType: string;
|
|
203
|
+
adTargets: {
|
|
204
|
+
zip: string;
|
|
205
|
+
aamgnrc1: string;
|
|
206
|
+
mlat?: string;
|
|
207
|
+
bd: string;
|
|
208
|
+
fsbid?: string;
|
|
209
|
+
zusr: string;
|
|
210
|
+
city: string;
|
|
211
|
+
proptp: string;
|
|
212
|
+
pid: string;
|
|
213
|
+
price_band?: string;
|
|
214
|
+
zestimate?: string;
|
|
215
|
+
zestibuck?: string;
|
|
216
|
+
tflag?: string;
|
|
217
|
+
listtp: string;
|
|
218
|
+
premieragent: string;
|
|
219
|
+
sqftrange?: string;
|
|
220
|
+
price: string;
|
|
221
|
+
sqft?: string;
|
|
222
|
+
dma: string;
|
|
223
|
+
guid: string;
|
|
224
|
+
state: string;
|
|
225
|
+
mlong?: string;
|
|
226
|
+
cnty: string;
|
|
227
|
+
prange?: string;
|
|
228
|
+
ssid: string;
|
|
229
|
+
};
|
|
230
|
+
attributionInfo: {
|
|
231
|
+
listingAgreement: string | null;
|
|
232
|
+
mlsName: string | null;
|
|
233
|
+
agentEmail: string | null;
|
|
234
|
+
agentLicenseNumber: string | null;
|
|
235
|
+
agentName: string | null;
|
|
236
|
+
agentPhoneNumber: string | null;
|
|
237
|
+
attributionTitle: string | null;
|
|
238
|
+
brokerName: string | null;
|
|
239
|
+
brokerPhoneNumber: string | null;
|
|
240
|
+
buyerAgentMemberStateLicense: string | null;
|
|
241
|
+
buyerAgentName: string | null;
|
|
242
|
+
buyerBrokerageName: string | null;
|
|
243
|
+
coAgentLicenseNumber: string | null;
|
|
244
|
+
coAgentName: string | null;
|
|
245
|
+
coAgentNumber: string | null;
|
|
246
|
+
lastChecked: string;
|
|
247
|
+
lastUpdated: string;
|
|
248
|
+
listingOffices: {
|
|
249
|
+
associatedOfficeType: string;
|
|
250
|
+
officeName: string | null;
|
|
251
|
+
}[];
|
|
252
|
+
listingAgents: {
|
|
253
|
+
associatedAgentType: string;
|
|
254
|
+
memberFullName: string | null;
|
|
255
|
+
memberStateLicense: string | null;
|
|
256
|
+
}[];
|
|
257
|
+
mlsDisclaimer: string;
|
|
258
|
+
mlsId: string | null;
|
|
259
|
+
providerLogo: string | null;
|
|
260
|
+
listingAttributionContact: string | null;
|
|
261
|
+
listingAgentAttributionContact: string | null;
|
|
262
|
+
infoString3: string | null;
|
|
263
|
+
infoString5: string | null;
|
|
264
|
+
infoString10: string;
|
|
265
|
+
infoString16: string | null;
|
|
266
|
+
trueStatus: string | null;
|
|
267
|
+
};
|
|
268
|
+
currency: string;
|
|
269
|
+
interactiveFloorPlanUrl: string;
|
|
270
|
+
lotPremium: any;
|
|
271
|
+
listPriceLow: any;
|
|
272
|
+
resoFacts: {
|
|
273
|
+
[key: string]: any;
|
|
274
|
+
aboveGradeFinishedArea: number | null;
|
|
275
|
+
accessibilityFeatures: any;
|
|
276
|
+
additionalFeeInfo: any;
|
|
277
|
+
additionalParcelsDescription: any;
|
|
278
|
+
architecturalStyle: any;
|
|
279
|
+
associations: any[];
|
|
280
|
+
associationFee: number | null;
|
|
281
|
+
associationAmenities: string[] | null;
|
|
282
|
+
associationFee2: any;
|
|
283
|
+
associationFeeIncludes: any;
|
|
284
|
+
associationName: any;
|
|
285
|
+
associationName2: any;
|
|
286
|
+
associationPhone: any;
|
|
287
|
+
associationPhone2: any;
|
|
288
|
+
basementYN: any;
|
|
289
|
+
buildingFeatures: any;
|
|
290
|
+
buildingName: any;
|
|
291
|
+
appliances: string[] | null;
|
|
292
|
+
atAGlanceFacts: {
|
|
293
|
+
factLabel: string;
|
|
294
|
+
factValue: string | null;
|
|
295
|
+
}[];
|
|
296
|
+
attic: any;
|
|
297
|
+
availabilityDate: number | null;
|
|
298
|
+
basement: any;
|
|
299
|
+
bathrooms: number;
|
|
300
|
+
bathroomsFull: number;
|
|
301
|
+
bathroomsHalf: number | null;
|
|
302
|
+
bathroomsOneQuarter: any;
|
|
303
|
+
bathroomsPartial: any;
|
|
304
|
+
bathroomsFloat: number;
|
|
305
|
+
bathroomsThreeQuarter: any;
|
|
306
|
+
bedrooms: number;
|
|
307
|
+
belowGradeFinishedArea: any;
|
|
308
|
+
bodyType: any;
|
|
309
|
+
builderModel: any;
|
|
310
|
+
builderName: any;
|
|
311
|
+
buildingArea: any;
|
|
312
|
+
buildingAreaSource: any;
|
|
313
|
+
canRaiseHorses: boolean;
|
|
314
|
+
carportParkingCapacity: any;
|
|
315
|
+
cityRegion: string;
|
|
316
|
+
commonWalls: any;
|
|
317
|
+
communityFeatures: any;
|
|
318
|
+
compensationBasedOn: any;
|
|
319
|
+
constructionMaterials: any[];
|
|
320
|
+
contingency: any;
|
|
321
|
+
cooling: string[] | null;
|
|
322
|
+
coveredParkingCapacity: any;
|
|
323
|
+
cropsIncludedYN: any;
|
|
324
|
+
cumulativeDaysOnMarket: any;
|
|
325
|
+
developmentStatus: any;
|
|
326
|
+
doorFeatures: any;
|
|
327
|
+
electric: any;
|
|
328
|
+
elevation: any;
|
|
329
|
+
elevationUnits: any;
|
|
330
|
+
entryLevel: any;
|
|
331
|
+
entryLocation: any;
|
|
332
|
+
exclusions: any;
|
|
333
|
+
exteriorFeatures: string[];
|
|
334
|
+
feesAndDues: {
|
|
335
|
+
type: string;
|
|
336
|
+
fee: string;
|
|
337
|
+
name: string | null;
|
|
338
|
+
phone: string | null;
|
|
339
|
+
}[];
|
|
340
|
+
fencing: any;
|
|
341
|
+
fireplaceFeatures: any;
|
|
342
|
+
fireplaces: any;
|
|
343
|
+
flooring: string[] | null;
|
|
344
|
+
foundationArea: any;
|
|
345
|
+
foundationDetails: any[];
|
|
346
|
+
frontageLength: any;
|
|
347
|
+
frontageType: any;
|
|
348
|
+
furnished: boolean;
|
|
349
|
+
garageParkingCapacity: any;
|
|
350
|
+
gas: any;
|
|
351
|
+
greenBuildingVerificationType: any;
|
|
352
|
+
greenEnergyEfficient: any;
|
|
353
|
+
greenEnergyGeneration: any;
|
|
354
|
+
greenIndoorAirQuality: any;
|
|
355
|
+
greenSustainability: any;
|
|
356
|
+
greenWaterConservation: any;
|
|
357
|
+
hasAdditionalParcels: boolean;
|
|
358
|
+
hasAssociation: boolean | null;
|
|
359
|
+
hasAttachedGarage: boolean;
|
|
360
|
+
hasAttachedProperty: boolean;
|
|
361
|
+
hasCooling: boolean | null;
|
|
362
|
+
hasCarport: boolean;
|
|
363
|
+
hasElectricOnProperty: any;
|
|
364
|
+
hasFireplace: boolean | null;
|
|
365
|
+
hasGarage: boolean;
|
|
366
|
+
hasHeating: boolean | null;
|
|
367
|
+
hasHomeWarranty: boolean;
|
|
368
|
+
hasLandLease: boolean;
|
|
369
|
+
hasOpenParking: boolean;
|
|
370
|
+
hasRentControl: any;
|
|
371
|
+
hasSpa: boolean;
|
|
372
|
+
hasPetsAllowed: boolean | null;
|
|
373
|
+
hasPrivatePool: boolean | null;
|
|
374
|
+
hasView: boolean;
|
|
375
|
+
hasWaterfrontView: any;
|
|
376
|
+
heating: string[] | null;
|
|
377
|
+
highSchool: any;
|
|
378
|
+
highSchoolDistrict: any;
|
|
379
|
+
hoaFee: any;
|
|
380
|
+
hoaFeeTotal: any;
|
|
381
|
+
homeType: string;
|
|
382
|
+
horseAmenities: any;
|
|
383
|
+
horseYN: any;
|
|
384
|
+
inclusions: any;
|
|
385
|
+
incomeIncludes: any;
|
|
386
|
+
interiorFeatures: any;
|
|
387
|
+
irrigationWaterRightsAcres: any;
|
|
388
|
+
irrigationWaterRightsYN: any;
|
|
389
|
+
isNewConstruction: any;
|
|
390
|
+
isSeniorCommunity: any;
|
|
391
|
+
landLeaseAmount: any;
|
|
392
|
+
landLeaseExpirationDate: any;
|
|
393
|
+
laundryFeatures: string[] | null;
|
|
394
|
+
leaseTerm: string;
|
|
395
|
+
levels: any;
|
|
396
|
+
listingId: any;
|
|
397
|
+
listingTerms: any;
|
|
398
|
+
lotFeatures: any;
|
|
399
|
+
lotSize: any;
|
|
400
|
+
lotSizeDimensions: any;
|
|
401
|
+
livingArea: string | null;
|
|
402
|
+
livingAreaRange: any;
|
|
403
|
+
livingAreaRangeUnits: any;
|
|
404
|
+
livingQuarters: any[];
|
|
405
|
+
mainLevelBathrooms: any;
|
|
406
|
+
mainLevelBedrooms: any;
|
|
407
|
+
marketingType: any;
|
|
408
|
+
media: any[];
|
|
409
|
+
middleOrJuniorSchool: any;
|
|
410
|
+
middleOrJuniorSchoolDistrict: any;
|
|
411
|
+
municipality: any;
|
|
412
|
+
numberOfUnitsInCommunity: any;
|
|
413
|
+
numberOfUnitsVacant: any;
|
|
414
|
+
offerReviewDate: any;
|
|
415
|
+
onMarketDate: number | null;
|
|
416
|
+
openParkingCapacity: any;
|
|
417
|
+
otherEquipment: any;
|
|
418
|
+
otherFacts: any[];
|
|
419
|
+
otherParking: string[];
|
|
420
|
+
otherStructures: any;
|
|
421
|
+
ownership: any;
|
|
422
|
+
ownershipType: any;
|
|
423
|
+
parcelNumber: string | null;
|
|
424
|
+
parkingCapacity: number;
|
|
425
|
+
parkingFeatures: string[];
|
|
426
|
+
parkName: any;
|
|
427
|
+
patioAndPorchFeatures: any;
|
|
428
|
+
petsMaxWeight: any;
|
|
429
|
+
poolFeatures: any;
|
|
430
|
+
pricePerSquareFoot: number | null;
|
|
431
|
+
propertyCondition: any;
|
|
432
|
+
propertySubType: string[];
|
|
433
|
+
roadSurfaceType: any;
|
|
434
|
+
roofType: any;
|
|
435
|
+
rooms: any[];
|
|
436
|
+
roomTypes: string[];
|
|
437
|
+
securityFeatures: any;
|
|
438
|
+
sewer: any;
|
|
439
|
+
spaFeatures: any;
|
|
440
|
+
specialListingConditions: any;
|
|
441
|
+
stories: any;
|
|
442
|
+
storiesDecimal: any;
|
|
443
|
+
storiesTotal: any;
|
|
444
|
+
structureType: any;
|
|
445
|
+
subdivisionName: any;
|
|
446
|
+
taxAnnualAmount: number | null;
|
|
447
|
+
taxAssessedValue: number | null;
|
|
448
|
+
tenantPays: any;
|
|
449
|
+
topography: any;
|
|
450
|
+
totalActualRent: any;
|
|
451
|
+
utilities: any;
|
|
452
|
+
vegetation: any;
|
|
453
|
+
view: any[];
|
|
454
|
+
virtualTour: any;
|
|
455
|
+
waterSource: any;
|
|
456
|
+
waterBodyName: any;
|
|
457
|
+
waterfrontFeatures: any;
|
|
458
|
+
waterView: any;
|
|
459
|
+
waterViewYN: any;
|
|
460
|
+
windowFeatures: any;
|
|
461
|
+
woodedArea: any;
|
|
462
|
+
yearBuilt: number | null;
|
|
463
|
+
yearBuiltEffective: any;
|
|
464
|
+
zoning: any;
|
|
465
|
+
zoningDescription: any;
|
|
466
|
+
elementarySchool: any;
|
|
467
|
+
elementarySchoolDistrict: any;
|
|
468
|
+
listAOR: any;
|
|
469
|
+
};
|
|
470
|
+
monthlyHoaFee: number | null;
|
|
471
|
+
livingArea: number | null;
|
|
472
|
+
livingAreaValue: number | null;
|
|
473
|
+
zestimate: number | null;
|
|
474
|
+
newConstructionType: any;
|
|
475
|
+
zestimateLowPercent: string | null;
|
|
476
|
+
zestimateHighPercent: string | null;
|
|
477
|
+
rentZestimate: number | null;
|
|
478
|
+
restimateLowPercent: string | null;
|
|
479
|
+
restimateHighPercent: string | null;
|
|
480
|
+
homeValues: any;
|
|
481
|
+
parentRegion: {
|
|
482
|
+
name: string;
|
|
483
|
+
regionId: number;
|
|
484
|
+
};
|
|
485
|
+
description: string;
|
|
486
|
+
whatILove: string | null;
|
|
487
|
+
contingentListingType: any;
|
|
488
|
+
timeOnZillow: string;
|
|
489
|
+
pageViewCount: number;
|
|
490
|
+
favoriteCount: number;
|
|
491
|
+
daysOnZillow: number;
|
|
492
|
+
latitude: number | null;
|
|
493
|
+
longitude: number | null;
|
|
494
|
+
openHouseSchedule: any[];
|
|
495
|
+
desktopWebHdpImageLink: string;
|
|
496
|
+
brokerageName: string | null;
|
|
497
|
+
timeZone: string;
|
|
498
|
+
pals: any[];
|
|
499
|
+
listedBy: {
|
|
500
|
+
id: string;
|
|
501
|
+
elements: {
|
|
502
|
+
id: string;
|
|
503
|
+
text: string;
|
|
504
|
+
action: any;
|
|
505
|
+
}[];
|
|
506
|
+
textStyle: any;
|
|
507
|
+
}[];
|
|
508
|
+
sellingSoon: any[];
|
|
509
|
+
listingProvider: {
|
|
510
|
+
title: string;
|
|
511
|
+
disclaimerText: string | null;
|
|
512
|
+
enhancedVideoURL: string | null;
|
|
513
|
+
enhancedDescriptionText: string | null;
|
|
514
|
+
showLogos: any;
|
|
515
|
+
logos: any[];
|
|
516
|
+
showNoContactInfoMessage: boolean;
|
|
517
|
+
agentName: string | null;
|
|
518
|
+
agentLicenseNumber: string | null;
|
|
519
|
+
postingWebsiteURL: string | null;
|
|
520
|
+
postingWebsiteLinkText: string | null;
|
|
521
|
+
postingGroupName: string | null;
|
|
522
|
+
sourceText: string;
|
|
523
|
+
isZRMSourceText: string | null;
|
|
524
|
+
};
|
|
525
|
+
isIncomeRestricted: boolean | null;
|
|
526
|
+
brokerId: string | null;
|
|
527
|
+
ssid: number;
|
|
528
|
+
mortgageZHLRates: {
|
|
529
|
+
fifteenYearFixedBucket: {
|
|
530
|
+
rate: number | null;
|
|
531
|
+
rateSource: string | null;
|
|
532
|
+
lastUpdated: number | null;
|
|
533
|
+
};
|
|
534
|
+
thirtyYearFixedBucket: {
|
|
535
|
+
rate: number | null;
|
|
536
|
+
rateSource: string | null;
|
|
537
|
+
lastUpdated: number | null;
|
|
538
|
+
};
|
|
539
|
+
arm5Bucket: {
|
|
540
|
+
rate: number | null;
|
|
541
|
+
rateSource: string | null;
|
|
542
|
+
lastUpdated: number | null;
|
|
543
|
+
};
|
|
544
|
+
};
|
|
545
|
+
propertyTaxRate: number;
|
|
546
|
+
hiResImageLink: string;
|
|
547
|
+
hdpTypeDimension: string;
|
|
548
|
+
mlsid: string | null;
|
|
549
|
+
ouid: string;
|
|
550
|
+
propertyTypeDimension: string;
|
|
551
|
+
mediumImageLink: string;
|
|
552
|
+
isZillowOwned: boolean;
|
|
553
|
+
enhancedBrokerImageUrl: string | null;
|
|
554
|
+
listingAccountUserId: string | null;
|
|
555
|
+
buildingId: any;
|
|
556
|
+
virtualTourUrl: string | null;
|
|
557
|
+
hasApprovedThirdPartyVirtualTourUrl: boolean;
|
|
558
|
+
photoCount: number;
|
|
559
|
+
livingAreaUnits: string | null;
|
|
560
|
+
lotSize: number | null;
|
|
561
|
+
lotAreaValue: number | null;
|
|
562
|
+
lotAreaUnits: string;
|
|
563
|
+
postingProductType: string;
|
|
564
|
+
marketingName: string | null;
|
|
565
|
+
priceHistory: PriceHistoryItem[] | null;
|
|
566
|
+
stateId: number;
|
|
567
|
+
zipPlusFour: string | null;
|
|
568
|
+
numberOfUnitsTotal: number | null;
|
|
569
|
+
foreclosureDefaultFilingDate: any;
|
|
570
|
+
foreclosureAuctionFilingDate: any;
|
|
571
|
+
foreclosureLoanDate: any;
|
|
572
|
+
foreclosureLoanOriginator: any;
|
|
573
|
+
foreclosureLoanAmount: any;
|
|
574
|
+
foreclosurePriorSaleDate: any;
|
|
575
|
+
foreclosurePriorSaleAmount: any;
|
|
576
|
+
foreclosureBalanceReportingDate: any;
|
|
577
|
+
foreclosureDefaultDescription: any;
|
|
578
|
+
foreclosurePastDueBalance: any;
|
|
579
|
+
foreclosureUnpaidBalance: any;
|
|
580
|
+
foreclosureAuctionTime: any;
|
|
581
|
+
foreclosureAuctionDescription: any;
|
|
582
|
+
foreclosureAuctionCity: any;
|
|
583
|
+
foreclosureAuctionLocation: any;
|
|
584
|
+
foreclosureDate: any;
|
|
585
|
+
foreclosureAmount: any;
|
|
586
|
+
foreclosingBank: any;
|
|
587
|
+
foreclosureJudicialType: string | null;
|
|
588
|
+
datePostedString: string;
|
|
589
|
+
foreclosureTypes: {
|
|
590
|
+
isBankOwned: boolean;
|
|
591
|
+
isForeclosedNFS: boolean;
|
|
592
|
+
isPreforeclosure: boolean;
|
|
593
|
+
isAnyForeclosure: boolean;
|
|
594
|
+
wasNonRetailAuction: boolean;
|
|
595
|
+
wasForeclosed: boolean;
|
|
596
|
+
wasREO: boolean | null;
|
|
597
|
+
wasDefault: boolean | null;
|
|
598
|
+
};
|
|
599
|
+
foreclosureMoreInfo: any;
|
|
600
|
+
hasBadGeocode: boolean;
|
|
601
|
+
streetViewMetadataUrlMediaWallLatLong: string;
|
|
602
|
+
streetViewMetadataUrlMediaWallAddress: string;
|
|
603
|
+
streetViewTileImageUrlMediumLatLong: string;
|
|
604
|
+
streetViewTileImageUrlMediumAddress: string;
|
|
605
|
+
streetViewServiceUrl: string;
|
|
606
|
+
staticMap: {
|
|
607
|
+
sources: {
|
|
608
|
+
width: number;
|
|
609
|
+
url: string;
|
|
610
|
+
isHighResolutionStaticMap: boolean | null;
|
|
611
|
+
}[];
|
|
612
|
+
};
|
|
613
|
+
postingUrl: string | null;
|
|
614
|
+
richMedia: any;
|
|
615
|
+
hasPublicVideo: boolean;
|
|
616
|
+
primaryPublicVideo: any;
|
|
617
|
+
richMediaVideos: any;
|
|
618
|
+
originalPhotos: {
|
|
619
|
+
caption: string;
|
|
620
|
+
mixedSources: {
|
|
621
|
+
jpeg: {
|
|
622
|
+
url: string;
|
|
623
|
+
width: number;
|
|
624
|
+
}[];
|
|
625
|
+
webp: {
|
|
626
|
+
url: string;
|
|
627
|
+
width: number;
|
|
628
|
+
}[];
|
|
629
|
+
};
|
|
630
|
+
}[];
|
|
631
|
+
listingSubType: {
|
|
632
|
+
isFSBA: boolean;
|
|
633
|
+
isFSBO: boolean;
|
|
634
|
+
isPending: boolean;
|
|
635
|
+
isNewHome: boolean;
|
|
636
|
+
isForeclosure: boolean;
|
|
637
|
+
isBankOwned: boolean;
|
|
638
|
+
isForAuction: boolean;
|
|
639
|
+
isOpenHouse: boolean;
|
|
640
|
+
isComingSoon: boolean;
|
|
641
|
+
};
|
|
642
|
+
tourViewCount: number;
|
|
643
|
+
postingContact: {
|
|
644
|
+
name: string | null;
|
|
645
|
+
photo: any;
|
|
646
|
+
};
|
|
647
|
+
listingAccount: any;
|
|
648
|
+
mortgageRates: {
|
|
649
|
+
thirtyYearFixedRate: number;
|
|
650
|
+
};
|
|
651
|
+
annualHomeownersInsurance: number;
|
|
652
|
+
listingFeedID: any;
|
|
653
|
+
livingAreaUnitsShort: string | null;
|
|
654
|
+
priceChange: number | null;
|
|
655
|
+
priceChangeDate: number | null;
|
|
656
|
+
priceChangeDateString: string | null;
|
|
657
|
+
formattedChip: {
|
|
658
|
+
location: {
|
|
659
|
+
fullValue: string;
|
|
660
|
+
}[];
|
|
661
|
+
};
|
|
662
|
+
hideZestimate: boolean;
|
|
663
|
+
comingSoonOnMarketDate: any;
|
|
664
|
+
isPreforeclosureAuction: boolean;
|
|
665
|
+
lastSoldPrice: number | null;
|
|
666
|
+
isHousingConnector: boolean;
|
|
667
|
+
thumb: {
|
|
668
|
+
url: string;
|
|
669
|
+
}[];
|
|
670
|
+
neighborhoodMapThumb: {
|
|
671
|
+
url: string;
|
|
672
|
+
}[];
|
|
673
|
+
isRecentStatusChange: boolean;
|
|
674
|
+
isNonOwnerOccupied: boolean;
|
|
675
|
+
isFeatured: boolean;
|
|
676
|
+
rentalApplicationsAcceptedType: string;
|
|
677
|
+
listingTypeDimension: string;
|
|
678
|
+
featuredListingTypeDimension: string;
|
|
679
|
+
brokerIdDimension: string;
|
|
680
|
+
keystoneHomeStatus: string;
|
|
681
|
+
pageUrlFragment: string;
|
|
682
|
+
isRentalsLeadCapMet: boolean;
|
|
683
|
+
isPaidMultiFamilyBrokerId: boolean;
|
|
684
|
+
countyId: number;
|
|
685
|
+
countyFIPS: string | null;
|
|
686
|
+
parcelId: string | null;
|
|
687
|
+
taxHistory: TaxHistoryItem[];
|
|
688
|
+
neighborhoodId: number;
|
|
689
|
+
zipcodeId: number;
|
|
690
|
+
}
|
|
691
|
+
type ZillowListingForCheck = Pick<ZillowListing, 'zpid' | 'zipcode' | 'bedrooms'> & {
|
|
692
|
+
priceHistory: PriceHistoryItemForCheck[] | null;
|
|
693
|
+
};
|
|
694
|
+
type ZillowListingForRow = ZillowListingForCheck & Pick<ZillowListing, 'address' | 'bedrooms' | 'daysOnZillow' | 'hdpUrl' | 'homeStatus' | 'homeType' | 'isRentalListingOffMarket' | 'price' | 'timeOnZillow' | 'zipcode' | 'zpid'> & Partial<Pick<ZillowListing, 'neighborhoodRegion' | 'attributionInfo' | 'brokerageName' | 'resoFacts' | 'latitude' | 'longitude'>>;
|
|
695
|
+
declare const isZillowListingForRow: (value: unknown) => value is ZillowListingForRow;
|
|
696
|
+
|
|
697
|
+
interface ZillowListingDetailsOptions {
|
|
698
|
+
timeoutMs?: number;
|
|
699
|
+
altFetch?: boolean;
|
|
700
|
+
onlyRemovedListings?: boolean;
|
|
701
|
+
}
|
|
702
|
+
declare const getZillowListingDetailsByZpid: (zpid: string, options?: ZillowListingDetailsOptions) => Promise<any>;
|
|
703
|
+
declare const getZillowListingContactDetailsByZpid: (zpid: string) => Promise<ZillowListing>;
|
|
704
|
+
|
|
705
|
+
declare const zillowListingResultsHeaders: {
|
|
706
|
+
Accept: string;
|
|
707
|
+
'Accept-Language': string;
|
|
708
|
+
'Content-Type': string;
|
|
709
|
+
'Cache-Control': string;
|
|
710
|
+
Pragma: string;
|
|
711
|
+
'Sec-Ch-Ua': string;
|
|
712
|
+
'Sec-Ch-Ua-Mobile': string;
|
|
713
|
+
'Sec-Ch-Ua-Platform': string;
|
|
714
|
+
'Sec-Fetch-Dest': string;
|
|
715
|
+
'Sec-Fetch-Mode': string;
|
|
716
|
+
'Sec-Fetch-Site': string;
|
|
717
|
+
'Sec-Fetch-User': string;
|
|
718
|
+
'Upgrade-Insecure-Requests': string;
|
|
719
|
+
'User-Agent': string;
|
|
720
|
+
};
|
|
721
|
+
interface ZillowListingResultsOptions {
|
|
722
|
+
page?: number;
|
|
723
|
+
daysOnZillow?: number;
|
|
724
|
+
scrapeData?: boolean;
|
|
725
|
+
contactDetails?: boolean;
|
|
726
|
+
prettyListings?: boolean;
|
|
727
|
+
regionId?: number;
|
|
728
|
+
zipCode?: number;
|
|
729
|
+
mergePageResults?: boolean;
|
|
730
|
+
timeoutMs?: number;
|
|
731
|
+
}
|
|
732
|
+
interface ZillowListingResults {
|
|
733
|
+
timestamp: dayjs.Dayjs;
|
|
734
|
+
zipCode?: ZipCode;
|
|
735
|
+
regionId?: RegionId;
|
|
736
|
+
numResults: number;
|
|
737
|
+
totalResultCount: number;
|
|
738
|
+
resultsPerPage: number;
|
|
739
|
+
mergePageResults?: boolean;
|
|
740
|
+
pagesCrawled?: number;
|
|
741
|
+
page?: number;
|
|
742
|
+
totalPages?: number;
|
|
743
|
+
results: Record<string, any>[];
|
|
744
|
+
urls: string[];
|
|
745
|
+
}
|
|
746
|
+
declare const getZillowListingResults: ({ page, daysOnZillow, regionId, zipCode, mergePageResults, timeoutMs }: ZillowListingResultsOptions) => Promise<ZillowListingResults | null>;
|
|
747
|
+
declare const fetchZillowListingResults: ({ page, daysOnZillow, regionId, timeoutMs }: ZillowListingResultsOptions, resultsOnly?: boolean) => Promise<any>;
|
|
748
|
+
|
|
749
|
+
interface ZillowRegionIdOptions {
|
|
750
|
+
fromFile?: boolean;
|
|
751
|
+
}
|
|
752
|
+
declare const getZillowRegionIdByZipCode: (zipCode: ZipCode, options?: ZillowRegionIdOptions) => Promise<RegionId | null>;
|
|
753
|
+
|
|
754
|
+
interface ZillowListingHtmlOptions {
|
|
755
|
+
timeoutMs?: number;
|
|
756
|
+
}
|
|
757
|
+
declare const fetchHtmlFromZillowListingUrl: (url: string, options?: ZillowListingHtmlOptions) => Promise<string>;
|
|
758
|
+
declare const getHtmlFromZillowListingUrl: (url: string) => Promise<{
|
|
759
|
+
data: string;
|
|
760
|
+
}>;
|
|
761
|
+
declare const scrapeDataFromZillowListingUrl: (url: string) => Promise<any>;
|
|
762
|
+
declare const scrapeDataFromZillowListingHtml: (html: string) => any;
|
|
763
|
+
|
|
764
|
+
declare const generateRandomUA: () => string;
|
|
765
|
+
/**
|
|
766
|
+
* Take a screeenshot of a zillow listing
|
|
767
|
+
* Works with both local (file://) and remote (https://) urls
|
|
768
|
+
* @param url url of the listing to screenshot
|
|
769
|
+
* @param filePath output to save the screenshot to
|
|
770
|
+
*/
|
|
771
|
+
declare const screenshotZillowListing: (url: string, filePath: ScreenshotOptions["path"]) => Promise<void>;
|
|
772
|
+
|
|
773
|
+
export { Browser, checkForZillowBotFiltering, fetchHtmlFromRedfinListingUrl, fetchHtmlFromZillowListingUrl, fetchRedfinListingResults, fetchRedfinRegionIdByZipCode, fetchZillowListingResults, generateRandomUA, getHtmlFromRedfinListingUrl, getHtmlFromZillowListingUrl, getRandomZipCode, getRedfinListingDetailsById, getRedfinListingResults, getRedfinRegionIdByZipCode, getZillowListingContactDetailsByZpid, getZillowListingDetailsByZpid, getZillowListingResults, getZillowRegionIdByZipCode, isZillowBotFiltering, isZillowListingForRow, parseRedfinResponse, scrapeDataFromRedfinListingHtml, scrapeDataFromRedfinListingUrl, scrapeDataFromZillowListingHtml, scrapeDataFromZillowListingUrl, screenshotZillowListing, waitForSolvedZillowCaptcha, zillowListingResultsHeaders };
|
|
774
|
+
export type { BrowserKey, ListingsSource, PriceHistoryItem, PriceHistoryItemBase, PriceHistoryItemForCheck, PriceHistoryItemOther, PriceHistoryItemOtherForCheck, PriceHistoryItemRental, PriceHistoryItemRentalForCheck, RedfinListingHtmlOptions, RedfinListingResultsOptions, RegionId, TaxHistoryItem, ZillowListing, ZillowListingDetailsOptions, ZillowListingForCheck, ZillowListingForRow, ZillowListingHtmlOptions, ZillowListingResults, ZillowListingResultsOptions, ZipCode };
|