scrapebadger 0.15.3 → 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
@@ -5670,6 +5670,116 @@ var YoutubeClient = class {
5670
5670
  }
5671
5671
  };
5672
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
+
5673
5783
  // src/client.ts
5674
5784
  var ScrapeBadger = class {
5675
5785
  baseClient;
@@ -5693,6 +5803,8 @@ var ScrapeBadger = class {
5693
5803
  ebay;
5694
5804
  /** YouTube scraper API client — 39 endpoints */
5695
5805
  youtube;
5806
+ /** Realtor scraper API client — 4 endpoints across 2 markets (us, ca) */
5807
+ realtor;
5696
5808
  /**
5697
5809
  * Create a new ScrapeBadger client.
5698
5810
  *
@@ -5737,6 +5849,7 @@ var ScrapeBadger = class {
5737
5849
  this.tiktok = new TikTokClient(this.baseClient);
5738
5850
  this.ebay = new EbayClient(this.baseClient);
5739
5851
  this.youtube = new YoutubeClient(this.baseClient);
5852
+ this.realtor = new RealtorClient(this.baseClient);
5740
5853
  }
5741
5854
  };
5742
5855
 
@@ -5780,6 +5893,10 @@ exports.InsufficientCreditsError = InsufficientCreditsError;
5780
5893
  exports.ListsClient = ListsClient;
5781
5894
  exports.NotFoundError = NotFoundError;
5782
5895
  exports.RateLimitError = RateLimitError;
5896
+ exports.RealtorClient = RealtorClient;
5897
+ exports.RealtorPropertiesClient = PropertiesClient;
5898
+ exports.RealtorReferenceClient = ReferenceClient7;
5899
+ exports.RealtorSearchClient = SearchClient9;
5783
5900
  exports.RedditClient = RedditClient;
5784
5901
  exports.RedditPostsClient = PostsClient;
5785
5902
  exports.RedditSearchClient = SearchClient3;