scavio 0.34.1 → 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 +54 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +61 -1
- package/dist/index.d.ts +61 -1
- package/dist/index.js +51 -2
- 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
|
@@ -70,11 +70,14 @@ __export(index_exports, {
|
|
|
70
70
|
LowesNamespace: () => LowesNamespace,
|
|
71
71
|
MAX_REQUESTS_PER_SECOND: () => MAX_REQUESTS_PER_SECOND,
|
|
72
72
|
MENARDS_PRODUCT_TIMEOUT: () => MENARDS_PRODUCT_TIMEOUT,
|
|
73
|
+
MENARDS_SEARCH_TIMEOUT: () => MENARDS_SEARCH_TIMEOUT,
|
|
73
74
|
MenardsNamespace: () => MenardsNamespace,
|
|
74
75
|
MercadoLibreNamespace: () => MercadoLibreNamespace,
|
|
75
76
|
MetaAdsNamespace: () => MetaAdsNamespace,
|
|
76
77
|
MicroCenterNamespace: () => MicroCenterNamespace,
|
|
77
78
|
MissingAPIKeyError: () => MissingAPIKeyError,
|
|
79
|
+
NORDSTROM_TIMEOUT: () => NORDSTROM_TIMEOUT,
|
|
80
|
+
NordstromNamespace: () => NordstromNamespace,
|
|
78
81
|
NotFoundError: () => NotFoundError,
|
|
79
82
|
PETCO_SLOW_TIMEOUT: () => PETCO_SLOW_TIMEOUT,
|
|
80
83
|
PetcoNamespace: () => PetcoNamespace,
|
|
@@ -258,7 +261,7 @@ function parseRetryAfter(header) {
|
|
|
258
261
|
var BASE_URL = "https://api.scavio.dev";
|
|
259
262
|
var DEFAULT_TIMEOUT = 3e4;
|
|
260
263
|
var DEFAULT_MAX_RETRIES = 2;
|
|
261
|
-
var SDK_VERSION = true ? "0.
|
|
264
|
+
var SDK_VERSION = true ? "0.35.0" : "0.0.0";
|
|
262
265
|
var USER_AGENT = `scavio-js/${SDK_VERSION}`;
|
|
263
266
|
function isServerRuntime() {
|
|
264
267
|
const g = globalThis;
|
|
@@ -3857,6 +3860,7 @@ var ChewyNamespace = class {
|
|
|
3857
3860
|
|
|
3858
3861
|
// src/namespaces/menards.ts
|
|
3859
3862
|
var MENARDS_PRODUCT_TIMEOUT = 12e4;
|
|
3863
|
+
var MENARDS_SEARCH_TIMEOUT = 6e4;
|
|
3860
3864
|
var MenardsNamespace = class {
|
|
3861
3865
|
constructor(client) {
|
|
3862
3866
|
this.client = client;
|
|
@@ -3872,7 +3876,7 @@ var MenardsNamespace = class {
|
|
|
3872
3876
|
* Costs 2 credits.
|
|
3873
3877
|
*/
|
|
3874
3878
|
async search(options) {
|
|
3875
|
-
return this.client._post("/api/v1/menards/search", options);
|
|
3879
|
+
return this.client._post("/api/v1/menards/search", options, void 0, MENARDS_SEARCH_TIMEOUT);
|
|
3876
3880
|
}
|
|
3877
3881
|
/**
|
|
3878
3882
|
* One Menards product by item id or URL: name, brand, model number, SKU,
|
|
@@ -3900,6 +3904,49 @@ var MenardsNamespace = class {
|
|
|
3900
3904
|
}
|
|
3901
3905
|
};
|
|
3902
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
|
+
|
|
3903
3950
|
// src/namespaces/trustpilot.ts
|
|
3904
3951
|
var TrustpilotNamespace = class {
|
|
3905
3952
|
constructor(client) {
|
|
@@ -4432,6 +4479,7 @@ var Scavio = class extends ScavioCore {
|
|
|
4432
4479
|
iherb;
|
|
4433
4480
|
chewy;
|
|
4434
4481
|
menards;
|
|
4482
|
+
nordstrom;
|
|
4435
4483
|
trustpilot;
|
|
4436
4484
|
chatgpt;
|
|
4437
4485
|
gemini;
|
|
@@ -4512,6 +4560,7 @@ var Scavio = class extends ScavioCore {
|
|
|
4512
4560
|
this.iherb = new IherbNamespace(this);
|
|
4513
4561
|
this.chewy = new ChewyNamespace(this);
|
|
4514
4562
|
this.menards = new MenardsNamespace(this);
|
|
4563
|
+
this.nordstrom = new NordstromNamespace(this);
|
|
4515
4564
|
this.trustpilot = new TrustpilotNamespace(this);
|
|
4516
4565
|
this.chatgpt = new ChatgptNamespace(this);
|
|
4517
4566
|
this.gemini = new GeminiNamespace(this);
|
|
@@ -4661,11 +4710,14 @@ async function getSubtle() {
|
|
|
4661
4710
|
LowesNamespace,
|
|
4662
4711
|
MAX_REQUESTS_PER_SECOND,
|
|
4663
4712
|
MENARDS_PRODUCT_TIMEOUT,
|
|
4713
|
+
MENARDS_SEARCH_TIMEOUT,
|
|
4664
4714
|
MenardsNamespace,
|
|
4665
4715
|
MercadoLibreNamespace,
|
|
4666
4716
|
MetaAdsNamespace,
|
|
4667
4717
|
MicroCenterNamespace,
|
|
4668
4718
|
MissingAPIKeyError,
|
|
4719
|
+
NORDSTROM_TIMEOUT,
|
|
4720
|
+
NordstromNamespace,
|
|
4669
4721
|
NotFoundError,
|
|
4670
4722
|
PETCO_SLOW_TIMEOUT,
|
|
4671
4723
|
PetcoNamespace,
|