scavio 0.30.1 → 0.32.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 +104 -2
- package/dist/index.cjs +577 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +829 -1
- package/dist/index.d.ts +829 -1
- package/dist/index.js +566 -1
- package/dist/index.js.map +1 -1
- package/package.json +12 -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 52 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, 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, 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
|
|
@@ -504,6 +504,108 @@ warehouses on us and 2 per warehouse on ca). The clearance price codes are the
|
|
|
504
504
|
member-community decode of Costco shelf prices; Costco does not publish them,
|
|
505
505
|
and only items Costco lists online are covered.
|
|
506
506
|
|
|
507
|
+
### Lowe's, Sam's Club, Canadian Tire and Dollar General
|
|
508
|
+
|
|
509
|
+
Four store-level retailers, new in 0.31.0. Each call answers for ONE store you
|
|
510
|
+
choose: get its number from the locator (`lowes.stores`, `samsClub.clubs`,
|
|
511
|
+
`canadianTire.stores`, `dollarGeneral.stores`) and pass it on every call.
|
|
512
|
+
|
|
513
|
+
```typescript
|
|
514
|
+
// Lowe's: store_id AND that store's own ZIP are required on search/product.
|
|
515
|
+
const lowesStores = await client.lowes.stores({ zip: "28117", limit: 1 });
|
|
516
|
+
const store = (lowesStores.data as any).stores[0];
|
|
517
|
+
const sid = store.store_id; // "0595"
|
|
518
|
+
const zip = store.address.postal_code; // "28117"
|
|
519
|
+
await client.lowes.search({ query: "cordless drill", store_id: sid, zip });
|
|
520
|
+
await client.lowes.search({ query: "cordless drill", store_id: sid, zip, on_sale: true }); // that store's deals
|
|
521
|
+
await client.lowes.product({ item_id: "5016412045", store_id: sid, zip }); // stock, aisle_locations, nearby stores
|
|
522
|
+
await client.lowes.reviews({ item_id: "5016412045", sort: "most_helpful" });
|
|
523
|
+
|
|
524
|
+
// Sam's Club: search, savings and category answer for a club picked by
|
|
525
|
+
// location (echoed in data.club). product({ club_id }) targets one club.
|
|
526
|
+
await client.samsClub.clubs({ zip: "75201", limit: 5 });
|
|
527
|
+
await client.samsClub.search({ query: "paper towels", sort: "price_low" });
|
|
528
|
+
await client.samsClub.product({ item_id: "15325822107", club_id: "6372" }); // club_price, in_stock_at_club
|
|
529
|
+
await client.samsClub.savings({ sort: "top_selling" }); // Instant Savings
|
|
530
|
+
await client.samsClub.category({ category_id: "1150109" }); // clearance
|
|
531
|
+
await client.samsClub.reviews({ item_id: "15325822107", sort: "lowest" });
|
|
532
|
+
|
|
533
|
+
// Canadian Tire: prices in CAD, per store and province.
|
|
534
|
+
await client.canadianTire.stores({ postal_code: "M5V 2T6", sku: "0438858" }); // + quantity and aisle per store
|
|
535
|
+
await client.canadianTire.search({ query: "dewalt drill", store_id: "600" });
|
|
536
|
+
await client.canadianTire.product({ product_code: "0547273P", store_id: "600" });
|
|
537
|
+
await client.canadianTire.availability({ store_id: "600", skus: ["0438858", "0547273"] }); // up to 50
|
|
538
|
+
await client.canadianTire.clearance({ store_id: "600" }); // in-stock only by default
|
|
539
|
+
await client.canadianTire.deals({ store_id: "600", type: "sale" }); // or instant_rebate, special_buy, loyalty
|
|
540
|
+
|
|
541
|
+
// Dollar General: one stores() call with a upc gives that product's unit
|
|
542
|
+
// count at up to 25 nearby stores.
|
|
543
|
+
await client.dollarGeneral.stores({ zip: "75203", upc: "030772156629" });
|
|
544
|
+
await client.dollarGeneral.search({ query: "paper towels", store_id: "12629", in_stock_only: true });
|
|
545
|
+
await client.dollarGeneral.product({ upc: "030772156629", store_id: "12629" });
|
|
546
|
+
await client.dollarGeneral.deals({ store_id: "12629", type: "clearance" }); // or on_sale
|
|
547
|
+
await client.dollarGeneral.coupons();
|
|
548
|
+
```
|
|
549
|
+
|
|
550
|
+
Lowe's `search`, `product` and `stores` cost 2 credits and `reviews` 1; every
|
|
551
|
+
Sam's Club, Canadian Tire and Dollar General call costs 1. Sam's Club caps
|
|
552
|
+
`available_quantity` at 8 (8 means 8 or more). Dollar General clearance items
|
|
553
|
+
carry the current price only, with no was-price. Canadian Tire and Dollar
|
|
554
|
+
General return a rating and review count but no review text.
|
|
555
|
+
|
|
556
|
+
### Sephora, Ulta Beauty, ALDI, Micro Center, Walgreens and CVS
|
|
557
|
+
|
|
558
|
+
Six US retailers, new in 0.32.0. Where prices or stock are per store, pass the
|
|
559
|
+
store number on the call (`aldi.stores`, `microCenter.stores`,
|
|
560
|
+
`walgreens.stores`; CVS has no locator).
|
|
561
|
+
|
|
562
|
+
```typescript
|
|
563
|
+
// Sephora: 60 products per page. product() takes a result's url (faster)
|
|
564
|
+
// or its product_id, and returns a review summary with pro and con
|
|
565
|
+
// sentiment counts - no review text.
|
|
566
|
+
await client.sephora.search({ query: "lipstick", sort: "best_selling", zip: "10001" }); // + same_day_eligible
|
|
567
|
+
await client.sephora.category({ category: "lipstick" });
|
|
568
|
+
await client.sephora.product({ product_id: "P510799" });
|
|
569
|
+
|
|
570
|
+
// Ulta Beauty: stores() is in stock / out of stock for one shade or size at
|
|
571
|
+
// the 10 stores nearest a ZIP (no unit counts).
|
|
572
|
+
await client.ulta.search({ query: "lipstick" });
|
|
573
|
+
await client.ulta.category({ category: "/shop/makeup/lips/lipstick" });
|
|
574
|
+
await client.ulta.product({ url: "https://www.ulta.com/p/serum-lipstick-pimprod2057119", sku: "2648428" });
|
|
575
|
+
await client.ulta.stores({ product_id: "pimprod2057119", sku_id: "2648428", zip: "10001" });
|
|
576
|
+
|
|
577
|
+
// ALDI: prices are per store AND per service_type - instore (default, the
|
|
578
|
+
// shelf price), pickup or delivery (online prices, often higher).
|
|
579
|
+
await client.aldi.stores({ zip: "33131" });
|
|
580
|
+
await client.aldi.search({ query: "milk", store_id: "151248", service_type: "pickup" });
|
|
581
|
+
await client.aldi.product({ product_id: "16902710", store_id: "151248" });
|
|
582
|
+
|
|
583
|
+
// Micro Center: stock is per 3-digit store_id (web store 029 when omitted);
|
|
584
|
+
// counts are capped at 25+ (quantity_capped).
|
|
585
|
+
await client.microCenter.stores({ state: "TX" });
|
|
586
|
+
await client.microCenter.search({ query: "rtx 5070", store_id: "131" });
|
|
587
|
+
await client.microCenter.product({ product_id: "691231", store_id: "131" }); // open-box units, stores_in_stock
|
|
588
|
+
|
|
589
|
+
// Walgreens: prices are national; stock() checks up to 20 stores per call.
|
|
590
|
+
const wg = await client.walgreens.stores({ zip: "60614" });
|
|
591
|
+
const storeNumber = (wg.data as any).stores[0].store_number; // "15350"
|
|
592
|
+
await client.walgreens.search({ query: "shampoo", store_id: storeNumber });
|
|
593
|
+
await client.walgreens.product({ product_id: "300452904" });
|
|
594
|
+
await client.walgreens.stock({ product_id: "300452904", store_ids: [storeNumber] });
|
|
595
|
+
|
|
596
|
+
// CVS: no store locator - the store number is on every cvs.com store page
|
|
597
|
+
// ("Store ID: #7019"). search() defaults to store 7019 (New York).
|
|
598
|
+
await client.cvs.search({ query: "toothpaste", store_id: "7019" });
|
|
599
|
+
await client.cvs.product({ product_id: "832677" });
|
|
600
|
+
await client.cvs.stock({ sku_ids: ["832677"], store_id: "7019" });
|
|
601
|
+
```
|
|
602
|
+
|
|
603
|
+
Sephora, Ulta Beauty, ALDI and CVS calls cost 1 credit each. Micro Center
|
|
604
|
+
`search` and `product` cost 2 and `stores` 1. Walgreens `search`, `product` and
|
|
605
|
+
`stores` cost 2 and `stock` 4. CVS `product` can take 10-30+ seconds, so it
|
|
606
|
+
raises the request timeout to `CVS_PRODUCT_TIMEOUT` (120s) when the client's is
|
|
607
|
+
shorter; it never lowers it.
|
|
608
|
+
|
|
507
609
|
### [Mercado Libre](https://scavio.dev/docs/mercadolibre-search?utm_source=npm-scavio-js&utm_medium=package&utm_campaign=readme)
|
|
508
610
|
|
|
509
611
|
Five endpoints, new in 0.21.0: `reviews` costs 1 credit, the other four 2. The
|