scavio 0.36.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
@@ -685,10 +685,10 @@ to `MENARDS_PRODUCT_TIMEOUT` (120s). None ever lowers a longer client timeout.
685
685
 
686
686
  ### [Nordstrom](https://scavio.dev/docs/nordstrom-search?utm_source=npm-scavio-js&utm_medium=package&utm_campaign=readme)
687
687
 
688
- Seven endpoints, nordstrom.com (US site only). `search` and `product` are new in
688
+ Eight endpoints, nordstrom.com (US site only). `search` and `product` are new in
689
689
  0.35.0; `category`, `brand`, `stores`, `availability` and `suggestions` are new
690
- in 0.36.0. `availability` costs 10 credits (the product page plus the store
691
- lookup); every other call costs 5.
690
+ in 0.36.0; `reviews` is new in 0.37.0. `availability` costs 10 credits (the
691
+ product page plus the store lookup) and `reviews` 10; every other call costs 5.
692
692
 
693
693
  - `search`, `category` and `brand` return 24 products a page with current and
694
694
  original price ranges, percent off, on-sale flag, rating, review count,
@@ -703,6 +703,15 @@ lookup); every other call costs 5.
703
703
  as a sku with UPC, price, price type, `in_stock` and the `quantity` available
704
704
  to ship. `in_stock` is true when the sku can be shipped or picked up in a
705
705
  store, so a sku can be in stock with `quantity` 0 (store-only).
706
+ - `reviews` takes `url` or `style_id` and returns the product's full review
707
+ history, up to `max_reviews` per call (1-200, default 60). `sort` is
708
+ `most_helpful` (default), `most_recent`, `highest_rated` or `lowest_rated`;
709
+ filter with `stars` (e.g. `[1, 2]`), `verified_only`, `with_photos` or a text
710
+ `search` (`search` cannot be combined with `sort`). The response carries the
711
+ `summary` (average rating, total reviews, histogram, size and width rating,
712
+ praised and criticized features with a quote, rating-only count), the
713
+ `ai_summary`, `total_results`, `returned` and `has_more`. Rating-only reviews
714
+ are included with `title` and `text` null.
706
715
  - `availability` takes `url` or `style_id` (optionally `sku_id`) and returns per
707
716
  sku `ship_quantity`, `pickup_available`, `pick_quantity` and the stores that
708
717
  can do in-store pickup. Quantities are chain-wide; per store Nordstrom only
@@ -736,12 +745,68 @@ for (const sku of (stock as any).data.skus) {
736
745
 
737
746
  const ideas = await client.nordstrom.suggestions({ query: "nike air" });
738
747
  console.log((ideas as any).data.suggestions);
748
+
749
+ const rev = (await client.nordstrom.reviews({ style_id: "7737947", sort: "most_recent", max_reviews: 100 })) as any;
750
+ const { summary } = rev.data;
751
+ console.log(summary.average_rating, summary.total_reviews, summary.ratings_histogram, summary.size_rating);
752
+ console.log(rev.data.total_results, rev.data.returned, rev.data.has_more, rev.data.ai_summary);
753
+ for (const r of rev.data.reviews.slice(0, 5)) {
754
+ console.log(r.date, r.rating, r.title, r.text, r.size_purchased, r.helpful_votes, r.badges, r.photos.length);
755
+ }
756
+ const critical = await client.nordstrom.reviews({ style_id: "7737947", stars: [1, 2], verified_only: true });
739
757
  ```
740
758
 
741
759
  `product` returns the reviews shown on the product page (up to about 13) plus
742
- the total review count and star histogram; the full review history is not
743
- available. An unknown style id, sku id, category or brand is a 404. Every call
744
- raises the request timeout to `NORDSTROM_TIMEOUT` (120s), never lowering a
760
+ the total review count and star histogram; `reviews` returns the rest. An
761
+ unknown style id, sku id, category or brand is a 404. Every call raises the
762
+ request timeout to `NORDSTROM_TIMEOUT` (120s), except `reviews`, which takes
763
+ 20-60s (up to about 100s at 200 reviews) and raises it to
764
+ `NORDSTROM_REVIEWS_TIMEOUT` (150s). Neither ever lowers a longer client timeout.
765
+ If the upstream page still fails after the API's own retries, the call is an
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
745
810
  longer client timeout.
746
811
 
747
812
  ### [Mercado Libre](https://scavio.dev/docs/mercadolibre-search?utm_source=npm-scavio-js&utm_medium=package&utm_campaign=readme)
package/dist/index.cjs CHANGED
@@ -76,8 +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,
81
+ NORDSTROM_REVIEWS_TIMEOUT: () => NORDSTROM_REVIEWS_TIMEOUT,
79
82
  NORDSTROM_TIMEOUT: () => NORDSTROM_TIMEOUT,
80
83
  NordstromNamespace: () => NordstromNamespace,
84
+ NordstromRackNamespace: () => NordstromRackNamespace,
81
85
  NotFoundError: () => NotFoundError,
82
86
  PETCO_SLOW_TIMEOUT: () => PETCO_SLOW_TIMEOUT,
83
87
  PetcoNamespace: () => PetcoNamespace,
@@ -261,7 +265,7 @@ function parseRetryAfter(header) {
261
265
  var BASE_URL = "https://api.scavio.dev";
262
266
  var DEFAULT_TIMEOUT = 3e4;
263
267
  var DEFAULT_MAX_RETRIES = 2;
264
- var SDK_VERSION = true ? "0.36.0" : "0.0.0";
268
+ var SDK_VERSION = true ? "0.38.0" : "0.0.0";
265
269
  var USER_AGENT = `scavio-js/${SDK_VERSION}`;
266
270
  function isServerRuntime() {
267
271
  const g = globalThis;
@@ -3906,6 +3910,7 @@ var MenardsNamespace = class {
3906
3910
 
3907
3911
  // src/namespaces/nordstrom.ts
3908
3912
  var NORDSTROM_TIMEOUT = 12e4;
3913
+ var NORDSTROM_REVIEWS_TIMEOUT = 15e4;
3909
3914
  var NordstromNamespace = class {
3910
3915
  constructor(client) {
3911
3916
  this.client = client;
@@ -3940,8 +3945,9 @@ var NordstromNamespace = class {
3940
3945
  * a store reads in stock with quantity 0 (availability() lists its pickup
3941
3946
  * stores). Includes the reviews shown on the product page (up to about 13),
3942
3947
  * with the total review count; each review has title, text, rating, size
3943
- * rating, author, date, helpful votes and verified-purchase flag. Pass url
3944
- * or style_id. An unknown style id is a 404.
3948
+ * rating, author, date, helpful votes and verified-purchase flag
3949
+ * (reviews() pages the full review history). Pass url or style_id. An
3950
+ * unknown style id is a 404.
3945
3951
  *
3946
3952
  * Costs 5 credits.
3947
3953
  */
@@ -4018,6 +4024,173 @@ var NordstromNamespace = class {
4018
4024
  async suggestions(options) {
4019
4025
  return this.client._post("/api/v1/nordstrom/suggestions", options, void 0, NORDSTROM_TIMEOUT);
4020
4026
  }
4027
+ /**
4028
+ * Customer reviews of one nordstrom.com (US) product by URL or style id, up
4029
+ * to 200 per call (default 60), sorted most helpful (default), most recent,
4030
+ * highest rated or lowest rated, optionally filtered to star ratings,
4031
+ * verified purchases, reviews with photos, or a text search. Returns the
4032
+ * product's review summary (average rating, total reviews, star histogram,
4033
+ * size rating 1 runs small to 5 runs big, width rating where the site has
4034
+ * one, the most mentioned praised and criticized features with a quote each,
4035
+ * and the count of rating-only reviews), the AI review summary when the site
4036
+ * shows one, the number of reviews matching the filters (total_results),
4037
+ * returned and has_more. Each review has id, title, text, star rating, size
4038
+ * rating, author, date, helpful votes, verified-purchase flag, reviewer
4039
+ * badges (verified_purchaser, top_250, top_1000), size and color purchased,
4040
+ * the reviewer's height, weight, body type and usual sizes when given,
4041
+ * secondary ratings (Size, with its scale), the site it was syndicated from
4042
+ * (e.g. nordstromrack.com) and photos with thumbnails. Rating-only reviews
4043
+ * are included with title and text null. Takes 20-60s, up to about 100s at
4044
+ * max_reviews 200, so the request timeout is raised to
4045
+ * NORDSTROM_REVIEWS_TIMEOUT. A product with no reviews returns an empty
4046
+ * list; an unknown style id is a 404.
4047
+ *
4048
+ * Costs 10 credits.
4049
+ */
4050
+ async reviews(options) {
4051
+ return this.client._post("/api/v1/nordstrom/reviews", options, void 0, NORDSTROM_REVIEWS_TIMEOUT);
4052
+ }
4053
+ };
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
+ }
4021
4194
  };
4022
4195
 
4023
4196
  // src/namespaces/trustpilot.ts
@@ -4553,6 +4726,7 @@ var Scavio = class extends ScavioCore {
4553
4726
  chewy;
4554
4727
  menards;
4555
4728
  nordstrom;
4729
+ nordstromRack;
4556
4730
  trustpilot;
4557
4731
  chatgpt;
4558
4732
  gemini;
@@ -4634,6 +4808,7 @@ var Scavio = class extends ScavioCore {
4634
4808
  this.chewy = new ChewyNamespace(this);
4635
4809
  this.menards = new MenardsNamespace(this);
4636
4810
  this.nordstrom = new NordstromNamespace(this);
4811
+ this.nordstromRack = new NordstromRackNamespace(this);
4637
4812
  this.trustpilot = new TrustpilotNamespace(this);
4638
4813
  this.chatgpt = new ChatgptNamespace(this);
4639
4814
  this.gemini = new GeminiNamespace(this);
@@ -4789,8 +4964,12 @@ async function getSubtle() {
4789
4964
  MetaAdsNamespace,
4790
4965
  MicroCenterNamespace,
4791
4966
  MissingAPIKeyError,
4967
+ NORDSTROM_RACK_REVIEWS_TIMEOUT,
4968
+ NORDSTROM_RACK_TIMEOUT,
4969
+ NORDSTROM_REVIEWS_TIMEOUT,
4792
4970
  NORDSTROM_TIMEOUT,
4793
4971
  NordstromNamespace,
4972
+ NordstromRackNamespace,
4794
4973
  NotFoundError,
4795
4974
  PETCO_SLOW_TIMEOUT,
4796
4975
  PetcoNamespace,