scavio 0.32.1 → 0.34.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 +82 -5
- package/dist/index.cjs +488 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +742 -4
- package/dist/index.d.ts +742 -4
- package/dist/index.js +478 -1
- package/dist/index.js.map +1 -1
- package/package.json +9 -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 59 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, 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, 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
|
|
@@ -252,9 +252,9 @@ await client.google.search({
|
|
|
252
252
|
device: "desktop", // optional
|
|
253
253
|
});
|
|
254
254
|
|
|
255
|
-
//
|
|
256
|
-
//
|
|
257
|
-
//
|
|
255
|
+
// Local rank tracking: web_only returns Google's Web results (organic only,
|
|
256
|
+
// ranked for location). The standard page localizes only the local pack; call
|
|
257
|
+
// again without web_only when you also need local_results.
|
|
258
258
|
await client.google.search({
|
|
259
259
|
query: "emergency plumber",
|
|
260
260
|
location: "Austin,Texas,United States",
|
|
@@ -606,6 +606,83 @@ Sephora, Ulta Beauty, ALDI and CVS calls cost 1 credit each. Micro Center
|
|
|
606
606
|
raises the request timeout to `CVS_PRODUCT_TIMEOUT` (120s) when the client's is
|
|
607
607
|
shorter; it never lowers it.
|
|
608
608
|
|
|
609
|
+
### Whole Foods, Harbor Freight, PetSmart, Petco, iHerb, Chewy and Menards
|
|
610
|
+
|
|
611
|
+
Seven US retailers, new in 0.33.0. Store-level prices or stock take a store
|
|
612
|
+
number from that retailer's locator (`wholeFoods.stores`,
|
|
613
|
+
`harborFreight.stores`, `petsmart.stores`, `petco.stores`, `menards.stores`);
|
|
614
|
+
iHerb and Chewy are online only.
|
|
615
|
+
|
|
616
|
+
```typescript
|
|
617
|
+
// Whole Foods: prices are per store (5-digit store_id, default 10145 Austin):
|
|
618
|
+
// regular_price, sale_price and prime_price. No ratings, reviews, UPCs or
|
|
619
|
+
// per-store unit stock. search() sorts by relevance, price_asc or price_desc.
|
|
620
|
+
const wf = await client.wholeFoods.stores({ zip: "10019" });
|
|
621
|
+
const wfStore = (wf.data as any).stores[0].store_id; // "10160"
|
|
622
|
+
await client.wholeFoods.search({ query: "milk", store_id: wfStore, on_sale: true });
|
|
623
|
+
await client.wholeFoods.category({ category: "cheese", store_id: wfStore, sort: "popular" });
|
|
624
|
+
await client.wholeFoods.deals({ store_id: wfStore });
|
|
625
|
+
await client.wholeFoods.product({ asin: "B078WVT2BC", store_id: wfStore }); // in_store and online prices, separately
|
|
626
|
+
await client.wholeFoods.store({ store_id: wfStore });
|
|
627
|
+
await client.wholeFoods.salesFlyer({ store_id: wfStore });
|
|
628
|
+
|
|
629
|
+
// Harbor Freight: national prices with sale and end date, public coupon,
|
|
630
|
+
// Inside Track member price and compare_at. availability() is a stock status
|
|
631
|
+
// per store (in_stock, limited, out_of_stock, not_carried) plus aisle, from
|
|
632
|
+
// a daily snapshot - no unit counts.
|
|
633
|
+
await client.harborFreight.search({ query: "cordless drill", sort: "member_price_low" });
|
|
634
|
+
await client.harborFreight.clearance({ query: "drill" });
|
|
635
|
+
await client.harborFreight.product({ sku: "73216" });
|
|
636
|
+
await client.harborFreight.prices({ skus: ["73216", "59716", "64508"] }); // up to 50
|
|
637
|
+
await client.harborFreight.stores({ query: "60601" });
|
|
638
|
+
await client.harborFreight.availability({ skus: ["73216"], zip: "90012" });
|
|
639
|
+
await client.harborFreight.reviews({ sku: "73216", limit: 10 });
|
|
640
|
+
|
|
641
|
+
// PetSmart: national price plus Autoship first-order and recurring price;
|
|
642
|
+
// stock is a unit count per store.
|
|
643
|
+
await client.petsmart.search({ query: "dog food", store_id: "1658" }); // in stock at that store only
|
|
644
|
+
await client.petsmart.product({ web_style_id: "36648" });
|
|
645
|
+
await client.petsmart.stores({ zip: "60601", sku: "5252900" }); // + quantity per store
|
|
646
|
+
await client.petsmart.storeStock({ store_id: "1658", skus: ["5252900"] });
|
|
647
|
+
await client.petsmart.availability({ pairs: [{ store_id: "1658", sku: "5252900" }] });
|
|
648
|
+
await client.petsmart.deals({ pet: "dog" }); // on_sale marks real price cuts
|
|
649
|
+
|
|
650
|
+
// Petco: national price plus Repeat Delivery (autoship) price. storeInventory()
|
|
651
|
+
// takes cat_entry_id (from search or product), not the part number.
|
|
652
|
+
await client.petco.search({ query: "dog food", sort: "price" });
|
|
653
|
+
await client.petco.category({ path: "dog/dog-food/dry-dog-food" });
|
|
654
|
+
await client.petco.product({ part_number: "3748364" });
|
|
655
|
+
const pc = await client.petco.stores({ zip: "10001" });
|
|
656
|
+
const pcStore = (pc.data as any).stores[0].store_id;
|
|
657
|
+
await client.petco.storeInventory({ cat_entry_ids: ["6131012"], store_id: pcStore });
|
|
658
|
+
|
|
659
|
+
// iHerb: online only, US store, USD. reviews() is the rating summary,
|
|
660
|
+
// histogram and top positive and critical review - not a full list.
|
|
661
|
+
await client.iherb.search({ query: "vitamin d", sort: "best_selling" });
|
|
662
|
+
await client.iherb.product({ product_id: "70316" });
|
|
663
|
+
await client.iherb.prices({ product_ids: ["62118", "70316", "77548"] }); // up to 50
|
|
664
|
+
await client.iherb.reviews({ product_id: "70316" });
|
|
665
|
+
|
|
666
|
+
// Chewy: one-time, Autoship and first-Autoship prices, MAP fields, ratings.
|
|
667
|
+
// A broad query can land on a category; data.redirect then names it.
|
|
668
|
+
await client.chewy.search({ query: "kong classic dog toy" });
|
|
669
|
+
await client.chewy.product({ product_id: "38485" });
|
|
670
|
+
|
|
671
|
+
// Menards: search one store (store_id required), then product() by item id or
|
|
672
|
+
// URL. Mail-in rebates and the final price after rebates; store_id adds stock.
|
|
673
|
+
await client.menards.stores({ zip: "55401" });
|
|
674
|
+
await client.menards.search({ query: "sledge hammer", store_id: "3181", sort: "price_asc" });
|
|
675
|
+
await client.menards.product({ item_id: "60893666613", store_id: "3181" });
|
|
676
|
+
```
|
|
677
|
+
|
|
678
|
+
Whole Foods, Harbor Freight, PetSmart and Petco calls cost 1 credit each.
|
|
679
|
+
iHerb calls cost 2 and Chewy calls 10. Menards `search` costs 2, `stores` 1 and
|
|
680
|
+
`product` 1, or 2 with a `store_id`. Petco calls can take 10-30 seconds, so every Petco
|
|
681
|
+
call raises the request timeout to `PETCO_SLOW_TIMEOUT` (120s); iHerb `search`
|
|
682
|
+
and `product` can take 10-25 seconds, so they raise it to `IHERB_SLOW_TIMEOUT`
|
|
683
|
+
(120s); Menards `product` with a store can take 10-40 seconds, so it raises it
|
|
684
|
+
to `MENARDS_PRODUCT_TIMEOUT` (120s). None ever lowers a longer client timeout.
|
|
685
|
+
|
|
609
686
|
### [Mercado Libre](https://scavio.dev/docs/mercadolibre-search?utm_source=npm-scavio-js&utm_medium=package&utm_campaign=readme)
|
|
610
687
|
|
|
611
688
|
Five endpoints, new in 0.21.0: `reviews` costs 1 credit, the other four 2. The
|
package/dist/index.cjs
CHANGED
|
@@ -41,6 +41,7 @@ __export(index_exports, {
|
|
|
41
41
|
CanadianTireNamespace: () => CanadianTireNamespace,
|
|
42
42
|
CapterraNamespace: () => CapterraNamespace,
|
|
43
43
|
ChatgptNamespace: () => ChatgptNamespace,
|
|
44
|
+
ChewyNamespace: () => ChewyNamespace,
|
|
44
45
|
CompaniesHouseNamespace: () => CompaniesHouseNamespace,
|
|
45
46
|
CostcoNamespace: () => CostcoNamespace,
|
|
46
47
|
CvsNamespace: () => CvsNamespace,
|
|
@@ -54,8 +55,11 @@ __export(index_exports, {
|
|
|
54
55
|
GoogleAdsNamespace: () => GoogleAdsNamespace,
|
|
55
56
|
GoogleNamespace: () => GoogleNamespace,
|
|
56
57
|
GooglePlayNamespace: () => GooglePlayNamespace,
|
|
58
|
+
HarborFreightNamespace: () => HarborFreightNamespace,
|
|
57
59
|
HebNamespace: () => HebNamespace,
|
|
58
60
|
HomeDepotNamespace: () => HomeDepotNamespace,
|
|
61
|
+
IHERB_SLOW_TIMEOUT: () => IHERB_SLOW_TIMEOUT,
|
|
62
|
+
IherbNamespace: () => IherbNamespace,
|
|
59
63
|
IndeedNamespace: () => IndeedNamespace,
|
|
60
64
|
InstagramNamespace: () => InstagramNamespace,
|
|
61
65
|
InsufficientCreditsError: () => InsufficientCreditsError,
|
|
@@ -65,11 +69,16 @@ __export(index_exports, {
|
|
|
65
69
|
LinkedInNamespace: () => LinkedInNamespace,
|
|
66
70
|
LowesNamespace: () => LowesNamespace,
|
|
67
71
|
MAX_REQUESTS_PER_SECOND: () => MAX_REQUESTS_PER_SECOND,
|
|
72
|
+
MENARDS_PRODUCT_TIMEOUT: () => MENARDS_PRODUCT_TIMEOUT,
|
|
73
|
+
MenardsNamespace: () => MenardsNamespace,
|
|
68
74
|
MercadoLibreNamespace: () => MercadoLibreNamespace,
|
|
69
75
|
MetaAdsNamespace: () => MetaAdsNamespace,
|
|
70
76
|
MicroCenterNamespace: () => MicroCenterNamespace,
|
|
71
77
|
MissingAPIKeyError: () => MissingAPIKeyError,
|
|
72
78
|
NotFoundError: () => NotFoundError,
|
|
79
|
+
PETCO_SLOW_TIMEOUT: () => PETCO_SLOW_TIMEOUT,
|
|
80
|
+
PetcoNamespace: () => PetcoNamespace,
|
|
81
|
+
PetsmartNamespace: () => PetsmartNamespace,
|
|
73
82
|
RateLimitError: () => RateLimitError,
|
|
74
83
|
RealtorNamespace: () => RealtorNamespace,
|
|
75
84
|
RedditNamespace: () => RedditNamespace,
|
|
@@ -93,6 +102,7 @@ __export(index_exports, {
|
|
|
93
102
|
UltaNamespace: () => UltaNamespace,
|
|
94
103
|
WalgreensNamespace: () => WalgreensNamespace,
|
|
95
104
|
WalmartNamespace: () => WalmartNamespace,
|
|
105
|
+
WholeFoodsNamespace: () => WholeFoodsNamespace,
|
|
96
106
|
XNamespace: () => XNamespace,
|
|
97
107
|
YelpNamespace: () => YelpNamespace,
|
|
98
108
|
YouTubeNamespace: () => YouTubeNamespace,
|
|
@@ -248,7 +258,7 @@ function parseRetryAfter(header) {
|
|
|
248
258
|
var BASE_URL = "https://api.scavio.dev";
|
|
249
259
|
var DEFAULT_TIMEOUT = 3e4;
|
|
250
260
|
var DEFAULT_MAX_RETRIES = 2;
|
|
251
|
-
var SDK_VERSION = true ? "0.
|
|
261
|
+
var SDK_VERSION = true ? "0.34.0" : "0.0.0";
|
|
252
262
|
var USER_AGENT = `scavio-js/${SDK_VERSION}`;
|
|
253
263
|
function isServerRuntime() {
|
|
254
264
|
const g = globalThis;
|
|
@@ -3436,6 +3446,459 @@ var CvsNamespace = class {
|
|
|
3436
3446
|
}
|
|
3437
3447
|
};
|
|
3438
3448
|
|
|
3449
|
+
// src/namespaces/whole-foods.ts
|
|
3450
|
+
var WholeFoodsNamespace = class {
|
|
3451
|
+
constructor(client) {
|
|
3452
|
+
this.client = client;
|
|
3453
|
+
}
|
|
3454
|
+
client;
|
|
3455
|
+
/**
|
|
3456
|
+
* Search Whole Foods Market products at one store, up to 60 per page: ASIN,
|
|
3457
|
+
* slug, name, brand, image, that store's regular_price, sale_price and
|
|
3458
|
+
* prime_price with sale start and end dates (a multi-buy is a total:
|
|
3459
|
+
* sale_price 10 with sale_quantity 2 is 2 for $10; price_unit lb is per
|
|
3460
|
+
* pound), on_sale and is_local flags. Also total_results and facets
|
|
3461
|
+
* (categories, diets). Sorts by relevance or price only.
|
|
3462
|
+
*
|
|
3463
|
+
* Costs 1 credit.
|
|
3464
|
+
*/
|
|
3465
|
+
async search(options) {
|
|
3466
|
+
return this.client._post("/api/v1/wholefoods/search", options);
|
|
3467
|
+
}
|
|
3468
|
+
/**
|
|
3469
|
+
* Browse one Whole Foods Market category at one store, with sort, on_sale
|
|
3470
|
+
* and diet filters. Same product fields as search, plus the category
|
|
3471
|
+
* breadcrumb, total_results and facets. An unknown category slug is a 404.
|
|
3472
|
+
*
|
|
3473
|
+
* Costs 1 credit.
|
|
3474
|
+
*/
|
|
3475
|
+
async category(options) {
|
|
3476
|
+
return this.client._post("/api/v1/wholefoods/category", options);
|
|
3477
|
+
}
|
|
3478
|
+
/**
|
|
3479
|
+
* Every product on sale at one Whole Foods Market store, store-wide or in
|
|
3480
|
+
* one category, with regular, sale and Prime prices and sale dates.
|
|
3481
|
+
*
|
|
3482
|
+
* Costs 1 credit.
|
|
3483
|
+
*/
|
|
3484
|
+
async deals(options = {}) {
|
|
3485
|
+
return this.client._post("/api/v1/wholefoods/deals", options);
|
|
3486
|
+
}
|
|
3487
|
+
/**
|
|
3488
|
+
* One Whole Foods Market product by ASIN, URL or slug: name, brand,
|
|
3489
|
+
* description, ingredients, nutrition facts, diets, SNAP EBT eligibility
|
|
3490
|
+
* and images. With store_id, two separate price blocks: in_store (the
|
|
3491
|
+
* store's shelf regular, sale and Prime price; null when it does not list
|
|
3492
|
+
* the item) and online (delivery/pickup price, list price, savings, Prime
|
|
3493
|
+
* price, unit price, availability; null with no online offer). An unknown
|
|
3494
|
+
* ASIN is a 404.
|
|
3495
|
+
*
|
|
3496
|
+
* Costs 1 credit.
|
|
3497
|
+
*/
|
|
3498
|
+
async product(options) {
|
|
3499
|
+
return this.client._post("/api/v1/wholefoods/product", options);
|
|
3500
|
+
}
|
|
3501
|
+
/**
|
|
3502
|
+
* Whole Foods Market stores near a US ZIP code, nearest first (within 15
|
|
3503
|
+
* miles, widening to 50): store_id, name, address, phone, coordinates,
|
|
3504
|
+
* distance in miles, time zone and seven days of in-store and pickup hours.
|
|
3505
|
+
* No store in range is an empty list.
|
|
3506
|
+
*
|
|
3507
|
+
* Costs 1 credit.
|
|
3508
|
+
*/
|
|
3509
|
+
async stores(options) {
|
|
3510
|
+
return this.client._post("/api/v1/wholefoods/stores", options);
|
|
3511
|
+
}
|
|
3512
|
+
/**
|
|
3513
|
+
* One Whole Foods Market store by id: name, status, phone, Prime
|
|
3514
|
+
* eligibility, opening date, address, coordinates, time zone, store page and
|
|
3515
|
+
* sales flyer URLs. An unknown store id is a 404.
|
|
3516
|
+
*
|
|
3517
|
+
* Costs 1 credit.
|
|
3518
|
+
*/
|
|
3519
|
+
async store(options) {
|
|
3520
|
+
return this.client._post("/api/v1/wholefoods/store", options);
|
|
3521
|
+
}
|
|
3522
|
+
/**
|
|
3523
|
+
* The current weekly sales flyer of one Whole Foods Market store: each
|
|
3524
|
+
* promotion's product name, brand, headline, description, terms, regular,
|
|
3525
|
+
* sale and Prime price as printed (text such as "$3.99/lb" or "44% off"),
|
|
3526
|
+
* start and end dates, image, rank and the ASINs it covers. An unknown
|
|
3527
|
+
* store id is a 404.
|
|
3528
|
+
*
|
|
3529
|
+
* Costs 1 credit.
|
|
3530
|
+
*/
|
|
3531
|
+
async salesFlyer(options) {
|
|
3532
|
+
return this.client._post("/api/v1/wholefoods/sales-flyer", options);
|
|
3533
|
+
}
|
|
3534
|
+
};
|
|
3535
|
+
|
|
3536
|
+
// src/namespaces/harbor-freight.ts
|
|
3537
|
+
var HarborFreightNamespace = class {
|
|
3538
|
+
constructor(client) {
|
|
3539
|
+
this.client = client;
|
|
3540
|
+
}
|
|
3541
|
+
client;
|
|
3542
|
+
/**
|
|
3543
|
+
* Search Harbor Freight by keyword and/or category, with brand and
|
|
3544
|
+
* clearance filters: item number, id, title, brand, URL, image, price,
|
|
3545
|
+
* regular price, on_sale and clearance flags, sale (price, end date,
|
|
3546
|
+
* savings), coupon, member_deal, compare_at, badges, rating, review count,
|
|
3547
|
+
* in-store-only / online-only flags and variants. Also total_results,
|
|
3548
|
+
* facets, and redirect when a keyword maps to a category page.
|
|
3549
|
+
*
|
|
3550
|
+
* Costs 1 credit.
|
|
3551
|
+
*/
|
|
3552
|
+
async search(options) {
|
|
3553
|
+
return this.client._post("/api/v1/harborfreight/search", options);
|
|
3554
|
+
}
|
|
3555
|
+
/**
|
|
3556
|
+
* Harbor Freight clearance items, optionally narrowed by keyword, category
|
|
3557
|
+
* or brand. Same fields as search; each item's clearance price and end date
|
|
3558
|
+
* are in `sale`.
|
|
3559
|
+
*
|
|
3560
|
+
* Costs 1 credit.
|
|
3561
|
+
*/
|
|
3562
|
+
async clearance(options = {}) {
|
|
3563
|
+
return this.client._post("/api/v1/harborfreight/clearance", options);
|
|
3564
|
+
}
|
|
3565
|
+
/**
|
|
3566
|
+
* One product by item number, id or URL: title, brand, UPC, every price
|
|
3567
|
+
* field of search, rating, review count, description, highlights, the full
|
|
3568
|
+
* specification table, warranty, shipping notes, owner's manuals, images
|
|
3569
|
+
* and variants. An unknown item is a 404.
|
|
3570
|
+
*
|
|
3571
|
+
* Costs 1 credit.
|
|
3572
|
+
*/
|
|
3573
|
+
async product(options) {
|
|
3574
|
+
return this.client._post("/api/v1/harborfreight/product", options);
|
|
3575
|
+
}
|
|
3576
|
+
/**
|
|
3577
|
+
* Current prices for up to 50 item numbers in one call: price, regular
|
|
3578
|
+
* price, sale, coupon, member_deal and compare_at per item. Unknown item
|
|
3579
|
+
* numbers are listed in not_found.
|
|
3580
|
+
*
|
|
3581
|
+
* Costs 1 credit.
|
|
3582
|
+
*/
|
|
3583
|
+
async prices(options) {
|
|
3584
|
+
return this.client._post("/api/v1/harborfreight/prices", options);
|
|
3585
|
+
}
|
|
3586
|
+
/**
|
|
3587
|
+
* Harbor Freight stores near a ZIP code, "City, ST" or coordinates, nearest
|
|
3588
|
+
* first: store_id, name, address, phone, coordinates, distance in miles,
|
|
3589
|
+
* status, opening date and hours.
|
|
3590
|
+
*
|
|
3591
|
+
* Costs 1 credit.
|
|
3592
|
+
*/
|
|
3593
|
+
async stores(options) {
|
|
3594
|
+
return this.client._post("/api/v1/harborfreight/stores", options);
|
|
3595
|
+
}
|
|
3596
|
+
/**
|
|
3597
|
+
* In-store stock for up to 20 items at chosen stores, or at the stores
|
|
3598
|
+
* nearest a ZIP code or coordinates. Each store lists every item with
|
|
3599
|
+
* stock_status (in_stock, limited, out_of_stock or not_carried), the aisle
|
|
3600
|
+
* and a nearby store that has it. inventory_updated_at is the time of the
|
|
3601
|
+
* daily stock snapshot. Stock is a status, not a unit count.
|
|
3602
|
+
*
|
|
3603
|
+
* Costs 1 credit.
|
|
3604
|
+
*/
|
|
3605
|
+
async availability(options) {
|
|
3606
|
+
return this.client._post("/api/v1/harborfreight/availability", options);
|
|
3607
|
+
}
|
|
3608
|
+
/**
|
|
3609
|
+
* Customer reviews for one item, newest first, with limit/offset paging:
|
|
3610
|
+
* title, text, star rating, author, review and purchase dates, incentivized
|
|
3611
|
+
* flag, helpful votes and the reviewer's answers. Also the average rating
|
|
3612
|
+
* and total review count. An unknown item is a 404.
|
|
3613
|
+
*
|
|
3614
|
+
* Costs 1 credit.
|
|
3615
|
+
*/
|
|
3616
|
+
async reviews(options) {
|
|
3617
|
+
return this.client._post("/api/v1/harborfreight/reviews", options);
|
|
3618
|
+
}
|
|
3619
|
+
};
|
|
3620
|
+
|
|
3621
|
+
// src/namespaces/petsmart.ts
|
|
3622
|
+
var PetsmartNamespace = class {
|
|
3623
|
+
constructor(client) {
|
|
3624
|
+
this.client = client;
|
|
3625
|
+
}
|
|
3626
|
+
client;
|
|
3627
|
+
/**
|
|
3628
|
+
* Search PetSmart products, up to 40 per page: SKU, web_style_id, name,
|
|
3629
|
+
* brand, UPC, price, original and sale price, price range across sizes,
|
|
3630
|
+
* rating, review count, image, size, variations, category, pets,
|
|
3631
|
+
* promotions, stores_in_stock (how many stores stock it), pickup and
|
|
3632
|
+
* Autoship eligibility and URL. Prices are national. Pass store_id to list
|
|
3633
|
+
* only products in stock at that store.
|
|
3634
|
+
*
|
|
3635
|
+
* Costs 1 credit.
|
|
3636
|
+
*/
|
|
3637
|
+
async search(options) {
|
|
3638
|
+
return this.client._post("/api/v1/petsmart/search", options);
|
|
3639
|
+
}
|
|
3640
|
+
/**
|
|
3641
|
+
* One PetSmart product by web_style_id, SKU or URL, with every variant
|
|
3642
|
+
* (size, flavor): SKU, UPC, price, original price, sale price and end date,
|
|
3643
|
+
* Autoship discount with first-order and recurring price, ship-to-home
|
|
3644
|
+
* stock, pickup and same-day options, images and promotions. Also brand,
|
|
3645
|
+
* rating, review count, categories and description. An unknown id is a 404.
|
|
3646
|
+
*
|
|
3647
|
+
* Costs 1 credit.
|
|
3648
|
+
*/
|
|
3649
|
+
async product(options) {
|
|
3650
|
+
return this.client._post("/api/v1/petsmart/product", options);
|
|
3651
|
+
}
|
|
3652
|
+
/**
|
|
3653
|
+
* The 12 PetSmart stores nearest a US ZIP code: store_id, name, address,
|
|
3654
|
+
* phone, coordinates, distance in miles, time zone, the next 7 days of
|
|
3655
|
+
* hours and services (grooming, PetsHotel, veterinary, adoptions). Pass a
|
|
3656
|
+
* sku and each store also carries quantity and in_stock for it.
|
|
3657
|
+
*
|
|
3658
|
+
* Costs 1 credit.
|
|
3659
|
+
*/
|
|
3660
|
+
async stores(options) {
|
|
3661
|
+
return this.client._post("/api/v1/petsmart/stores", options);
|
|
3662
|
+
}
|
|
3663
|
+
/**
|
|
3664
|
+
* Stock of up to 20 SKUs at one PetSmart store: units for in-store pickup
|
|
3665
|
+
* at that store, units to ship to home, and a nearby alternate store with
|
|
3666
|
+
* its count when the store has none. Includes the store's address and
|
|
3667
|
+
* pickup options. An unknown store is a 404; an unknown SKU reads 0.
|
|
3668
|
+
*
|
|
3669
|
+
* Costs 1 credit.
|
|
3670
|
+
*/
|
|
3671
|
+
async storeStock(options) {
|
|
3672
|
+
return this.client._post("/api/v1/petsmart/store-stock", options);
|
|
3673
|
+
}
|
|
3674
|
+
/**
|
|
3675
|
+
* Unit counts for up to 20 store and SKU pairs in one call, mixing stores
|
|
3676
|
+
* and SKUs freely: quantity and in_stock per pair. Unknown stores or SKUs
|
|
3677
|
+
* read 0.
|
|
3678
|
+
*
|
|
3679
|
+
* Costs 1 credit.
|
|
3680
|
+
*/
|
|
3681
|
+
async availability(options) {
|
|
3682
|
+
return this.client._post("/api/v1/petsmart/availability", options);
|
|
3683
|
+
}
|
|
3684
|
+
/**
|
|
3685
|
+
* Products in PetSmart's Sale section, up to 40 per page, in the same shape
|
|
3686
|
+
* as search, plus the current sale events with approximate product counts.
|
|
3687
|
+
* The Sale section also lists points and Autoship promotions, so on_sale
|
|
3688
|
+
* marks the rows whose price is actually reduced.
|
|
3689
|
+
*
|
|
3690
|
+
* Costs 1 credit.
|
|
3691
|
+
*/
|
|
3692
|
+
async deals(options = {}) {
|
|
3693
|
+
return this.client._post("/api/v1/petsmart/deals", options);
|
|
3694
|
+
}
|
|
3695
|
+
};
|
|
3696
|
+
|
|
3697
|
+
// src/namespaces/petco.ts
|
|
3698
|
+
var PETCO_SLOW_TIMEOUT = 12e4;
|
|
3699
|
+
var PetcoNamespace = class {
|
|
3700
|
+
constructor(client) {
|
|
3701
|
+
this.client = client;
|
|
3702
|
+
}
|
|
3703
|
+
client;
|
|
3704
|
+
/**
|
|
3705
|
+
* Search Petco products, 48 per page: price, list price and autoship
|
|
3706
|
+
* (Repeat Delivery) price, rating, review count, brand, part_number,
|
|
3707
|
+
* cat_entry_id (for storeInventory), fulfillment flags (pickup, same-day
|
|
3708
|
+
* delivery, autoship, in-store only), deal group ids and every size/flavor
|
|
3709
|
+
* variation with its own prices. Also total_results, facets and the
|
|
3710
|
+
* categories the matches fall into. Prices are national.
|
|
3711
|
+
*
|
|
3712
|
+
* Costs 1 credit.
|
|
3713
|
+
*/
|
|
3714
|
+
async search(options) {
|
|
3715
|
+
return this.client._post("/api/v1/petco/search", options, void 0, PETCO_SLOW_TIMEOUT);
|
|
3716
|
+
}
|
|
3717
|
+
/**
|
|
3718
|
+
* Products in a Petco category, e.g. dog/dog-food/dry-dog-food, in the same
|
|
3719
|
+
* shape as search. An unknown category is a 404. Can take 10-30 seconds.
|
|
3720
|
+
*
|
|
3721
|
+
* Costs 1 credit.
|
|
3722
|
+
*/
|
|
3723
|
+
async category(options) {
|
|
3724
|
+
return this.client._post("/api/v1/petco/category", options, void 0, PETCO_SLOW_TIMEOUT);
|
|
3725
|
+
}
|
|
3726
|
+
/**
|
|
3727
|
+
* One Petco product by part number or URL, with every variant (size,
|
|
3728
|
+
* flavor): cat_entry_id, part number, SKU, UPC, price, list price, autoship
|
|
3729
|
+
* price, first-autoship promo price, online quantity and status,
|
|
3730
|
+
* fulfillment flags, ingredients, guaranteed analysis, directions,
|
|
3731
|
+
* specifications, dimensions and images. Plus brand, rating, review count
|
|
3732
|
+
* and breadcrumbs. Prices are national. An unknown product is a 404. Can
|
|
3733
|
+
* take 10-30 seconds.
|
|
3734
|
+
*
|
|
3735
|
+
* Costs 1 credit.
|
|
3736
|
+
*/
|
|
3737
|
+
async product(options) {
|
|
3738
|
+
return this.client._post("/api/v1/petco/product", options, void 0, PETCO_SLOW_TIMEOUT);
|
|
3739
|
+
}
|
|
3740
|
+
/**
|
|
3741
|
+
* Petco stores nearest a US ZIP code (up to 10): store_id (for
|
|
3742
|
+
* storeInventory), store number, name, address, phone, coordinates,
|
|
3743
|
+
* distance in miles, in-store pickup and opening hours per weekday.
|
|
3744
|
+
*
|
|
3745
|
+
* Costs 1 credit.
|
|
3746
|
+
*/
|
|
3747
|
+
async stores(options) {
|
|
3748
|
+
return this.client._post("/api/v1/petco/stores", options, void 0, PETCO_SLOW_TIMEOUT);
|
|
3749
|
+
}
|
|
3750
|
+
/**
|
|
3751
|
+
* Units on hand at one Petco store for up to 10 products: qty_available,
|
|
3752
|
+
* alert_level (GREEN, YELLOW, RED) and in_stock per cat_entry_id. Pass a
|
|
3753
|
+
* store_id, or a zip to use the nearest store.
|
|
3754
|
+
*
|
|
3755
|
+
* Costs 1 credit.
|
|
3756
|
+
*/
|
|
3757
|
+
async storeInventory(options) {
|
|
3758
|
+
return this.client._post("/api/v1/petco/store-inventory", options, void 0, PETCO_SLOW_TIMEOUT);
|
|
3759
|
+
}
|
|
3760
|
+
};
|
|
3761
|
+
|
|
3762
|
+
// src/namespaces/iherb.ts
|
|
3763
|
+
var IHERB_SLOW_TIMEOUT = 12e4;
|
|
3764
|
+
var IherbNamespace = class {
|
|
3765
|
+
constructor(client) {
|
|
3766
|
+
this.client = client;
|
|
3767
|
+
}
|
|
3768
|
+
client;
|
|
3769
|
+
/**
|
|
3770
|
+
* Search iHerb (US store, USD), 48 per page: product_id, part_number, name,
|
|
3771
|
+
* brand, brand_code, URL, image, price, list price, original price and
|
|
3772
|
+
* discount_percent when discounted, rating, review count, in_stock, badges
|
|
3773
|
+
* (Best seller, iHerb Brands, New), recent_sales (e.g. "30K+ sold in 30
|
|
3774
|
+
* days") and position. Also total_results and brand_filters for narrowing
|
|
3775
|
+
* with brand_code.
|
|
3776
|
+
*
|
|
3777
|
+
* Costs 2 credits.
|
|
3778
|
+
*/
|
|
3779
|
+
async search(options) {
|
|
3780
|
+
return this.client._post("/api/v1/iherb/search", options, void 0, IHERB_SLOW_TIMEOUT);
|
|
3781
|
+
}
|
|
3782
|
+
/**
|
|
3783
|
+
* One iHerb product by id or URL (US store, USD): name, brand, part number,
|
|
3784
|
+
* UPC, price, list price, discount, price per serving or unit, stock status,
|
|
3785
|
+
* discontinued and coming-soon flags, quantity limit, expiration date,
|
|
3786
|
+
* package quantity, weight and dimensions, rating and review count,
|
|
3787
|
+
* breadcrumbs, best-seller rankings, badges, variants, supplement facts,
|
|
3788
|
+
* description, suggested use, ingredients, warnings and images. An unknown
|
|
3789
|
+
* product id is a 404.
|
|
3790
|
+
*
|
|
3791
|
+
* Costs 2 credits.
|
|
3792
|
+
*/
|
|
3793
|
+
async product(options) {
|
|
3794
|
+
return this.client._post("/api/v1/iherb/product", options, void 0, IHERB_SLOW_TIMEOUT);
|
|
3795
|
+
}
|
|
3796
|
+
/**
|
|
3797
|
+
* Current price, list price, discount, in-stock flag, rating and review
|
|
3798
|
+
* count for up to 50 iHerb products in one call (US store, USD). One row
|
|
3799
|
+
* per requested id, in request order; unknown ids come back with
|
|
3800
|
+
* found: false and are listed in not_found.
|
|
3801
|
+
*
|
|
3802
|
+
* Costs 2 credits.
|
|
3803
|
+
*/
|
|
3804
|
+
async prices(options) {
|
|
3805
|
+
return this.client._post("/api/v1/iherb/prices", options);
|
|
3806
|
+
}
|
|
3807
|
+
/**
|
|
3808
|
+
* The review summary for one iHerb product: average rating, total review
|
|
3809
|
+
* count, star histogram, review counts per language, and the full text of
|
|
3810
|
+
* the top positive and top critical review (rating, title, author, country,
|
|
3811
|
+
* date, verified-purchase flag, helpful votes, images). Not a full review
|
|
3812
|
+
* list.
|
|
3813
|
+
*
|
|
3814
|
+
* Costs 2 credits.
|
|
3815
|
+
*/
|
|
3816
|
+
async reviews(options) {
|
|
3817
|
+
return this.client._post("/api/v1/iherb/reviews", options);
|
|
3818
|
+
}
|
|
3819
|
+
};
|
|
3820
|
+
|
|
3821
|
+
// src/namespaces/chewy.ts
|
|
3822
|
+
var ChewyNamespace = class {
|
|
3823
|
+
constructor(client) {
|
|
3824
|
+
this.client = client;
|
|
3825
|
+
}
|
|
3826
|
+
client;
|
|
3827
|
+
/**
|
|
3828
|
+
* Search Chewy by keyword, or browse a category, 36 per page: one-time
|
|
3829
|
+
* price, offer and strike-through price, Autoship price and discount,
|
|
3830
|
+
* first-Autoship price, discount and savings cap, MAP price, per-unit
|
|
3831
|
+
* price, rating, rating count, in-stock flag, deal/new/exclusive/
|
|
3832
|
+
* prescription flags, brand, image and URL. Sponsored listings are removed
|
|
3833
|
+
* (sponsored_removed counts them). `redirect` names the category when
|
|
3834
|
+
* Chewy sends the query to one.
|
|
3835
|
+
*
|
|
3836
|
+
* Costs 10 credits.
|
|
3837
|
+
*/
|
|
3838
|
+
async search(options) {
|
|
3839
|
+
return this.client._post("/api/v1/chewy/search", options);
|
|
3840
|
+
}
|
|
3841
|
+
/**
|
|
3842
|
+
* One Chewy product by id or URL: one-time price, offer price, list and
|
|
3843
|
+
* strike-through price with savings, MAP price and whether it is enforced,
|
|
3844
|
+
* Autoship price and discount, first-Autoship price, per-unit price,
|
|
3845
|
+
* in-stock flag, rating, rating count, review count and star distribution,
|
|
3846
|
+
* brand, GTIN, description, key benefits, specifications, breadcrumbs,
|
|
3847
|
+
* images, promotions and every variant (size, flavor) with its own price,
|
|
3848
|
+
* Autoship price and stock. An unknown product id is a 404.
|
|
3849
|
+
*
|
|
3850
|
+
* Costs 10 credits.
|
|
3851
|
+
*/
|
|
3852
|
+
async product(options) {
|
|
3853
|
+
return this.client._post("/api/v1/chewy/product", options);
|
|
3854
|
+
}
|
|
3855
|
+
};
|
|
3856
|
+
|
|
3857
|
+
// src/namespaces/menards.ts
|
|
3858
|
+
var MENARDS_PRODUCT_TIMEOUT = 12e4;
|
|
3859
|
+
var MenardsNamespace = class {
|
|
3860
|
+
constructor(client) {
|
|
3861
|
+
this.client = client;
|
|
3862
|
+
}
|
|
3863
|
+
client;
|
|
3864
|
+
/**
|
|
3865
|
+
* Search menards.com at one store, 40 products a page: item_id, sku, name,
|
|
3866
|
+
* url, image, price, everyday_price, sale_price, price_type (regular, sale,
|
|
3867
|
+
* clearance, minimum_advertised), mail-in rebates, final_price after
|
|
3868
|
+
* rebates, and that store's stock_quantity, stock_message, pickup and
|
|
3869
|
+
* delivery flags. Also total_results, total_pages and facets.
|
|
3870
|
+
*
|
|
3871
|
+
* Costs 2 credits.
|
|
3872
|
+
*/
|
|
3873
|
+
async search(options) {
|
|
3874
|
+
return this.client._post("/api/v1/menards/search", options);
|
|
3875
|
+
}
|
|
3876
|
+
/**
|
|
3877
|
+
* One Menards product by item id or URL: name, brand, model number, SKU,
|
|
3878
|
+
* description, bullets, specifications, images, videos and documents, with
|
|
3879
|
+
* the full price ladder: everyday price, sale price and end date, mail-in
|
|
3880
|
+
* rebates (text, amount, dates), final price after rebates and you_save.
|
|
3881
|
+
* Also pickup, delivery and ship-to-store flags. With store_id, that store's
|
|
3882
|
+
* stock quantity, stock message, aisle location and not_available_at_store.
|
|
3883
|
+
* An unknown item id or store number is a 404.
|
|
3884
|
+
*
|
|
3885
|
+
* Costs 1 credit, or 2 with store_id.
|
|
3886
|
+
*/
|
|
3887
|
+
async product(options) {
|
|
3888
|
+
return this.client._post("/api/v1/menards/product", options, void 0, MENARDS_PRODUCT_TIMEOUT);
|
|
3889
|
+
}
|
|
3890
|
+
/**
|
|
3891
|
+
* Menards stores near a US ZIP code or a city and state, nearest first:
|
|
3892
|
+
* store_id, name, address, coordinates, distance in miles and services
|
|
3893
|
+
* (garden center, grocery, rental center, propane and more).
|
|
3894
|
+
*
|
|
3895
|
+
* Costs 1 credit.
|
|
3896
|
+
*/
|
|
3897
|
+
async stores(options) {
|
|
3898
|
+
return this.client._post("/api/v1/menards/stores", options);
|
|
3899
|
+
}
|
|
3900
|
+
};
|
|
3901
|
+
|
|
3439
3902
|
// src/namespaces/trustpilot.ts
|
|
3440
3903
|
var TrustpilotNamespace = class {
|
|
3441
3904
|
constructor(client) {
|
|
@@ -3961,6 +4424,13 @@ var Scavio = class extends ScavioCore {
|
|
|
3961
4424
|
microCenter;
|
|
3962
4425
|
walgreens;
|
|
3963
4426
|
cvs;
|
|
4427
|
+
wholeFoods;
|
|
4428
|
+
harborFreight;
|
|
4429
|
+
petsmart;
|
|
4430
|
+
petco;
|
|
4431
|
+
iherb;
|
|
4432
|
+
chewy;
|
|
4433
|
+
menards;
|
|
3964
4434
|
trustpilot;
|
|
3965
4435
|
chatgpt;
|
|
3966
4436
|
gemini;
|
|
@@ -4034,6 +4504,13 @@ var Scavio = class extends ScavioCore {
|
|
|
4034
4504
|
this.microCenter = new MicroCenterNamespace(this);
|
|
4035
4505
|
this.walgreens = new WalgreensNamespace(this);
|
|
4036
4506
|
this.cvs = new CvsNamespace(this);
|
|
4507
|
+
this.wholeFoods = new WholeFoodsNamespace(this);
|
|
4508
|
+
this.harborFreight = new HarborFreightNamespace(this);
|
|
4509
|
+
this.petsmart = new PetsmartNamespace(this);
|
|
4510
|
+
this.petco = new PetcoNamespace(this);
|
|
4511
|
+
this.iherb = new IherbNamespace(this);
|
|
4512
|
+
this.chewy = new ChewyNamespace(this);
|
|
4513
|
+
this.menards = new MenardsNamespace(this);
|
|
4037
4514
|
this.trustpilot = new TrustpilotNamespace(this);
|
|
4038
4515
|
this.chatgpt = new ChatgptNamespace(this);
|
|
4039
4516
|
this.gemini = new GeminiNamespace(this);
|
|
@@ -4154,6 +4631,7 @@ async function getSubtle() {
|
|
|
4154
4631
|
CanadianTireNamespace,
|
|
4155
4632
|
CapterraNamespace,
|
|
4156
4633
|
ChatgptNamespace,
|
|
4634
|
+
ChewyNamespace,
|
|
4157
4635
|
CompaniesHouseNamespace,
|
|
4158
4636
|
CostcoNamespace,
|
|
4159
4637
|
CvsNamespace,
|
|
@@ -4167,8 +4645,11 @@ async function getSubtle() {
|
|
|
4167
4645
|
GoogleAdsNamespace,
|
|
4168
4646
|
GoogleNamespace,
|
|
4169
4647
|
GooglePlayNamespace,
|
|
4648
|
+
HarborFreightNamespace,
|
|
4170
4649
|
HebNamespace,
|
|
4171
4650
|
HomeDepotNamespace,
|
|
4651
|
+
IHERB_SLOW_TIMEOUT,
|
|
4652
|
+
IherbNamespace,
|
|
4172
4653
|
IndeedNamespace,
|
|
4173
4654
|
InstagramNamespace,
|
|
4174
4655
|
InsufficientCreditsError,
|
|
@@ -4178,11 +4659,16 @@ async function getSubtle() {
|
|
|
4178
4659
|
LinkedInNamespace,
|
|
4179
4660
|
LowesNamespace,
|
|
4180
4661
|
MAX_REQUESTS_PER_SECOND,
|
|
4662
|
+
MENARDS_PRODUCT_TIMEOUT,
|
|
4663
|
+
MenardsNamespace,
|
|
4181
4664
|
MercadoLibreNamespace,
|
|
4182
4665
|
MetaAdsNamespace,
|
|
4183
4666
|
MicroCenterNamespace,
|
|
4184
4667
|
MissingAPIKeyError,
|
|
4185
4668
|
NotFoundError,
|
|
4669
|
+
PETCO_SLOW_TIMEOUT,
|
|
4670
|
+
PetcoNamespace,
|
|
4671
|
+
PetsmartNamespace,
|
|
4186
4672
|
RateLimitError,
|
|
4187
4673
|
RealtorNamespace,
|
|
4188
4674
|
RedditNamespace,
|
|
@@ -4206,6 +4692,7 @@ async function getSubtle() {
|
|
|
4206
4692
|
UltaNamespace,
|
|
4207
4693
|
WalgreensNamespace,
|
|
4208
4694
|
WalmartNamespace,
|
|
4695
|
+
WholeFoodsNamespace,
|
|
4209
4696
|
XNamespace,
|
|
4210
4697
|
YelpNamespace,
|
|
4211
4698
|
YouTubeNamespace,
|