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/dist/index.js CHANGED
@@ -3158,6 +3158,16 @@ var ShoppingClient = class {
3158
3158
  params: { ...params }
3159
3159
  });
3160
3160
  }
3161
+ /**
3162
+ * Resolve a product by `barcode` (GTIN-8/UPC-A/EAN-13/GTIN-14) and return
3163
+ * its multi-seller Google Shopping offers. Throws on a 422 (invalid or
3164
+ * checksum-failing barcode) or 404 (barcode not resolvable to a product).
3165
+ */
3166
+ async offers(params) {
3167
+ return this.client.request("/v1/google/shopping/offers", {
3168
+ params: { ...params }
3169
+ });
3170
+ }
3161
3171
  };
3162
3172
 
3163
3173
  // src/google/shorts.ts
@@ -5660,6 +5670,116 @@ var YoutubeClient = class {
5660
5670
  }
5661
5671
  };
5662
5672
 
5673
+ // src/realtor/search.ts
5674
+ var SearchClient9 = class {
5675
+ client;
5676
+ constructor(client) {
5677
+ this.client = client;
5678
+ }
5679
+ /**
5680
+ * Search a market for properties.
5681
+ *
5682
+ * @param location - Freetext location ("Austin, TX" / ZIP / "Toronto, ON").
5683
+ * Required unless a CA bounding box is provided.
5684
+ * @param options - Filters, sorting, and pagination.
5685
+ * @returns Search results with pagination metadata.
5686
+ * @throws AuthenticationError - If the API key is invalid.
5687
+ * @throws ValidationError - If the parameters are invalid.
5688
+ */
5689
+ async search(location, options = {}) {
5690
+ return this.client.request("/v1/realtor/search", {
5691
+ params: {
5692
+ location,
5693
+ market: options.market,
5694
+ status: options.status,
5695
+ price_min: options.priceMin,
5696
+ price_max: options.priceMax,
5697
+ beds_min: options.bedsMin,
5698
+ baths_min: options.bathsMin,
5699
+ sqft_min: options.sqftMin,
5700
+ sqft_max: options.sqftMax,
5701
+ property_type: options.propertyType,
5702
+ sort: options.sort,
5703
+ page: options.page,
5704
+ limit: options.limit,
5705
+ lat_min: options.latMin,
5706
+ lat_max: options.latMax,
5707
+ lng_min: options.lngMin,
5708
+ lng_max: options.lngMax
5709
+ }
5710
+ });
5711
+ }
5712
+ /**
5713
+ * Get location autocomplete suggestions.
5714
+ *
5715
+ * @param query - Partial location query.
5716
+ * @param options - Optional parameters (market, limit).
5717
+ * @returns Autocomplete suggestions.
5718
+ */
5719
+ async autocomplete(query, options = {}) {
5720
+ return this.client.request("/v1/realtor/autocomplete", {
5721
+ params: { query, market: options.market, limit: options.limit }
5722
+ });
5723
+ }
5724
+ };
5725
+
5726
+ // src/realtor/properties.ts
5727
+ var PropertiesClient = class {
5728
+ client;
5729
+ constructor(client) {
5730
+ this.client = client;
5731
+ }
5732
+ /**
5733
+ * Get a single property's full detail.
5734
+ *
5735
+ * @param propertyId - The property id.
5736
+ * @param options - Optional parameters (market).
5737
+ * @returns Property detail including details, amenities, and history.
5738
+ * @throws NotFoundError - If the property doesn't exist.
5739
+ */
5740
+ async getProperty(propertyId, options = {}) {
5741
+ return this.client.request(`/v1/realtor/properties/${propertyId}`, {
5742
+ params: { market: options.market }
5743
+ });
5744
+ }
5745
+ };
5746
+
5747
+ // src/realtor/reference.ts
5748
+ var ReferenceClient7 = class {
5749
+ client;
5750
+ constructor(client) {
5751
+ this.client = client;
5752
+ }
5753
+ /**
5754
+ * Get all supported realtor markets.
5755
+ *
5756
+ * @returns Markets response with all supported markets.
5757
+ */
5758
+ async listMarkets() {
5759
+ return this.client.request("/v1/realtor/markets");
5760
+ }
5761
+ };
5762
+
5763
+ // src/realtor/client.ts
5764
+ var RealtorClient = class {
5765
+ /** Client for property search and location autocomplete */
5766
+ search;
5767
+ /** Client for full property detail */
5768
+ properties;
5769
+ /** Client for reference data (markets) */
5770
+ reference;
5771
+ /**
5772
+ * Create a new Realtor client.
5773
+ *
5774
+ * @param client - The base HTTP client for making requests.
5775
+ */
5776
+ constructor(client) {
5777
+ this.search = new SearchClient9(client);
5778
+ this.properties = new PropertiesClient(client);
5779
+ this.reference = new ReferenceClient7(client);
5780
+ }
5781
+ };
5782
+
5663
5783
  // src/client.ts
5664
5784
  var ScrapeBadger = class {
5665
5785
  baseClient;
@@ -5683,6 +5803,8 @@ var ScrapeBadger = class {
5683
5803
  ebay;
5684
5804
  /** YouTube scraper API client — 39 endpoints */
5685
5805
  youtube;
5806
+ /** Realtor scraper API client — 4 endpoints across 2 markets (us, ca) */
5807
+ realtor;
5686
5808
  /**
5687
5809
  * Create a new ScrapeBadger client.
5688
5810
  *
@@ -5727,6 +5849,7 @@ var ScrapeBadger = class {
5727
5849
  this.tiktok = new TikTokClient(this.baseClient);
5728
5850
  this.ebay = new EbayClient(this.baseClient);
5729
5851
  this.youtube = new YoutubeClient(this.baseClient);
5852
+ this.realtor = new RealtorClient(this.baseClient);
5730
5853
  }
5731
5854
  };
5732
5855
 
@@ -5770,6 +5893,10 @@ exports.InsufficientCreditsError = InsufficientCreditsError;
5770
5893
  exports.ListsClient = ListsClient;
5771
5894
  exports.NotFoundError = NotFoundError;
5772
5895
  exports.RateLimitError = RateLimitError;
5896
+ exports.RealtorClient = RealtorClient;
5897
+ exports.RealtorPropertiesClient = PropertiesClient;
5898
+ exports.RealtorReferenceClient = ReferenceClient7;
5899
+ exports.RealtorSearchClient = SearchClient9;
5773
5900
  exports.RedditClient = RedditClient;
5774
5901
  exports.RedditPostsClient = PostsClient;
5775
5902
  exports.RedditSearchClient = SearchClient3;