scavio 0.34.2 → 0.35.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 +28 -2
- package/dist/index.cjs +50 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +56 -1
- package/dist/index.d.ts +56 -1
- package/dist/index.js +48 -1
- package/dist/index.js.map +1 -1
- package/package.json +3 -2
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
|
|
4
|
+
data across 60 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, 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, 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
|
|
@@ -683,6 +683,32 @@ and `product` can take 10-25 seconds, so they raise it to `IHERB_SLOW_TIMEOUT`
|
|
|
683
683
|
(120s); Menards `product` with a store can take 10-40 seconds, so it raises it
|
|
684
684
|
to `MENARDS_PRODUCT_TIMEOUT` (120s). None ever lowers a longer client timeout.
|
|
685
685
|
|
|
686
|
+
### [Nordstrom](https://scavio.dev/docs/nordstrom-search?utm_source=npm-scavio-js&utm_medium=package&utm_campaign=readme)
|
|
687
|
+
|
|
688
|
+
Two endpoints, new in 0.35.0, 5 credits each. nordstrom.com (US site only).
|
|
689
|
+
`search` returns 24 products a page with current and original price ranges,
|
|
690
|
+
percent off, on-sale flag, rating, review count, badges and colors; `sort` is
|
|
691
|
+
`relevance` (default), `rating`, `price_high`, `price_low`, `newest` or
|
|
692
|
+
`percent_off`. `product` takes a result's `url` or `style_id` and lists every
|
|
693
|
+
color and size as a sku with UPC, price, price type, `in_stock` and the
|
|
694
|
+
`quantity` available to ship online.
|
|
695
|
+
|
|
696
|
+
```ts
|
|
697
|
+
const found = await client.nordstrom.search({ query: "dress", sort: "percent_off" });
|
|
698
|
+
const top = (found as any).data.products[0];
|
|
699
|
+
console.log(top.style_id, top.brand, top.name, top.price, top.percent_off);
|
|
700
|
+
|
|
701
|
+
const item = await client.nordstrom.product({ style_id: top.style_id });
|
|
702
|
+
for (const color of (item as any).data.colors) {
|
|
703
|
+
for (const sku of color.skus) console.log(color.name, sku.size, sku.upc, sku.price, sku.price_type, sku.quantity);
|
|
704
|
+
}
|
|
705
|
+
```
|
|
706
|
+
|
|
707
|
+
Reviews are the 12-13 shown on the product page, with no deeper paging. There
|
|
708
|
+
is no store locator, store-level stock or category endpoint. An unknown style
|
|
709
|
+
id is a 404. Both calls raise the request timeout to `NORDSTROM_TIMEOUT`
|
|
710
|
+
(120s), never lowering a longer client timeout.
|
|
711
|
+
|
|
686
712
|
### [Mercado Libre](https://scavio.dev/docs/mercadolibre-search?utm_source=npm-scavio-js&utm_medium=package&utm_campaign=readme)
|
|
687
713
|
|
|
688
714
|
Five endpoints, new in 0.21.0: `reviews` costs 1 credit, the other four 2. The
|
package/dist/index.cjs
CHANGED
|
@@ -76,6 +76,8 @@ __export(index_exports, {
|
|
|
76
76
|
MetaAdsNamespace: () => MetaAdsNamespace,
|
|
77
77
|
MicroCenterNamespace: () => MicroCenterNamespace,
|
|
78
78
|
MissingAPIKeyError: () => MissingAPIKeyError,
|
|
79
|
+
NORDSTROM_TIMEOUT: () => NORDSTROM_TIMEOUT,
|
|
80
|
+
NordstromNamespace: () => NordstromNamespace,
|
|
79
81
|
NotFoundError: () => NotFoundError,
|
|
80
82
|
PETCO_SLOW_TIMEOUT: () => PETCO_SLOW_TIMEOUT,
|
|
81
83
|
PetcoNamespace: () => PetcoNamespace,
|
|
@@ -259,7 +261,7 @@ function parseRetryAfter(header) {
|
|
|
259
261
|
var BASE_URL = "https://api.scavio.dev";
|
|
260
262
|
var DEFAULT_TIMEOUT = 3e4;
|
|
261
263
|
var DEFAULT_MAX_RETRIES = 2;
|
|
262
|
-
var SDK_VERSION = true ? "0.
|
|
264
|
+
var SDK_VERSION = true ? "0.35.0" : "0.0.0";
|
|
263
265
|
var USER_AGENT = `scavio-js/${SDK_VERSION}`;
|
|
264
266
|
function isServerRuntime() {
|
|
265
267
|
const g = globalThis;
|
|
@@ -3902,6 +3904,49 @@ var MenardsNamespace = class {
|
|
|
3902
3904
|
}
|
|
3903
3905
|
};
|
|
3904
3906
|
|
|
3907
|
+
// src/namespaces/nordstrom.ts
|
|
3908
|
+
var NORDSTROM_TIMEOUT = 12e4;
|
|
3909
|
+
var NordstromNamespace = class {
|
|
3910
|
+
constructor(client) {
|
|
3911
|
+
this.client = client;
|
|
3912
|
+
}
|
|
3913
|
+
client;
|
|
3914
|
+
/**
|
|
3915
|
+
* Search nordstrom.com (US) products, 24 per page, sorted by relevance,
|
|
3916
|
+
* rating, price, newest or percent off. Each result has style id, URL,
|
|
3917
|
+
* name, brand, image, current price and price range in dollars, original
|
|
3918
|
+
* price range, percent off and on-sale flag, rating, review count, badges
|
|
3919
|
+
* such as new or new_markdown, a low-inventory flag, whether it is sold by a
|
|
3920
|
+
* marketplace seller (and the seller's name), and every color with its color
|
|
3921
|
+
* family and image. Also returns the total result count and page count. Use
|
|
3922
|
+
* a result's url or style_id with product().
|
|
3923
|
+
*
|
|
3924
|
+
* Costs 5 credits.
|
|
3925
|
+
*/
|
|
3926
|
+
async search(options) {
|
|
3927
|
+
return this.client._post("/api/v1/nordstrom/search", options, void 0, NORDSTROM_TIMEOUT);
|
|
3928
|
+
}
|
|
3929
|
+
/**
|
|
3930
|
+
* One nordstrom.com (US) product by URL or style id: name, brand,
|
|
3931
|
+
* description, feature bullets, fit notes, final-sale flag, current,
|
|
3932
|
+
* original and clearance price ranges, percent off, rating, review count,
|
|
3933
|
+
* the star histogram, the size-fit distribution (too small to too big), the
|
|
3934
|
+
* AI review summary when the site shows one, the most mentioned praised and
|
|
3935
|
+
* criticized features with a quote each, breadcrumbs and images. Every color
|
|
3936
|
+
* lists its images and every size as a sku with sku id, size, size type,
|
|
3937
|
+
* UPC, price, original price, percent off, price type (regular, clearance,
|
|
3938
|
+
* promotion), in_stock and the quantity available to ship. Includes the
|
|
3939
|
+
* 12-13 reviews shown on the product page, with title, text, rating, size
|
|
3940
|
+
* rating, author, date, helpful votes and verified-purchase flag. Pass url
|
|
3941
|
+
* or style_id. An unknown style id is a 404.
|
|
3942
|
+
*
|
|
3943
|
+
* Costs 5 credits.
|
|
3944
|
+
*/
|
|
3945
|
+
async product(options) {
|
|
3946
|
+
return this.client._post("/api/v1/nordstrom/product", options, void 0, NORDSTROM_TIMEOUT);
|
|
3947
|
+
}
|
|
3948
|
+
};
|
|
3949
|
+
|
|
3905
3950
|
// src/namespaces/trustpilot.ts
|
|
3906
3951
|
var TrustpilotNamespace = class {
|
|
3907
3952
|
constructor(client) {
|
|
@@ -4434,6 +4479,7 @@ var Scavio = class extends ScavioCore {
|
|
|
4434
4479
|
iherb;
|
|
4435
4480
|
chewy;
|
|
4436
4481
|
menards;
|
|
4482
|
+
nordstrom;
|
|
4437
4483
|
trustpilot;
|
|
4438
4484
|
chatgpt;
|
|
4439
4485
|
gemini;
|
|
@@ -4514,6 +4560,7 @@ var Scavio = class extends ScavioCore {
|
|
|
4514
4560
|
this.iherb = new IherbNamespace(this);
|
|
4515
4561
|
this.chewy = new ChewyNamespace(this);
|
|
4516
4562
|
this.menards = new MenardsNamespace(this);
|
|
4563
|
+
this.nordstrom = new NordstromNamespace(this);
|
|
4517
4564
|
this.trustpilot = new TrustpilotNamespace(this);
|
|
4518
4565
|
this.chatgpt = new ChatgptNamespace(this);
|
|
4519
4566
|
this.gemini = new GeminiNamespace(this);
|
|
@@ -4669,6 +4716,8 @@ async function getSubtle() {
|
|
|
4669
4716
|
MetaAdsNamespace,
|
|
4670
4717
|
MicroCenterNamespace,
|
|
4671
4718
|
MissingAPIKeyError,
|
|
4719
|
+
NORDSTROM_TIMEOUT,
|
|
4720
|
+
NordstromNamespace,
|
|
4672
4721
|
NotFoundError,
|
|
4673
4722
|
PETCO_SLOW_TIMEOUT,
|
|
4674
4723
|
PetcoNamespace,
|