scrapebadger 0.15.2 → 0.15.4
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 +1 -1
- package/dist/index.d.cts +534 -76
- package/dist/index.d.ts +534 -76
- package/dist/index.js +127 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +124 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -3152,6 +3152,16 @@ var ShoppingClient = class {
|
|
|
3152
3152
|
params: { ...params }
|
|
3153
3153
|
});
|
|
3154
3154
|
}
|
|
3155
|
+
/**
|
|
3156
|
+
* Resolve a product by `barcode` (GTIN-8/UPC-A/EAN-13/GTIN-14) and return
|
|
3157
|
+
* its multi-seller Google Shopping offers. Throws on a 422 (invalid or
|
|
3158
|
+
* checksum-failing barcode) or 404 (barcode not resolvable to a product).
|
|
3159
|
+
*/
|
|
3160
|
+
async offers(params) {
|
|
3161
|
+
return this.client.request("/v1/google/shopping/offers", {
|
|
3162
|
+
params: { ...params }
|
|
3163
|
+
});
|
|
3164
|
+
}
|
|
3155
3165
|
};
|
|
3156
3166
|
|
|
3157
3167
|
// src/google/shorts.ts
|
|
@@ -5654,6 +5664,116 @@ var YoutubeClient = class {
|
|
|
5654
5664
|
}
|
|
5655
5665
|
};
|
|
5656
5666
|
|
|
5667
|
+
// src/realtor/search.ts
|
|
5668
|
+
var SearchClient9 = class {
|
|
5669
|
+
client;
|
|
5670
|
+
constructor(client) {
|
|
5671
|
+
this.client = client;
|
|
5672
|
+
}
|
|
5673
|
+
/**
|
|
5674
|
+
* Search a market for properties.
|
|
5675
|
+
*
|
|
5676
|
+
* @param location - Freetext location ("Austin, TX" / ZIP / "Toronto, ON").
|
|
5677
|
+
* Required unless a CA bounding box is provided.
|
|
5678
|
+
* @param options - Filters, sorting, and pagination.
|
|
5679
|
+
* @returns Search results with pagination metadata.
|
|
5680
|
+
* @throws AuthenticationError - If the API key is invalid.
|
|
5681
|
+
* @throws ValidationError - If the parameters are invalid.
|
|
5682
|
+
*/
|
|
5683
|
+
async search(location, options = {}) {
|
|
5684
|
+
return this.client.request("/v1/realtor/search", {
|
|
5685
|
+
params: {
|
|
5686
|
+
location,
|
|
5687
|
+
market: options.market,
|
|
5688
|
+
status: options.status,
|
|
5689
|
+
price_min: options.priceMin,
|
|
5690
|
+
price_max: options.priceMax,
|
|
5691
|
+
beds_min: options.bedsMin,
|
|
5692
|
+
baths_min: options.bathsMin,
|
|
5693
|
+
sqft_min: options.sqftMin,
|
|
5694
|
+
sqft_max: options.sqftMax,
|
|
5695
|
+
property_type: options.propertyType,
|
|
5696
|
+
sort: options.sort,
|
|
5697
|
+
page: options.page,
|
|
5698
|
+
limit: options.limit,
|
|
5699
|
+
lat_min: options.latMin,
|
|
5700
|
+
lat_max: options.latMax,
|
|
5701
|
+
lng_min: options.lngMin,
|
|
5702
|
+
lng_max: options.lngMax
|
|
5703
|
+
}
|
|
5704
|
+
});
|
|
5705
|
+
}
|
|
5706
|
+
/**
|
|
5707
|
+
* Get location autocomplete suggestions.
|
|
5708
|
+
*
|
|
5709
|
+
* @param query - Partial location query.
|
|
5710
|
+
* @param options - Optional parameters (market, limit).
|
|
5711
|
+
* @returns Autocomplete suggestions.
|
|
5712
|
+
*/
|
|
5713
|
+
async autocomplete(query, options = {}) {
|
|
5714
|
+
return this.client.request("/v1/realtor/autocomplete", {
|
|
5715
|
+
params: { query, market: options.market, limit: options.limit }
|
|
5716
|
+
});
|
|
5717
|
+
}
|
|
5718
|
+
};
|
|
5719
|
+
|
|
5720
|
+
// src/realtor/properties.ts
|
|
5721
|
+
var PropertiesClient = class {
|
|
5722
|
+
client;
|
|
5723
|
+
constructor(client) {
|
|
5724
|
+
this.client = client;
|
|
5725
|
+
}
|
|
5726
|
+
/**
|
|
5727
|
+
* Get a single property's full detail.
|
|
5728
|
+
*
|
|
5729
|
+
* @param propertyId - The property id.
|
|
5730
|
+
* @param options - Optional parameters (market).
|
|
5731
|
+
* @returns Property detail including details, amenities, and history.
|
|
5732
|
+
* @throws NotFoundError - If the property doesn't exist.
|
|
5733
|
+
*/
|
|
5734
|
+
async getProperty(propertyId, options = {}) {
|
|
5735
|
+
return this.client.request(`/v1/realtor/properties/${propertyId}`, {
|
|
5736
|
+
params: { market: options.market }
|
|
5737
|
+
});
|
|
5738
|
+
}
|
|
5739
|
+
};
|
|
5740
|
+
|
|
5741
|
+
// src/realtor/reference.ts
|
|
5742
|
+
var ReferenceClient7 = class {
|
|
5743
|
+
client;
|
|
5744
|
+
constructor(client) {
|
|
5745
|
+
this.client = client;
|
|
5746
|
+
}
|
|
5747
|
+
/**
|
|
5748
|
+
* Get all supported realtor markets.
|
|
5749
|
+
*
|
|
5750
|
+
* @returns Markets response with all supported markets.
|
|
5751
|
+
*/
|
|
5752
|
+
async listMarkets() {
|
|
5753
|
+
return this.client.request("/v1/realtor/markets");
|
|
5754
|
+
}
|
|
5755
|
+
};
|
|
5756
|
+
|
|
5757
|
+
// src/realtor/client.ts
|
|
5758
|
+
var RealtorClient = class {
|
|
5759
|
+
/** Client for property search and location autocomplete */
|
|
5760
|
+
search;
|
|
5761
|
+
/** Client for full property detail */
|
|
5762
|
+
properties;
|
|
5763
|
+
/** Client for reference data (markets) */
|
|
5764
|
+
reference;
|
|
5765
|
+
/**
|
|
5766
|
+
* Create a new Realtor client.
|
|
5767
|
+
*
|
|
5768
|
+
* @param client - The base HTTP client for making requests.
|
|
5769
|
+
*/
|
|
5770
|
+
constructor(client) {
|
|
5771
|
+
this.search = new SearchClient9(client);
|
|
5772
|
+
this.properties = new PropertiesClient(client);
|
|
5773
|
+
this.reference = new ReferenceClient7(client);
|
|
5774
|
+
}
|
|
5775
|
+
};
|
|
5776
|
+
|
|
5657
5777
|
// src/client.ts
|
|
5658
5778
|
var ScrapeBadger = class {
|
|
5659
5779
|
baseClient;
|
|
@@ -5677,6 +5797,8 @@ var ScrapeBadger = class {
|
|
|
5677
5797
|
ebay;
|
|
5678
5798
|
/** YouTube scraper API client — 39 endpoints */
|
|
5679
5799
|
youtube;
|
|
5800
|
+
/** Realtor scraper API client — 4 endpoints across 2 markets (us, ca) */
|
|
5801
|
+
realtor;
|
|
5680
5802
|
/**
|
|
5681
5803
|
* Create a new ScrapeBadger client.
|
|
5682
5804
|
*
|
|
@@ -5721,9 +5843,10 @@ var ScrapeBadger = class {
|
|
|
5721
5843
|
this.tiktok = new TikTokClient(this.baseClient);
|
|
5722
5844
|
this.ebay = new EbayClient(this.baseClient);
|
|
5723
5845
|
this.youtube = new YoutubeClient(this.baseClient);
|
|
5846
|
+
this.realtor = new RealtorClient(this.baseClient);
|
|
5724
5847
|
}
|
|
5725
5848
|
};
|
|
5726
5849
|
|
|
5727
|
-
export { AccountRestrictedError, AmazonClient, ListingsClient as AmazonListingsClient, ProductsClient2 as AmazonProductsClient, ReferenceClient2 as AmazonReferenceClient, SearchClient4 as AmazonSearchClient, SellersClient as AmazonSellersClient, AuthenticationError, CommunitiesClient, ConflictError, CategoriesClient as EbayCategoriesClient, EbayClient, ItemsClient2 as EbayItemsClient, ReferenceClient5 as EbayReferenceClient, SearchClient7 as EbaySearchClient, SellersClient2 as EbaySellersClient, GeoClient, AiModeClient as GoogleAiModeClient, AutocompleteClient as GoogleAutocompleteClient, GoogleClient, FinanceClient as GoogleFinanceClient, FlightsClient as GoogleFlightsClient, HotelsClient as GoogleHotelsClient, ImagesClient as GoogleImagesClient, JobsClient as GoogleJobsClient, LensClient as GoogleLensClient, MapsClient as GoogleMapsClient, NewsClient as GoogleNewsClient, PatentsClient as GooglePatentsClient, ProductsClient as GoogleProductsClient, ScholarClient as GoogleScholarClient, SearchClient2 as GoogleSearchClient, ShoppingClient as GoogleShoppingClient, ShortsClient as GoogleShortsClient, TrendsClient2 as GoogleTrendsClient, VideosClient as GoogleVideosClient, InsufficientCreditsError, ListsClient, NotFoundError, RateLimitError, RedditClient, PostsClient as RedditPostsClient, SearchClient3 as RedditSearchClient, SubredditsClient as RedditSubredditsClient, UsersClient3 as RedditUsersClient, ScrapeBadger, ScrapeBadgerError, ServerError, ShopeeClient, ProductsClient3 as ShopeeProductsClient, ReferenceClient3 as ShopeeReferenceClient, ReviewsClient as ShopeeReviewsClient, SearchClient5 as ShopeeSearchClient, SpacesClient, StreamClient, AdsClient as TikTokAdsClient, TikTokClient, HashtagsClient as TikTokHashtagsClient, MusicClient as TikTokMusicClient, ReferenceClient4 as TikTokReferenceClient, SearchClient6 as TikTokSearchClient, TrendingClient as TikTokTrendingClient, UsersClient4 as TikTokUsersClient, VideosClient2 as TikTokVideosClient, TimeoutError, TrendsClient, TweetsClient, TwitterClient, UsersClient, ValidationError, VintedClient, ItemsClient as VintedItemsClient, ReferenceClient as VintedReferenceClient, SearchClient as VintedSearchClient, UsersClient2 as VintedUsersClient, WebClient, WebSocketStreamError, ChannelsClient as YoutubeChannelsClient, YoutubeClient, CommunityClient as YoutubeCommunityClient, MusicClient2 as YoutubeMusicClient, PlaylistsClient as YoutubePlaylistsClient, ReferenceClient6 as YoutubeReferenceClient, SearchClient8 as YoutubeSearchClient, ShortsClient2 as YoutubeShortsClient, TrendingClient2 as YoutubeTrendingClient, VideosClient3 as YoutubeVideosClient, collectAll, verifyWebhookSignature };
|
|
5850
|
+
export { AccountRestrictedError, AmazonClient, ListingsClient as AmazonListingsClient, ProductsClient2 as AmazonProductsClient, ReferenceClient2 as AmazonReferenceClient, SearchClient4 as AmazonSearchClient, SellersClient as AmazonSellersClient, AuthenticationError, CommunitiesClient, ConflictError, CategoriesClient as EbayCategoriesClient, EbayClient, ItemsClient2 as EbayItemsClient, ReferenceClient5 as EbayReferenceClient, SearchClient7 as EbaySearchClient, SellersClient2 as EbaySellersClient, GeoClient, AiModeClient as GoogleAiModeClient, AutocompleteClient as GoogleAutocompleteClient, GoogleClient, FinanceClient as GoogleFinanceClient, FlightsClient as GoogleFlightsClient, HotelsClient as GoogleHotelsClient, ImagesClient as GoogleImagesClient, JobsClient as GoogleJobsClient, LensClient as GoogleLensClient, MapsClient as GoogleMapsClient, NewsClient as GoogleNewsClient, PatentsClient as GooglePatentsClient, ProductsClient as GoogleProductsClient, ScholarClient as GoogleScholarClient, SearchClient2 as GoogleSearchClient, ShoppingClient as GoogleShoppingClient, ShortsClient as GoogleShortsClient, TrendsClient2 as GoogleTrendsClient, VideosClient as GoogleVideosClient, InsufficientCreditsError, ListsClient, NotFoundError, RateLimitError, RealtorClient, PropertiesClient as RealtorPropertiesClient, ReferenceClient7 as RealtorReferenceClient, SearchClient9 as RealtorSearchClient, RedditClient, PostsClient as RedditPostsClient, SearchClient3 as RedditSearchClient, SubredditsClient as RedditSubredditsClient, UsersClient3 as RedditUsersClient, ScrapeBadger, ScrapeBadgerError, ServerError, ShopeeClient, ProductsClient3 as ShopeeProductsClient, ReferenceClient3 as ShopeeReferenceClient, ReviewsClient as ShopeeReviewsClient, SearchClient5 as ShopeeSearchClient, SpacesClient, StreamClient, AdsClient as TikTokAdsClient, TikTokClient, HashtagsClient as TikTokHashtagsClient, MusicClient as TikTokMusicClient, ReferenceClient4 as TikTokReferenceClient, SearchClient6 as TikTokSearchClient, TrendingClient as TikTokTrendingClient, UsersClient4 as TikTokUsersClient, VideosClient2 as TikTokVideosClient, TimeoutError, TrendsClient, TweetsClient, TwitterClient, UsersClient, ValidationError, VintedClient, ItemsClient as VintedItemsClient, ReferenceClient as VintedReferenceClient, SearchClient as VintedSearchClient, UsersClient2 as VintedUsersClient, WebClient, WebSocketStreamError, ChannelsClient as YoutubeChannelsClient, YoutubeClient, CommunityClient as YoutubeCommunityClient, MusicClient2 as YoutubeMusicClient, PlaylistsClient as YoutubePlaylistsClient, ReferenceClient6 as YoutubeReferenceClient, SearchClient8 as YoutubeSearchClient, ShortsClient2 as YoutubeShortsClient, TrendingClient2 as YoutubeTrendingClient, VideosClient3 as YoutubeVideosClient, collectAll, verifyWebhookSignature };
|
|
5728
5851
|
//# sourceMappingURL=index.mjs.map
|
|
5729
5852
|
//# sourceMappingURL=index.mjs.map
|