mastra-scavio 0.7.2 → 0.8.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,8 +1,8 @@
1
1
  # mastra-scavio
2
2
 
3
- [Scavio](https://scavio.dev) real-time data tools for [Mastra](https://mastra.ai) agents — **188 tools across 31 platforms** on one API key. Retail (Amazon, Walmart, eBay, Target, Home Depot), real estate (Zillow, Redfin), travel (Booking.com, Airbnb, Tripadvisor), local (Yelp, Google Maps), jobs (Indeed, Glassdoor, LinkedIn), software reviews (G2, Capterra), app stores (App Store, Google Play), company filings (SEC EDGAR, Companies House), ad libraries (Google Ads Transparency, Meta Ad Library), search (Google) and social (YouTube, TikTok, Instagram, X, Reddit, Threads, Kuaishou) — plus `scavioExtract`, which reads any URL as clean Markdown, and five opt-in tools that map a site's URLs, crawl a whole site or batch-extract a URL list.
3
+ [Scavio](https://scavio.dev) real-time data tools for [Mastra](https://mastra.ai) agents — **189 tools across 31 platforms** on one API key. Retail (Amazon, Walmart, eBay, Target, Home Depot), real estate (Zillow, Redfin), travel (Booking.com, Airbnb, Tripadvisor), local (Yelp, Google Maps), jobs (Indeed, Glassdoor, LinkedIn), software reviews (G2, Capterra), app stores (App Store, Google Play), company filings (SEC EDGAR, Companies House), ad libraries (Google Ads Transparency, Meta Ad Library), search (Google) and social (YouTube, TikTok, Instagram, X, Reddit, Threads, Kuaishou) — plus `scavioExtract`, which reads any URL as clean Markdown, and five opt-in tools that map a site's URLs, crawl a whole site or batch-extract a URL list.
4
4
 
5
- > **Amazon changed (breaking).** The upstream provider moved in 2026-07:
5
+ > **Amazon changed (breaking).** The Amazon endpoint changed in 2026-07:
6
6
  > `domain` is replaced by `country`, a two-letter marketplace code (`us`, `gb`
7
7
  > -- the UK is `gb`, not `uk` -- `de`, `jp`, ...), and `sort_by`, `pages`,
8
8
  > `category_id`, `merchant_id`, `language`, `currency`, `device`, `zip_code`
@@ -53,7 +53,7 @@ const agent = new Agent({
53
53
 
54
54
  ## Tools
55
55
 
56
- `createScavioTools()` returns **188 tools** across 31 platforms plus `extract` — one per billable Scavio endpoint — and **193** with `{ enableCrawl: true }`, which adds the five website tools. Requires `scavio@^0.23.0`.
56
+ `createScavioTools()` returns **189 tools** across 31 platforms plus `extract` — one per billable Scavio endpoint — and **194** with `{ enableCrawl: true }`, which adds the five website tools. Requires `scavio@^0.27.0`.
57
57
 
58
58
  | Platform | Tools | Names |
59
59
  |---|---|---|
@@ -72,7 +72,7 @@ const agent = new Agent({
72
72
  | [Threads](https://scavio.dev/docs/threads-profile) | 6 | `scavioThreadsProfile`, `scavioThreadsUserPosts`, `scavioThreadsUserReplies`, `scavioThreadsPost`, `scavioThreadsPostComments`, `scavioThreadsSearchUsers` |
73
73
  | [Kuaishou](https://scavio.dev/docs/kuaishou-profile) | 14 | `scavioKuaishouProfile`, `scavioKuaishouUserPosts`, `scavioKuaishouUserLive`, `scavioKuaishouUserResolve`, `scavioKuaishouVideo`, `scavioKuaishouVideoComments`, `scavioKuaishouCommentReplies`, `scavioKuaishouVideosBatch`, `scavioKuaishouSearch`, `scavioKuaishouSearchVideos`, `scavioKuaishouSearchUsers`, `scavioKuaishouSearchLive`, `scavioKuaishouTagFeed`, `scavioKuaishouTrending` |
74
74
  | [eBay](https://scavio.dev/docs/ebay-search) | 3 | `scavioEbaySearch`, `scavioEbayProduct`, `scavioEbaySeller` |
75
- | [Target](https://scavio.dev/docs/target-search) | 4 | `scavioTargetSearch`, `scavioTargetCategory`, `scavioTargetProduct`, `scavioTargetReviews` |
75
+ | [Target](https://scavio.dev/docs/target-search) | 5 | `scavioTargetSearch`, `scavioTargetCategory`, `scavioTargetProduct`, `scavioTargetReviews`, `scavioTargetAvailability` |
76
76
  | [Home Depot](https://scavio.dev/docs/home-depot-search) | 3 | `scavioHomeDepotSearch`, `scavioHomeDepotProduct`, `scavioHomeDepotReviews` |
77
77
  | [Zillow](https://scavio.dev/docs/zillow-search) | 3 | `scavioZillowSearch`, `scavioZillowProperty`, `scavioZillowAgentReviews` |
78
78
  | [Booking.com](https://scavio.dev/docs/booking-search) | 3 | `scavioBookingSearch`, `scavioBookingHotel`, `scavioBookingReviews` |
@@ -119,7 +119,7 @@ Reddit, TikTok and Instagram shipped two tools each before 0.5.0; the rest of th
119
119
 
120
120
  ### New in 0.7.0
121
121
 
122
- Five website tools, opt-in with `createScavioTools({ enableCrawl: true })` so the default set is unchanged: `scavioMapWebsite`, `scavioCrawlWebsite`, `scavioCrawlStatus`, `scavioBatchExtract` and `scavioBatchStatus`. Requires `scavio@^0.23.0`, whose `extract` became a callable namespace (`scavio.extract({ url })` still reads one page). See [Map, crawl and batch](#map-crawl-and-batch).
122
+ Five website tools, opt-in with `createScavioTools({ enableCrawl: true })` so the default set is unchanged: `scavioMapWebsite`, `scavioCrawlWebsite`, `scavioCrawlStatus`, `scavioBatchExtract` and `scavioBatchStatus`. Requires `scavio@^0.27.0`, whose `extract` became a callable namespace (`scavio.extract({ url })` still reads one page). See [Map, crawl and batch](#map-crawl-and-batch).
123
123
 
124
124
  ### New in 0.6.0
125
125
 
@@ -216,7 +216,7 @@ No single number is true for these, so each tool states its own price and none o
216
216
  | Surface | Price |
217
217
  |---|---|
218
218
  | `scavioWalmartSearch`, `scavioWalmartCategory` | 1 credit on `domain` `com` or `ca`, **2 on `com.mx`**. The other five Walmart tools take no `domain` and are always 1. |
219
- | `scavioThreadsProfile`, `scavioThreadsUserPosts`, `scavioThreadsUserReplies` | **2 credits addressed by `user_id`, 4 by `username`** — a handle buys a second upstream call, because the upstream handle lookup is dead. Pass `user_id` whenever you have it. The other three Threads tools have no username form and are always 2. |
219
+ | `scavioThreadsProfile`, `scavioThreadsUserPosts`, `scavioThreadsUserReplies` | **2 credits addressed by `user_id`, 4 by `username`** — a handle buys a second lookup. Pass `user_id` whenever you have it. The other three Threads tools have no username form and are always 2. |
220
220
  | Kuaishou | **Per endpoint, 1 to 40.** See the table above; one platform-wide figure would be wrong by up to 40x. |
221
221
  | `scavioExtract` | 1 credit on `mode` `normal` or `advanced`, **2 on `ultra`**. Only a successful extraction is billed — a dead link, bot wall or timeout costs nothing. |
222
222
  | `scavioMapWebsite` | 1 credit on `mode` `normal`; up to 2 on `advanced`, up to 10 on `ultra`, priced by what the call needed. |
package/dist/index.cjs CHANGED
@@ -147,6 +147,7 @@ __export(index_exports, {
147
147
  createScavioSecFilingsTool: () => createScavioSecFilingsTool,
148
148
  createScavioSecLookupTool: () => createScavioSecLookupTool,
149
149
  createScavioSecSearchTool: () => createScavioSecSearchTool,
150
+ createScavioTargetAvailabilityTool: () => createScavioTargetAvailabilityTool,
150
151
  createScavioTargetCategoryTool: () => createScavioTargetCategoryTool,
151
152
  createScavioTargetProductTool: () => createScavioTargetProductTool,
152
153
  createScavioTargetReviewsTool: () => createScavioTargetReviewsTool,
@@ -2544,7 +2545,7 @@ var ebayToolSpecs = [
2544
2545
  "price_low",
2545
2546
  "price_high"
2546
2547
  ]).optional().describe(
2547
- "Result sort order. Defaults to 'best_match'. eBay's 'Distance: nearest first' is deliberately unsupported (it ranks against our proxy exit, not the caller)."
2548
+ "Result sort order. Defaults to 'best_match'. eBay's 'Distance: nearest first' is deliberately unsupported (it would not rank by the location of the caller)."
2548
2549
  ),
2549
2550
  min_price: import_zod15.z.number().optional().describe("Minimum price, inclusive. Must be 0 or greater."),
2550
2551
  max_price: import_zod15.z.number().optional().describe("Maximum price, inclusive. Must be 0 or greater."),
@@ -2628,7 +2629,7 @@ var targetToolSpecs = [
2628
2629
  "Result sort order. Defaults to 'relevance'."
2629
2630
  ),
2630
2631
  store_id: import_zod16.z.string().optional().describe(
2631
- "Numeric Target store id whose prices and availability the response reflects. Defaults to '3991', the store target.com uses with no store context."
2632
+ "Numeric Target store id whose prices the response reflects. Defaults to '3991', the store target.com uses with no store context."
2632
2633
  )
2633
2634
  }),
2634
2635
  call: (client, input) => client.target.search(input)
@@ -2660,7 +2661,7 @@ var targetToolSpecs = [
2660
2661
  "Result sort order. Defaults to 'relevance'."
2661
2662
  ),
2662
2663
  store_id: import_zod16.z.string().optional().describe(
2663
- "Numeric Target store id whose prices and availability the response reflects. Defaults to '3991'."
2664
+ "Numeric Target store id whose prices the response reflects. Defaults to '3991'."
2664
2665
  )
2665
2666
  }),
2666
2667
  call: (client, input) => client.target.category(input)
@@ -2677,7 +2678,7 @@ var targetToolSpecs = [
2677
2678
  "Target catalog id (tcin, e.g. '1010453160'). A colour/size child tcin is answered by its variation parent, with the child present in 'variants'."
2678
2679
  ),
2679
2680
  store_id: import_zod16.z.string().optional().describe(
2680
- "Numeric Target store id whose prices and availability the response reflects. Defaults to '3991'."
2681
+ "Numeric Target store id whose prices the response reflects. Defaults to '3991'."
2681
2682
  )
2682
2683
  }),
2683
2684
  call: (client, input) => client.target.product(input)
@@ -2695,16 +2696,32 @@ var targetToolSpecs = [
2695
2696
  "Trim the returned reviews to at most this many (1 or greater). Target publishes 8 anonymously and offers no paging, so this only trims."
2696
2697
  ),
2697
2698
  store_id: import_zod16.z.string().optional().describe(
2698
- "Numeric Target store id whose prices and availability the response reflects. Defaults to '3991'."
2699
+ "Numeric Target store id whose prices the response reflects. Defaults to '3991'."
2699
2700
  )
2700
2701
  }),
2701
2702
  call: (client, input) => client.target.reviews(input)
2703
+ }),
2704
+ defineScavioTool({
2705
+ key: "scavioTargetAvailability",
2706
+ id: "scavio-target-availability",
2707
+ platform: "target",
2708
+ endpoint: "/api/v1/target/availability",
2709
+ credits: 1,
2710
+ description: "In-store stock for a Target product at every store near a ZIP: units available, in-store, pickup, curbside and ship-to-store status, distance, address and hours. Costs 1 credit.",
2711
+ inputSchema: import_zod16.z.object({
2712
+ tcin: import_zod16.z.string().describe("Target catalog id (tcin, e.g. '85978609')."),
2713
+ zip: import_zod16.z.string().describe("5-digit US ZIP code to search around."),
2714
+ radius: import_zod16.z.number().int().optional().describe("Search radius in miles, 1-100. Defaults to 25. At most 20 stores."),
2715
+ store_id: import_zod16.z.string().optional().describe("Return only this Target store. It must be within radius of zip.")
2716
+ }),
2717
+ call: (client, input) => client.target.availability(input)
2702
2718
  })
2703
2719
  ];
2704
2720
  var createScavioTargetSearchTool = toolFactory(targetToolSpecs, "scavioTargetSearch");
2705
2721
  var createScavioTargetCategoryTool = toolFactory(targetToolSpecs, "scavioTargetCategory");
2706
2722
  var createScavioTargetProductTool = toolFactory(targetToolSpecs, "scavioTargetProduct");
2707
2723
  var createScavioTargetReviewsTool = toolFactory(targetToolSpecs, "scavioTargetReviews");
2724
+ var createScavioTargetAvailabilityTool = toolFactory(targetToolSpecs, "scavioTargetAvailability");
2708
2725
 
2709
2726
  // src/home-depot.ts
2710
2727
  var import_zod17 = require("zod");
@@ -2994,7 +3011,7 @@ var bookingToolSpecs = [
2994
3011
  ),
2995
3012
  rooms: import_zod19.z.number().int().optional().describe("Rooms required, >= 1 (default 1)."),
2996
3013
  currency: import_zod19.z.string().optional().describe(
2997
- "ISO 4217 currency for prices, 3 letters (default 'USD'). Without it Booking prices off the proxy exit and identical requests disagree."
3014
+ "ISO 4217 currency for prices, 3 letters (default 'USD'). Without it Booking picks a currency itself and identical requests can disagree."
2998
3015
  )
2999
3016
  }),
3000
3017
  call: (client, input) => client.booking.search(input)
@@ -3025,7 +3042,7 @@ var bookingToolSpecs = [
3025
3042
  ),
3026
3043
  rooms: import_zod19.z.number().int().optional().describe("Rooms required, >= 1 (default 1)."),
3027
3044
  currency: import_zod19.z.string().optional().describe(
3028
- "ISO 4217 currency for prices, 3 letters (default 'USD'). Without it Booking prices off the proxy exit and identical requests disagree."
3045
+ "ISO 4217 currency for prices, 3 letters (default 'USD'). Without it Booking picks a currency itself and identical requests can disagree."
3029
3046
  )
3030
3047
  }),
3031
3048
  call: (client, input) => client.booking.hotel(input)
@@ -3315,7 +3332,7 @@ var airbnbToolSpecs = [
3315
3332
  "Comma-separated amenities (1-200 characters): wifi, air_conditioning, pool, kitchen, free_parking, washer, self_check_in, tv, or raw numeric Airbnb amenity ids. An unrecognised NAME is rejected before the scrape."
3316
3333
  ),
3317
3334
  currency: import_zod22.z.string().optional().describe(
3318
- "ISO 4217 currency for prices, 3 letters (default 'USD'). Without it Airbnb prices off the proxy exit and identical requests disagree."
3335
+ "ISO 4217 currency for prices, 3 letters (default 'USD'). Without it Airbnb picks a currency itself and identical requests can disagree."
3319
3336
  ),
3320
3337
  page: import_zod22.z.number().int().optional().describe(
3321
3338
  "Results page, 1-based. 18 listings per page. Cannot be combined with cursor."
@@ -3421,7 +3438,7 @@ var glassdoorToolSpecs = [
3421
3438
  description: "Up to THREE full Glassdoor reviews - the cap is Glassdoor's login wall - with per-axis scores, pros, cons, advice, job title, location, employment status and employer response, plus complete rating statistics, star distribution, aggregate pro/con highlight terms and per-job-title review counts. There is no page param: move the window with category and employment_status. Provide employer_id or url. Costs 1 credit.",
3422
3439
  inputSchema: import_zod23.z.object({
3423
3440
  employer_id: import_zod23.z.string().optional().describe(
3424
- "Glassdoor employer id (1-50 characters): '1699', 'E1699' or 'IE1699'. Must be a STRING - a JSON number is rejected. Addressing by id costs two upstream fetches; the customer price is unchanged."
3441
+ "Glassdoor employer id (1-50 characters): '1699', 'E1699' or 'IE1699'. Must be a STRING - a JSON number is rejected. Addressing by id takes an extra lookup; the customer price is unchanged."
3425
3442
  ),
3426
3443
  company: import_zod23.z.string().optional().describe(
3427
3444
  "Employer name as it appears in a Glassdoor slug (1-200 characters). COSMETIC: ignored when url is set, and it does not satisfy the employer_id-or-url requirement."
@@ -3454,7 +3471,7 @@ var glassdoorToolSpecs = [
3454
3471
  description: "Glassdoor salaries by job title, 10 titles per page: base-pay and total-pay percentiles P10-P90 with medians called out, sample counts, currency, pay period and last-reported date. The figures are Glassdoor's ESTIMATES for the title, not individual reported salaries. Provide employer_id or url. Costs 1 credit.",
3455
3472
  inputSchema: import_zod23.z.object({
3456
3473
  employer_id: import_zod23.z.string().optional().describe(
3457
- "Glassdoor employer id (1-50 characters): '1699', 'E1699' or 'IE1699'. Must be a STRING - a JSON number is rejected. Addressing by id costs two upstream fetches; the customer price is unchanged."
3474
+ "Glassdoor employer id (1-50 characters): '1699', 'E1699' or 'IE1699'. Must be a STRING - a JSON number is rejected. Addressing by id takes an extra lookup; the customer price is unchanged."
3458
3475
  ),
3459
3476
  company: import_zod23.z.string().optional().describe(
3460
3477
  "Employer name as it appears in a Glassdoor slug (1-200 characters). COSMETIC: ignored when url is set, and it does not satisfy the employer_id-or-url requirement."
@@ -3501,7 +3518,7 @@ var yelpToolSpecs = [
3501
3518
  "What to look for (1-200 characters): a category ('plumbers'), a dish, or a business name. Required together with location unless url is given."
3502
3519
  ),
3503
3520
  location: import_zod24.z.string().optional().describe(
3504
- "Where to look (1-200 characters): city and region, a full address, or a postcode. Effectively required - Yelp geolocates a location-less search off the proxy exit, so the same request answers about a different metro run to run."
3521
+ "Where to look (1-200 characters): city and region, a full address, or a postcode. Effectively required - without it Yelp picks a location itself, so the same request can answer about a different metro run to run."
3505
3522
  ),
3506
3523
  page: import_zod24.z.number().int().optional().describe(
3507
3524
  "Results page, 1-based. Yelp fixes the page size at 10."
@@ -4793,6 +4810,7 @@ function createScavioTools(config) {
4793
4810
  scavioTargetCategory: createScavioTargetCategoryTool(config),
4794
4811
  scavioTargetProduct: createScavioTargetProductTool(config),
4795
4812
  scavioTargetReviews: createScavioTargetReviewsTool(config),
4813
+ scavioTargetAvailability: createScavioTargetAvailabilityTool(config),
4796
4814
  scavioHomeDepotSearch: createScavioHomeDepotSearchTool(config),
4797
4815
  scavioHomeDepotProduct: createScavioHomeDepotProductTool(config),
4798
4816
  scavioHomeDepotReviews: createScavioHomeDepotReviewsTool(config),
@@ -4989,6 +5007,7 @@ function createScavioTools(config) {
4989
5007
  createScavioSecFilingsTool,
4990
5008
  createScavioSecLookupTool,
4991
5009
  createScavioSecSearchTool,
5010
+ createScavioTargetAvailabilityTool,
4992
5011
  createScavioTargetCategoryTool,
4993
5012
  createScavioTargetProductTool,
4994
5013
  createScavioTargetReviewsTool,