scavio 0.37.0 → 0.38.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  # Scavio
2
2
 
3
3
  TypeScript SDK for the [Scavio API](https://scavio.dev?utm_source=npm-scavio-js&utm_medium=package&utm_campaign=readme) — real-time structured web
4
- data across 60 platforms on one API key, plus `extract()` to read
4
+ data across 61 platforms on one API key, plus `extract()` to read
5
5
  any URL as clean Markdown, and `extract.map()` / `extract.crawl()` /
6
6
  `extract.batch()` to map, crawl and batch-extract whole websites.
7
7
 
@@ -9,7 +9,7 @@ Structured JSON in, structured JSON out. No per-site parsers to maintain.
9
9
 
10
10
  - **Search and SERP** — Google (organic, news, maps, shopping, flights, hotels, trends, AI Mode)
11
11
  - **AI assistants** — ChatGPT and Gemini answers with the sources they cite and the products they recommend
12
- - **E-commerce** — Amazon, Walmart, Costco, Lowe's, Sam's Club, Canadian Tire, Dollar General, Sephora, Ulta Beauty, ALDI, Micro Center, Walgreens, CVS, Whole Foods, Harbor Freight, PetSmart, Petco, iHerb, Chewy, Menards, Nordstrom, Mercado Libre, eBay, Target, Home Depot, TikTok Shop
12
+ - **E-commerce** — Amazon, Walmart, Costco, Lowe's, Sam's Club, Canadian Tire, Dollar General, Sephora, Ulta Beauty, ALDI, Micro Center, Walgreens, CVS, Whole Foods, Harbor Freight, PetSmart, Petco, iHerb, Chewy, Menards, Nordstrom, Nordstrom Rack, Mercado Libre, eBay, Target, Home Depot, TikTok Shop
13
13
  - **Real estate and travel** — Zillow, Redfin, Realtor.com, Rightmove, Booking, Airbnb, Tripadvisor
14
14
  - **Reviews and local** — Trustpilot, Yelp, G2, Capterra, Glassdoor, App Store, Google Play
15
15
  - **Jobs and companies** — Indeed, Glassdoor, SEC EDGAR, Companies House
@@ -763,7 +763,51 @@ request timeout to `NORDSTROM_TIMEOUT` (120s), except `reviews`, which takes
763
763
  20-60s (up to about 100s at 200 reviews) and raises it to
764
764
  `NORDSTROM_REVIEWS_TIMEOUT` (150s). Neither ever lowers a longer client timeout.
765
765
  If the upstream page still fails after the API's own retries, the call is an
766
- unbilled 502.
766
+ unbilled 502. For nordstromrack.com use `client.nordstromRack` (next section).
767
+
768
+ ### [Nordstrom Rack](https://scavio.dev/docs/nordstromrack-search?utm_source=npm-scavio-js&utm_medium=package&utm_campaign=readme)
769
+
770
+ Eight endpoints, new in 0.38.0, nordstromrack.com (US site only), on
771
+ `client.nordstromRack`: a separate platform from `client.nordstrom` with the
772
+ same methods, options and credit costs (`availability` and `reviews` 10, the
773
+ rest 5).
774
+
775
+ - `category` takes Rack's `/shop` and `/clearance` paths: departments, deals,
776
+ new arrivals, Clear the Rack (`/clearance`, `/clearance/women/clothing`) and
777
+ flash events (`/shop/flash` lists the live events as subcategories,
778
+ `/shop/flash/event-7` opens one). There is no `/browse` on Rack.
779
+ - `brand` takes `/brands/<slug>` (`/brands/adidas`); Rack brand pages carry no
780
+ id, so the nordstrom.com `--<id>` form is a 404.
781
+ - Every product row carries `clearance_price_range`, and during Clear the Rack
782
+ a clearance item can carry an extra percent off on top:
783
+ `promotion_price_range` is the price after it and `promotion_percent_off`
784
+ the extra percent. All three are null when not set; no response carries
785
+ event start or end dates.
786
+ - `stores` and `availability` cover Rack stores only; pickup quantities are
787
+ chain-wide.
788
+ - `reviews` returns Rack's own review pool, separate from nordstrom.com's, so
789
+ the same style can show a different rating and review count on each.
790
+
791
+ ```ts
792
+ const clr = (await client.nordstromRack.category({ category: "/clearance/women", sort: "percent_off" })) as any;
793
+ for (const p of clr.data.products.slice(0, 5)) {
794
+ console.log(p.style_id, p.name, p.price, p.clearance_price_range, p.promotion_price_range, p.promotion_percent_off);
795
+ }
796
+
797
+ const events = (await client.nordstromRack.category({ category: "/shop/flash" })) as any;
798
+ console.log(events.data.category.subcategories.map((e: any) => e.path));
799
+
800
+ const item = await client.nordstromRack.product({ style_id: "8816500" });
801
+ const brand = await client.nordstromRack.brand({ brand: "/brands/adidas" });
802
+ const stock = await client.nordstromRack.availability({ style_id: "7737947" });
803
+ const near = await client.nordstromRack.stores({ zip: "10001" });
804
+ const rev = await client.nordstromRack.reviews({ style_id: "7737947", max_reviews: 50 });
805
+ ```
806
+
807
+ Every call raises the request timeout to `NORDSTROM_RACK_TIMEOUT` (120s),
808
+ except `reviews`, which takes 15-60s (up to about 100s at 200 reviews) and
809
+ raises it to `NORDSTROM_RACK_REVIEWS_TIMEOUT` (150s). Neither ever lowers a
810
+ longer client timeout.
767
811
 
768
812
  ### [Mercado Libre](https://scavio.dev/docs/mercadolibre-search?utm_source=npm-scavio-js&utm_medium=package&utm_campaign=readme)
769
813
 
package/dist/index.cjs CHANGED
@@ -76,9 +76,12 @@ __export(index_exports, {
76
76
  MetaAdsNamespace: () => MetaAdsNamespace,
77
77
  MicroCenterNamespace: () => MicroCenterNamespace,
78
78
  MissingAPIKeyError: () => MissingAPIKeyError,
79
+ NORDSTROM_RACK_REVIEWS_TIMEOUT: () => NORDSTROM_RACK_REVIEWS_TIMEOUT,
80
+ NORDSTROM_RACK_TIMEOUT: () => NORDSTROM_RACK_TIMEOUT,
79
81
  NORDSTROM_REVIEWS_TIMEOUT: () => NORDSTROM_REVIEWS_TIMEOUT,
80
82
  NORDSTROM_TIMEOUT: () => NORDSTROM_TIMEOUT,
81
83
  NordstromNamespace: () => NordstromNamespace,
84
+ NordstromRackNamespace: () => NordstromRackNamespace,
82
85
  NotFoundError: () => NotFoundError,
83
86
  PETCO_SLOW_TIMEOUT: () => PETCO_SLOW_TIMEOUT,
84
87
  PetcoNamespace: () => PetcoNamespace,
@@ -262,7 +265,7 @@ function parseRetryAfter(header) {
262
265
  var BASE_URL = "https://api.scavio.dev";
263
266
  var DEFAULT_TIMEOUT = 3e4;
264
267
  var DEFAULT_MAX_RETRIES = 2;
265
- var SDK_VERSION = true ? "0.37.0" : "0.0.0";
268
+ var SDK_VERSION = true ? "0.38.0" : "0.0.0";
266
269
  var USER_AGENT = `scavio-js/${SDK_VERSION}`;
267
270
  function isServerRuntime() {
268
271
  const g = globalThis;
@@ -4049,6 +4052,147 @@ var NordstromNamespace = class {
4049
4052
  }
4050
4053
  };
4051
4054
 
4055
+ // src/namespaces/nordstrom-rack.ts
4056
+ var NORDSTROM_RACK_TIMEOUT = 12e4;
4057
+ var NORDSTROM_RACK_REVIEWS_TIMEOUT = 15e4;
4058
+ var NordstromRackNamespace = class {
4059
+ constructor(client) {
4060
+ this.client = client;
4061
+ }
4062
+ client;
4063
+ /**
4064
+ * Search nordstromrack.com (US) products, 24 per page, sorted by relevance,
4065
+ * rating, price, newest or percent off. Each result has style id, URL,
4066
+ * name, brand, image, current price and price range in dollars, the
4067
+ * compare-at price range Rack strikes through (original_price_range),
4068
+ * percent off and on-sale flag, the clearance price range, any promotion on
4069
+ * top (promotion_price_range, and promotion_percent_off: the extra percent
4070
+ * off the clearance price during Clear the Rack, otherwise off Rack's
4071
+ * regular price), rating, review count (Rack's own reviews), badges such as
4072
+ * new_markdown or final_sale, a low-inventory flag, marketplace seller and
4073
+ * every color. Also returns the total result count and page count. Use a
4074
+ * result's url or style_id with product().
4075
+ *
4076
+ * Costs 5 credits.
4077
+ */
4078
+ async search(options) {
4079
+ return this.client._post("/api/v1/nordstromrack/search", options, void 0, NORDSTROM_RACK_TIMEOUT);
4080
+ }
4081
+ /**
4082
+ * One nordstromrack.com (US) product by URL or style id: name, brand, brand
4083
+ * page URL, description, feature bullets, fit notes, final-sale flag,
4084
+ * current, compare-at and clearance price ranges, percent off, any promotion
4085
+ * on top (promotion_price_range and promotion_percent_off, e.g. Clear the
4086
+ * Rack's extra 25% off clearance), rating, review count, the star
4087
+ * histogram, the size-fit distribution, the AI review summary when the site
4088
+ * shows one, praised and criticized features, breadcrumbs and images. Every
4089
+ * color lists every size as a sku with sku id, size, UPC, price, compare-at
4090
+ * price, percent off, price type (regular, clearance, promotion), in_stock
4091
+ * and the quantity available to ship. Includes the reviews shown on the
4092
+ * product page (up to about 13), with the total review count (reviews()
4093
+ * pages the full history). Ratings and reviews are Rack's own, separate
4094
+ * from nordstrom.com's. Pass url or style_id. An unknown style id is a 404.
4095
+ *
4096
+ * Costs 5 credits.
4097
+ */
4098
+ async product(options) {
4099
+ return this.client._post("/api/v1/nordstromrack/product", options, void 0, NORDSTROM_RACK_TIMEOUT);
4100
+ }
4101
+ /**
4102
+ * Browse a nordstromrack.com (US) category page, 24 products per page,
4103
+ * sorted by relevance, rating, price, newest or percent off. Works on every
4104
+ * /shop and /clearance listing: departments (/shop/women), deals
4105
+ * (/shop/deals/black-friday), new arrivals (/shop/new-arrivals), Clear the
4106
+ * Rack (/clearance, /clearance/women/clothing) and flash events: /shop/flash
4107
+ * lists the live events as subcategories (it has no products of its own),
4108
+ * and each event (/shop/flash/event-7) is a listing whose first page shows
4109
+ * the event's featured products first. Returns the category's name, page
4110
+ * title, path, URL, breadcrumbs and subcategories, products with the same
4111
+ * fields as a search result, the total result count, page count and the
4112
+ * filter sidebar with option counts. An unknown category is a 404.
4113
+ *
4114
+ * Costs 5 credits.
4115
+ */
4116
+ async category(options) {
4117
+ return this.client._post("/api/v1/nordstromrack/category", options, void 0, NORDSTROM_RACK_TIMEOUT);
4118
+ }
4119
+ /**
4120
+ * List a brand's products on nordstromrack.com (US) from its brand page
4121
+ * (/brands/adidas), 24 per page, sorted by relevance, rating, price, newest
4122
+ * or percent off. Returns the brand's name, path, URL and breadcrumbs,
4123
+ * products with the same fields as a search result, the total result count,
4124
+ * page count and the filter sidebar with option counts. An unknown brand is
4125
+ * a 404.
4126
+ *
4127
+ * Costs 5 credits.
4128
+ */
4129
+ async brand(options) {
4130
+ return this.client._post("/api/v1/nordstromrack/brand", options, void 0, NORDSTROM_RACK_TIMEOUT);
4131
+ }
4132
+ /**
4133
+ * Find Nordstrom Rack stores near a US ZIP code or latitude/longitude
4134
+ * within up to 100 miles, nearest first, or look Rack stores up by store
4135
+ * number. Each store has store number, name, type (rack), address, phone,
4136
+ * weekly hours, holiday hours when posted, open and close times for the
4137
+ * next 8 days, time zone, distance in miles, coordinates, whether it offers
4138
+ * buy-online pickup and curbside pickup, its amenities and its store page
4139
+ * URL. A ZIP with no store in range returns an empty list.
4140
+ *
4141
+ * Costs 5 credits.
4142
+ */
4143
+ async stores(options) {
4144
+ return this.client._post("/api/v1/nordstromrack/stores", options, void 0, NORDSTROM_RACK_TIMEOUT);
4145
+ }
4146
+ /**
4147
+ * Online and Rack store-pickup availability for every size and color of
4148
+ * one nordstromrack.com (US) product, by URL or style id, optionally one
4149
+ * sku. Each sku has sku id, size, color, UPC, in_stock, whether it ships
4150
+ * and the quantity available to ship, the quantity available for pickup,
4151
+ * and the Rack stores where it can be picked up (store number, name,
4152
+ * address, city, state, ZIP, phone). Quantities are chain-wide: per store
4153
+ * the site only says whether pickup is available, not how many. An unknown
4154
+ * style id or sku id is a 404.
4155
+ *
4156
+ * Costs 10 credits (the product page plus the store lookup).
4157
+ */
4158
+ async availability(options) {
4159
+ return this.client._post("/api/v1/nordstromrack/availability", options, void 0, NORDSTROM_RACK_TIMEOUT);
4160
+ }
4161
+ /**
4162
+ * The search-box autocomplete of nordstromrack.com: the queries Nordstrom
4163
+ * Rack suggests for a partial search term, most likely first. Useful for
4164
+ * keyword research and for building queries for search().
4165
+ *
4166
+ * Costs 5 credits.
4167
+ */
4168
+ async suggestions(options) {
4169
+ return this.client._post("/api/v1/nordstromrack/suggestions", options, void 0, NORDSTROM_RACK_TIMEOUT);
4170
+ }
4171
+ /**
4172
+ * Customer reviews of one nordstromrack.com (US) product by URL or style
4173
+ * id, up to 200 per call (default 60), sorted most helpful (default), most
4174
+ * recent, highest rated or lowest rated, optionally filtered to star
4175
+ * ratings, verified purchases, reviews with photos, or a text search. Rack
4176
+ * has its own review pool, separate from nordstrom.com's. Returns the review
4177
+ * summary (average rating, total reviews, star histogram, size and width
4178
+ * rating, praised and criticized features, rating-only count), the AI
4179
+ * review summary when the site shows one, total_results, returned and
4180
+ * has_more. Each review has id, title, text, star rating, size rating,
4181
+ * author, date, helpful votes, verified-purchase flag, reviewer badges,
4182
+ * size and color purchased, reviewer body details when given, secondary
4183
+ * ratings, the site it was syndicated from and photos. Rating-only reviews
4184
+ * are included with title and text null. Takes 15-60s, up to about 100s at
4185
+ * max_reviews 200, so the request timeout is raised to
4186
+ * NORDSTROM_RACK_REVIEWS_TIMEOUT. A product with no reviews returns an
4187
+ * empty list; an unknown style id is a 404.
4188
+ *
4189
+ * Costs 10 credits.
4190
+ */
4191
+ async reviews(options) {
4192
+ return this.client._post("/api/v1/nordstromrack/reviews", options, void 0, NORDSTROM_RACK_REVIEWS_TIMEOUT);
4193
+ }
4194
+ };
4195
+
4052
4196
  // src/namespaces/trustpilot.ts
4053
4197
  var TrustpilotNamespace = class {
4054
4198
  constructor(client) {
@@ -4582,6 +4726,7 @@ var Scavio = class extends ScavioCore {
4582
4726
  chewy;
4583
4727
  menards;
4584
4728
  nordstrom;
4729
+ nordstromRack;
4585
4730
  trustpilot;
4586
4731
  chatgpt;
4587
4732
  gemini;
@@ -4663,6 +4808,7 @@ var Scavio = class extends ScavioCore {
4663
4808
  this.chewy = new ChewyNamespace(this);
4664
4809
  this.menards = new MenardsNamespace(this);
4665
4810
  this.nordstrom = new NordstromNamespace(this);
4811
+ this.nordstromRack = new NordstromRackNamespace(this);
4666
4812
  this.trustpilot = new TrustpilotNamespace(this);
4667
4813
  this.chatgpt = new ChatgptNamespace(this);
4668
4814
  this.gemini = new GeminiNamespace(this);
@@ -4818,9 +4964,12 @@ async function getSubtle() {
4818
4964
  MetaAdsNamespace,
4819
4965
  MicroCenterNamespace,
4820
4966
  MissingAPIKeyError,
4967
+ NORDSTROM_RACK_REVIEWS_TIMEOUT,
4968
+ NORDSTROM_RACK_TIMEOUT,
4821
4969
  NORDSTROM_REVIEWS_TIMEOUT,
4822
4970
  NORDSTROM_TIMEOUT,
4823
4971
  NordstromNamespace,
4972
+ NordstromRackNamespace,
4824
4973
  NotFoundError,
4825
4974
  PETCO_SLOW_TIMEOUT,
4826
4975
  PetcoNamespace,