mastra-scavio 0.3.0 → 0.6.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 +124 -12
- package/dist/index.cjs +4424 -214
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +481 -131
- package/dist/index.d.ts +481 -131
- package/dist/index.js +4218 -210
- package/dist/index.js.map +1 -1
- package/package.json +30 -4
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# mastra-scavio
|
|
2
2
|
|
|
3
|
-
[Scavio](https://scavio.dev) real-time
|
|
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.
|
|
4
4
|
|
|
5
5
|
> **Amazon changed (breaking).** The upstream provider moved in 2026-07:
|
|
6
6
|
> `domain` is replaced by `country`, a two-letter marketplace code (`us`, `gb`
|
|
@@ -38,26 +38,138 @@ const agent = new Agent({
|
|
|
38
38
|
Use a single tool instead of the full set:
|
|
39
39
|
|
|
40
40
|
```typescript
|
|
41
|
-
import { createScavioGoogleSearchTool } from 'mastra-scavio';
|
|
41
|
+
import { createScavioGoogleSearchTool, createScavioLinkedinSearchJobsTool } from 'mastra-scavio';
|
|
42
42
|
|
|
43
43
|
const agent = new Agent({
|
|
44
44
|
id: 'search-agent',
|
|
45
45
|
model: 'anthropic/claude-sonnet-4-6',
|
|
46
|
-
instructions: 'Search Google with Scavio.',
|
|
47
|
-
tools: {
|
|
46
|
+
instructions: 'Search Google and LinkedIn jobs with Scavio.',
|
|
47
|
+
tools: {
|
|
48
|
+
googleSearch: createScavioGoogleSearchTool({ apiKey: process.env.SCAVIO_API_KEY }),
|
|
49
|
+
jobSearch: createScavioLinkedinSearchJobsTool({ apiKey: process.env.SCAVIO_API_KEY }),
|
|
50
|
+
},
|
|
48
51
|
});
|
|
49
52
|
```
|
|
50
53
|
|
|
51
54
|
## Tools
|
|
52
55
|
|
|
53
|
-
`createScavioTools()` returns
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
56
|
+
`createScavioTools()` returns **188 tools** across 31 platforms plus `extract` — one per billable Scavio endpoint. Requires `scavio@^0.15.0`.
|
|
57
|
+
|
|
58
|
+
| Platform | Tools | Names |
|
|
59
|
+
|---|---|---|
|
|
60
|
+
| [Extract (any URL)](https://scavio.dev/docs/extract) | 1 | `scavioExtract` |
|
|
61
|
+
| Google | 14 | `scavioGoogleSearch`, `scavioGoogleAiMode`, `scavioGoogleMapsSearch`, `scavioGoogleMapsPlace`, `scavioGoogleMapsReviews`, `scavioGoogleShopping`, `scavioGoogleShoppingProduct`, `scavioGoogleShoppingStores`, `scavioGoogleFlights`, `scavioGoogleHotels`, `scavioGoogleHotelsDetail`, `scavioGoogleNews`, `scavioGoogleTrends`, `scavioGoogleTrending` |
|
|
62
|
+
| Amazon | 3 | `scavioAmazonSearch`, `scavioAmazonProduct`, `scavioAmazonOffers` |
|
|
63
|
+
| [Walmart](https://scavio.dev/docs/walmart-api) | 7 | `scavioWalmartSearch`, `scavioWalmartProduct`, `scavioWalmartReviews`, `scavioWalmartCategory`, `scavioWalmartOffers`, `scavioWalmartSeller`, `scavioWalmartSellerProducts` |
|
|
64
|
+
| YouTube | 15 | `scavioYoutubeSearch`, `scavioYoutubeShorts`, `scavioYoutubeSuggestions`, `scavioYoutubeVideo`, `scavioYoutubeComments`, `scavioYoutubeCommentReplies`, `scavioYoutubeTranscript`, `scavioYoutubeRelated`, `scavioYoutubeChannelSearch`, `scavioYoutubeChannel`, `scavioYoutubeChannelVideos`, `scavioYoutubeChannelShorts`, `scavioYoutubeChannelCommunity`, `scavioYoutubeChannelResolve`, `scavioYoutubeStreams` |
|
|
65
|
+
| Reddit | 12 | `scavioRedditSearch`, `scavioRedditSearchSuggestions`, `scavioRedditPost`, `scavioRedditPostComments`, `scavioRedditCommentReplies`, `scavioRedditSubreddit`, `scavioRedditSubredditPosts`, `scavioRedditUser`, `scavioRedditUserPosts`, `scavioRedditUserComments`, `scavioRedditPopular`, `scavioRedditTrending` |
|
|
66
|
+
| TikTok | 11 | `scavioTiktokProfile`, `scavioTiktokUserPosts`, `scavioTiktokVideo`, `scavioTiktokVideoComments`, `scavioTiktokCommentReplies`, `scavioTiktokSearchVideos`, `scavioTiktokSearchUsers`, `scavioTiktokHashtag`, `scavioTiktokHashtagVideos`, `scavioTiktokUserFollowers`, `scavioTiktokUserFollowings` |
|
|
67
|
+
| TikTok Shop | 8 | `scavioTiktokShopSearch`, `scavioTiktokShopSearchSuggestions`, `scavioTiktokShopProduct`, `scavioTiktokShopProductReviews`, `scavioTiktokShopCategories`, `scavioTiktokShopCategoryProducts`, `scavioTiktokShopShopProducts`, `scavioTiktokShopResolve` |
|
|
68
|
+
| Instagram | 12 | `scavioInstagramProfile`, `scavioInstagramUserPosts`, `scavioInstagramUserReels`, `scavioInstagramUserTagged`, `scavioInstagramUserStories`, `scavioInstagramPost`, `scavioInstagramPostComments`, `scavioInstagramCommentReplies`, `scavioInstagramSearchUsers`, `scavioInstagramSearchHashtags`, `scavioInstagramUserFollowers`, `scavioInstagramUserFollowings` |
|
|
69
|
+
| X (Twitter) | 11 | `scavioXSearch`, `scavioXTweet`, `scavioXTweetComments`, `scavioXTweetRetweeters`, `scavioXUser`, `scavioXUserTweets`, `scavioXUserReplies`, `scavioXUserMedia`, `scavioXUserFollowers`, `scavioXUserFollowings`, `scavioXTrending` |
|
|
70
|
+
| LinkedIn | 9 | `scavioLinkedinPerson`, `scavioLinkedinPersonAbout`, `scavioLinkedinPersonPosts`, `scavioLinkedinCompany`, `scavioLinkedinCompanyPosts`, `scavioLinkedinSearchJobs`, `scavioLinkedinJob`, `scavioLinkedinPost`, `scavioLinkedinPostComments` |
|
|
71
|
+
| [Threads](https://scavio.dev/docs/threads-profile) | 6 | `scavioThreadsProfile`, `scavioThreadsUserPosts`, `scavioThreadsUserReplies`, `scavioThreadsPost`, `scavioThreadsPostComments`, `scavioThreadsSearchUsers` |
|
|
72
|
+
| [Kuaishou](https://scavio.dev/docs/kuaishou-profile) | 14 | `scavioKuaishouProfile`, `scavioKuaishouUserPosts`, `scavioKuaishouUserLive`, `scavioKuaishouUserResolve`, `scavioKuaishouVideo`, `scavioKuaishouVideoComments`, `scavioKuaishouCommentReplies`, `scavioKuaishouVideosBatch`, `scavioKuaishouSearch`, `scavioKuaishouSearchVideos`, `scavioKuaishouSearchUsers`, `scavioKuaishouSearchLive`, `scavioKuaishouTagFeed`, `scavioKuaishouTrending` |
|
|
73
|
+
| [eBay](https://scavio.dev/docs/ebay-search) | 3 | `scavioEbaySearch`, `scavioEbayProduct`, `scavioEbaySeller` |
|
|
74
|
+
| [Target](https://scavio.dev/docs/target-search) | 4 | `scavioTargetSearch`, `scavioTargetCategory`, `scavioTargetProduct`, `scavioTargetReviews` |
|
|
75
|
+
| [Home Depot](https://scavio.dev/docs/home-depot-search) | 3 | `scavioHomeDepotSearch`, `scavioHomeDepotProduct`, `scavioHomeDepotReviews` |
|
|
76
|
+
| [Zillow](https://scavio.dev/docs/zillow-search) | 3 | `scavioZillowSearch`, `scavioZillowProperty`, `scavioZillowAgentReviews` |
|
|
77
|
+
| [Booking.com](https://scavio.dev/docs/booking-search) | 3 | `scavioBookingSearch`, `scavioBookingHotel`, `scavioBookingReviews` |
|
|
78
|
+
| [Tripadvisor](https://scavio.dev/docs/tripadvisor-locations) | 4 | `scavioTripadvisorLocations`, `scavioTripadvisorSearch`, `scavioTripadvisorLocation`, `scavioTripadvisorReviews` |
|
|
79
|
+
| [Indeed](https://scavio.dev/docs/indeed-search) | 4 | `scavioIndeedSearch`, `scavioIndeedJob`, `scavioIndeedCompany`, `scavioIndeedCompanyReviews` |
|
|
80
|
+
| [Airbnb](https://scavio.dev/docs/airbnb-search) | 3 | `scavioAirbnbSearch`, `scavioAirbnbListing`, `scavioAirbnbReviews` |
|
|
81
|
+
| [Glassdoor](https://scavio.dev/docs/glassdoor-companies) | 4 | `scavioGlassdoorCompanies`, `scavioGlassdoorCompany`, `scavioGlassdoorReviews`, `scavioGlassdoorSalaries` |
|
|
82
|
+
| [Yelp](https://scavio.dev/docs/yelp-search) | 3 | `scavioYelpSearch`, `scavioYelpBusiness`, `scavioYelpReviews` |
|
|
83
|
+
| [App Store](https://scavio.dev/docs/app-store-search) | 3 | `scavioAppStoreSearch`, `scavioAppStoreApp`, `scavioAppStoreReviews` |
|
|
84
|
+
| [Google Play](https://scavio.dev/docs/google-play-search) | 3 | `scavioGooglePlaySearch`, `scavioGooglePlayApp`, `scavioGooglePlayReviews` |
|
|
85
|
+
| [SEC EDGAR](https://scavio.dev/docs/sec-edgar-lookup) | 6 | `scavioSecLookup`, `scavioSecCompany`, `scavioSecFilings`, `scavioSecConcept`, `scavioSecFacts`, `scavioSecSearch` |
|
|
86
|
+
| [Redfin](https://scavio.dev/docs/redfin-search) | 3 | `scavioRedfinSearch`, `scavioRedfinProperty`, `scavioRedfinMarket` |
|
|
87
|
+
| [Companies House](https://scavio.dev/docs/companies-house-search) | 4 | `scavioCompaniesHouseSearch`, `scavioCompaniesHouseCompany`, `scavioCompaniesHouseOfficers`, `scavioCompaniesHouseFilingHistory` |
|
|
88
|
+
| [G2](https://scavio.dev/docs/g2-search) | 3 | `scavioG2Search`, `scavioG2Product`, `scavioG2Reviews` |
|
|
89
|
+
| [Capterra Software Reviews](https://scavio.dev/docs/capterra-search) | 3 | `scavioCapterraSearch`, `scavioCapterraProduct`, `scavioCapterraReviews` |
|
|
90
|
+
| [Google Ads Transparency](https://scavio.dev/docs/google-ads-advertisers) | 3 | `scavioGoogleAdsAdvertisers`, `scavioGoogleAdsSearch`, `scavioGoogleAdsCreative` |
|
|
91
|
+
| [Meta Ad Library](https://scavio.dev/docs/meta-ads-search) | 3 | `scavioMetaAdsSearch`, `scavioMetaAdsAdvertiser`, `scavioMetaAdsAd` |
|
|
92
|
+
|
|
93
|
+
Every tool is also exported individually as `createScavio<Name>Tool`.
|
|
94
|
+
|
|
95
|
+
Each tool returns the structured Scavio JSON response: `{ data, response_time, credits_used, credits_remaining }`, with the payload under `data` on every platform except Google, whose body is flat (read `organic_results` at the top level).
|
|
96
|
+
|
|
97
|
+
### Endpoints deliberately not exposed
|
|
98
|
+
|
|
99
|
+
- `/api/v1/youtube/metadata` is a byte-identical deprecated alias of `/api/v1/youtube/video`. Only `scavioYoutubeVideo` ships, so an agent is not asked to pick between two tools that do the same thing. (`scavioYoutubeMetadata` was removed in 0.4.0.)
|
|
100
|
+
- LinkedIn `person/contact`, `company/people`, `company/jobs`, `search/people` and `search/posts` were retired upstream and answer HTTP 410 unbilled. `scavioLinkedinCompany` returns `featured_employees` (a 4-6 person sample) in place of `company/people`, and `scavioLinkedinSearchJobs` with the company name replaces `company/jobs`.
|
|
101
|
+
- `/api/v1/google` (Google v1) was retired on 2026-08-04 and answers 410. The Google tools speak v2 natively — `gl`, `hl`, `start`, `google_domain`, `device`. `start` is a 0-based result offset (0 is page 1, 10 is page 2), not a page number, so no `page` parameter is offered.
|
|
102
|
+
|
|
103
|
+
- Google Play `search` and App Store `search` do not paginate: raise `limit` (App Store, up to 200) or take the one shelf Play serves. No `page` parameter is offered because neither store honours one.
|
|
104
|
+
- Glassdoor `reviews` caps at three reviews per response — that is Glassdoor's login wall, not a parameter — so no `page` is offered there either. Move the window with `category` and `employment_status`.
|
|
105
|
+
|
|
106
|
+
Everything else the Scavio API bills for has a tool here. The same endpoints are also available directly via the [`scavio`](https://www.npmjs.com/package/scavio) SDK or the [MCP server](https://scavio.dev/docs).
|
|
107
|
+
|
|
108
|
+
### Renamed in 0.5.0
|
|
109
|
+
|
|
110
|
+
Reddit, TikTok and Instagram shipped two tools each before 0.5.0; the rest of their endpoints are new in this release. Two of the four old names were ambiguous once their siblings landed and were renamed:
|
|
111
|
+
|
|
112
|
+
| Before 0.5.0 | Now |
|
|
113
|
+
|---|---|
|
|
114
|
+
| `scavioTiktokSearch` / `createScavioTiktokSearchTool` | `scavioTiktokSearchVideos` / `createScavioTiktokSearchVideosTool` (there is now a `scavioTiktokSearchUsers` too) |
|
|
115
|
+
| `scavioInstagramSearch` / `createScavioInstagramSearchTool` | `scavioInstagramSearchUsers` / `createScavioInstagramSearchUsersTool` (there is now a `scavioInstagramSearchHashtags` too) |
|
|
116
|
+
|
|
117
|
+
`scavioRedditSearch`, `scavioRedditPost`, `scavioTiktokProfile` and `scavioInstagramProfile` are unchanged.
|
|
118
|
+
|
|
119
|
+
### New in 0.6.0
|
|
120
|
+
|
|
121
|
+
91 tools: 21 new platforms, five more Walmart endpoints, and `scavioExtract`. Nothing was renamed or removed. Three things worth knowing:
|
|
122
|
+
|
|
123
|
+
- **Requires `scavio@^0.15.0`.** An older SDK has none of the new namespaces, and every new tool fails at build.
|
|
124
|
+
- **`scavioExtract` is the fallback for everything else.** It reads any URL and returns clean Markdown (or plain text, or raw HTML), so an agent that lands on a page no platform endpoint covers still has a move. It leads `createScavioTools()` for that reason, and it is a top-level SDK method — `scavio.extract({ url })`, never `scavio.extract.extract()`.
|
|
125
|
+
- **Walmart moved from 2 tools to 7** and its two original tools were migrated to the spec pattern the rest of the package uses. `createScavioWalmartSearchTool` and `createScavioWalmartProductTool` keep their names and tool ids. One input tightened: `sort_by` on the search tool was an open string and is now the closed enum the API actually accepts (`best_match`, `price_low`, `price_high`, `best_seller`, `rating_high`, `new`) — a value outside it was never honoured upstream, it was just billed.
|
|
60
126
|
|
|
61
127
|
## Credits
|
|
62
128
|
|
|
63
|
-
Most calls cost 1 credit
|
|
129
|
+
Most calls cost 1 credit. Every tool states its own cost in its description, so an agent can budget before it fans out.
|
|
130
|
+
|
|
131
|
+
| Tool | Credits |
|
|
132
|
+
|---|---|
|
|
133
|
+
| All Google, Amazon, Reddit, TikTok, TikTok Shop and X tools | 1 |
|
|
134
|
+
| All eBay, Target, Zillow, Redfin, Booking.com, Airbnb, App Store, SEC EDGAR, Companies House, Google Ads Transparency and Meta Ad Library tools | 1 |
|
|
135
|
+
| All Home Depot, Tripadvisor, Indeed, Yelp, Google Play and Capterra tools | 2 |
|
|
136
|
+
| All G2 tools | 5 |
|
|
137
|
+
| `scavioKuaishouVideo` | 2 |
|
|
138
|
+
| `scavioKuaishouProfile`, `scavioKuaishouSearch`, `scavioKuaishouSearchVideos`, `scavioKuaishouSearchUsers`, `scavioKuaishouSearchLive` | 10 |
|
|
139
|
+
| `scavioKuaishouVideosBatch` | 40 |
|
|
140
|
+
| All other Kuaishou tools | 1 |
|
|
141
|
+
| `scavioYoutubeSearch`, `scavioYoutubeShorts` | 2 |
|
|
142
|
+
| `scavioYoutubeStreams` | 3 |
|
|
143
|
+
| `scavioYoutubeTranscript` | 8 |
|
|
144
|
+
| All other YouTube tools | 1 |
|
|
145
|
+
| `scavioLinkedinPerson`, `scavioLinkedinPersonAbout`, `scavioLinkedinCompany`, `scavioLinkedinPost` | 1 |
|
|
146
|
+
| `scavioLinkedinPersonPosts`, `scavioLinkedinCompanyPosts`, `scavioLinkedinSearchJobs`, `scavioLinkedinPostComments` | 10 |
|
|
147
|
+
| `scavioLinkedinJob` | 30 |
|
|
148
|
+
| `scavioInstagramUserPosts` | 2 |
|
|
149
|
+
| `scavioInstagramPost`, `scavioInstagramCommentReplies` | 8 |
|
|
150
|
+
| All other Instagram tools | 10 |
|
|
151
|
+
|
|
152
|
+
Instagram is priced per endpoint rather than flat, on three tiers: 10 where both upstream legs are billed, 8 for the two calls with no fallback leg to hedge (`scavioInstagramPost`, `scavioInstagramCommentReplies`), and 2 for `scavioInstagramUserPosts`, whose cheap leg is the primary one. Prefer `scavioInstagramUserPosts` over `scavioInstagramUserReels` when the timeline will do — same shape of data, one fifth of the cost. Paginated tools bill per page. See [scavio.dev/docs](https://scavio.dev/docs).
|
|
153
|
+
|
|
154
|
+
### Four surfaces are priced by the request body
|
|
155
|
+
|
|
156
|
+
No single number is true for these, so each tool states its own price and none of them says a flat cost:
|
|
157
|
+
|
|
158
|
+
| Surface | Price |
|
|
159
|
+
|---|---|
|
|
160
|
+
| `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. |
|
|
161
|
+
| `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. |
|
|
162
|
+
| Kuaishou | **Per endpoint, 1 to 40.** See the table above; one platform-wide figure would be wrong by up to 40x. |
|
|
163
|
+
| `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. |
|
|
164
|
+
|
|
165
|
+
### Lookup-first platforms
|
|
166
|
+
|
|
167
|
+
Five platforms are keyed by ids that exist only inside their own URLs, so a caller holding a *name* has to resolve it before anything else will answer:
|
|
168
|
+
|
|
169
|
+
| Platform | Start with |
|
|
170
|
+
|---|---|
|
|
171
|
+
| Tripadvisor | `scavioTripadvisorLocations` |
|
|
172
|
+
| Glassdoor | `scavioGlassdoorCompanies` |
|
|
173
|
+
| SEC EDGAR | `scavioSecLookup` |
|
|
174
|
+
| Companies House | `scavioCompaniesHouseSearch` |
|
|
175
|
+
| Google Ads Transparency | `scavioGoogleAdsAdvertisers` |
|