composio-scavio 0.2.0 → 0.4.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
@@ -2,7 +2,30 @@
2
2
 
3
3
  [Scavio](https://scavio.dev) real-time search tools for [Composio](https://composio.dev) (TypeScript).
4
4
 
5
- Scavio is a single Search API over Google, YouTube, Amazon, Walmart, Reddit, TikTok, TikTok Shop, Instagram, X and LinkedIn. This package exposes the Google, YouTube, Amazon, Walmart, Reddit, TikTok and Instagram endpoints as a Composio custom toolkit so your agents can pull structured, up-to-date results across any Composio-supported framework.
5
+ Scavio is a single Search API over 32 platforms -- Google, YouTube, Amazon, Walmart, eBay, Target, Home Depot, Reddit, TikTok, TikTok Shop, Instagram, X, LinkedIn, Threads, Kuaishou, Zillow, Redfin, Booking.com, Airbnb, Tripadvisor, Yelp, Indeed, Glassdoor, the Apple App Store, Google Play, SEC EDGAR, Companies House, G2, Capterra, Google Ads Transparency and the Meta Ad Library -- plus `extract`, which reads any URL as Markdown, plain text or raw HTML. This package exposes **189 tools, one per live endpoint** as a Composio custom toolkit so your agents can pull structured, up-to-date results across any Composio-supported framework.
6
+
7
+ > **New in 0.4.0: 21 more platforms, and they are opt-in.** Registering all 189
8
+ > tools at once buries the handful an agent actually wants, so the verticals
9
+ > added in this release are off by default. The ten original platforms and
10
+ > `extract` stay on (104 tools). Turn a vertical on with its flag --
11
+ > `buildScavioToolkit({ enableZillow: true })` -- or pass `all: true` for
12
+ > everything. Nothing that worked in 0.3.0 changes, except that Walmart grew from
13
+ > 2 tools to 7.
14
+
15
+ > **Walmart was rebuilt (breaking).** Walmart now runs on a scrape.do rebuild:
16
+ > `device`, `delivery_zip` and `store_id` never existed on it and are gone,
17
+ > `start_page` is replaced by `page`, and five endpoints beyond search/product
18
+ > are exposed for the first time (`WALMART_REVIEWS`, `WALMART_CATEGORY`,
19
+ > `WALMART_OFFERS`, `WALMART_SELLER`, `WALMART_SELLER_PRODUCTS`).
20
+ > `WALMART_OFFERS` returns the **buy-box seller only** -- there is no way to page
21
+ > the other sellers -- and `WALMART_SELLER_PRODUCTS` returns roughly the first 40
22
+ > items with no pagination at all.
23
+
24
+ > **Google is v2 only.** `/api/v1/google` was retired on 2026-08-04 and returns
25
+ > 410, so none of its vocabulary survives here. The tools take the v2 params
26
+ > natively: `gl`, `hl`, `google_domain`, `device` and `start`. **`start` is a
27
+ > result offset, not a page number** (0 is page 1, 10 is page 2), and there is no
28
+ > `page` argument mapped onto it -- a silent remap fetches the wrong page.
6
29
 
7
30
  > **Amazon changed (breaking).** The upstream provider moved in 2026-07:
8
31
  > `domain` is replaced by `country`, a two-letter marketplace code (`us`, `gb`
@@ -15,8 +38,9 @@ Scavio is a single Search API over Google, YouTube, Amazon, Walmart, Reddit, Tik
15
38
  > **Reddit search has no filters.** `/reddit/search` accepts only `query` and
16
39
  > `cursor`; the API strips anything else, so the old `type` and `sort` args
17
40
  > narrowed nothing and are removed. It returns `data.results` with `next_cursor`
18
- > and `has_more`. `REDDIT_POST` returns the post itself only -- comments are not
19
- > included.
41
+ > and `has_more`. `REDDIT_POST` returns a flat post object only -- comments come
42
+ > from `REDDIT_POST_COMMENTS`. The subreddit and user feeds do return
43
+ > `data.posts`.
20
44
 
21
45
  ## Install
22
46
 
@@ -24,7 +48,7 @@ Scavio is a single Search API over Google, YouTube, Amazon, Walmart, Reddit, Tik
24
48
  npm install composio-scavio
25
49
  ```
26
50
 
27
- `@composio/core` and `zod` are dependencies. Get a Scavio API key from the [Scavio Dashboard](https://dashboard.scavio.dev) (50 one-time signup credits, no credit card; the free plan does not refill monthly).
51
+ `@composio/core`, `scavio` (>= 0.15.0) and `zod` are dependencies. Get a Scavio API key from the [Scavio Dashboard](https://dashboard.scavio.dev) (50 one-time signup credits, no credit card; the free plan does not refill monthly).
28
52
 
29
53
  ## Usage
30
54
 
@@ -40,6 +64,7 @@ const scavio = buildScavioToolkit({
40
64
  enableGoogle: true,
41
65
  enableAmazon: true,
42
66
  enableTiktok: false,
67
+ enableZillow: true, // opt-in: off unless you ask for it
43
68
  });
44
69
 
45
70
  const session = await composio.create("user_1", {
@@ -50,20 +75,114 @@ const session = await composio.create("user_1", {
50
75
  const tools = await session.tools();
51
76
  const out = await session.execute("LOCAL_SCAVIO_GOOGLE_SEARCH", {
52
77
  query: "best search API for AI agents",
53
- countryCode: "us",
78
+ gl: "us",
54
79
  });
55
80
  console.log(out);
56
81
  ```
57
82
 
83
+ `LOCAL_SCAVIO_EXTRACT` is the agent's "read this page" primitive and is on by default:
84
+
85
+ ```ts
86
+ const page = await session.execute("LOCAL_SCAVIO_EXTRACT", {
87
+ url: "https://example.com/pricing",
88
+ format: "markdown",
89
+ });
90
+ ```
91
+
58
92
  Pass `all: true` to register every tool regardless of the individual flags.
59
93
 
60
94
  ## Tools
61
95
 
62
- All tools are grouped under the `SCAVIO` custom toolkit; agent-facing slugs are prefixed `LOCAL_SCAVIO_` (Composio convention for custom tools). Providers: Google, Amazon (search, product, offers), Walmart (search, product), YouTube (16 tools: search, shorts, suggestions, video, metadata, comments, comment replies, transcript, related, channel search, channel, channel videos, channel shorts, channel community, channel resolve, streams), Reddit (search, post), TikTok (11 tools), Instagram (12 tools). 47 tools total.
96
+ All tools are grouped under the `SCAVIO` custom toolkit; agent-facing slugs are prefixed `LOCAL_SCAVIO_` (Composio convention for custom tools). Every provider is gated by its own flag.
97
+
98
+ ### On by default (104 tools)
99
+
100
+ | Platform | Flag | Tools | Endpoints |
101
+ |---|---|---|---|
102
+ | Google | `enableGoogle` | 14 | search, ai mode, maps search, maps place, maps reviews, shopping, shopping product, shopping stores, flights, hotels, hotels detail, news, trends, trending |
103
+ | Amazon | `enableAmazon` | 4 | search, product, offers, options |
104
+ | Walmart | `enableWalmart` | 7 | search, product, reviews, category, offers, seller, seller products |
105
+ | YouTube | `enableYoutube` | 15 | search, shorts, suggestions, video, comments, comment replies, transcript, related, channel search, channel, channel videos, channel shorts, channel community, channel resolve, streams |
106
+ | Reddit | `enableReddit` | 12 | search, search suggestions, post, post comments, comment replies, subreddit, subreddit posts, user, user posts, user comments, popular, trending |
107
+ | TikTok | `enableTiktok` | 11 | profile, user posts, video, video comments, comment replies, search videos, search users, hashtag, hashtag videos, user followers, user followings |
108
+ | TikTok Shop | `enableTiktokShop` | 8 | search, search suggestions, product, product reviews, categories, category products, shop products, resolve |
109
+ | Instagram | `enableInstagram` | 12 | profile, user posts, user reels, user tagged, user stories, post, post comments, comment replies, search users, search hashtags, user followers, user followings |
110
+ | X (Twitter) | `enableX` | 11 | search, tweet, tweet comments, tweet retweeters, user, user tweets, user replies, user media, user followers, user followings, trending |
111
+ | LinkedIn | `enableLinkedin` | 9 | person, person about, person posts, company, company posts, search jobs, job, post, post comments |
112
+ | Extract (any URL) | `enableExtract` | 1 | extract |
113
+
114
+ ### Opt-in (85 tools)
115
+
116
+ | Platform | Flag | Tools | Endpoints |
117
+ |---|---|---|---|
118
+ | Threads | `enableThreads` | 6 | profile, user posts, user replies, post, post comments, search users |
119
+ | Kuaishou (China) | `enableKuaishou` | 14 | profile, user posts, user live, user resolve, video, video comments, comment replies, videos batch, search, search videos, search users, search live, tag feed, trending |
120
+ | eBay | `enableEbay` | 3 | search, product, seller |
121
+ | Target | `enableTarget` | 4 | search, category, product, reviews |
122
+ | Home Depot | `enableHomeDepot` | 3 | search, product, reviews |
123
+ | Zillow | `enableZillow` | 3 | search, property, agent reviews |
124
+ | Booking.com | `enableBooking` | 3 | search, hotel, reviews |
125
+ | Tripadvisor | `enableTripadvisor` | 4 | locations, search, location, reviews |
126
+ | Indeed | `enableIndeed` | 4 | search, job, company, company reviews |
127
+ | Airbnb | `enableAirbnb` | 3 | search, listing, reviews |
128
+ | Glassdoor | `enableGlassdoor` | 4 | companies, company, reviews, salaries |
129
+ | Yelp | `enableYelp` | 3 | search, business, reviews |
130
+ | Apple App Store | `enableAppStore` | 3 | search, app, reviews |
131
+ | Google Play | `enableGooglePlay` | 3 | search, app, reviews |
132
+ | SEC EDGAR | `enableSec` | 6 | lookup, company, filings, concept, facts, search |
133
+ | Redfin | `enableRedfin` | 3 | search, property, market |
134
+ | Companies House | `enableCompaniesHouse` | 4 | search, company, officers, filing history |
135
+ | G2 | `enableG2` | 3 | search, product, reviews |
136
+ | Capterra | `enableCapterra` | 3 | search, product, reviews |
137
+ | Google Ads Transparency | `enableGoogleAds` | 3 | advertisers, search, creative |
138
+ | Meta Ad Library | `enableMetaAds` | 3 | search, advertiser, ad |
139
+ | **Total** | | **189** | |
140
+
141
+ Two endpoints are deliberately not exposed:
142
+
143
+ - `/youtube/metadata` is a deprecated alias of `/youtube/video`; only `YOUTUBE_VIDEO` is registered.
144
+ - The five retired LinkedIn endpoints (`person/contact`, `company/people`, `company/jobs`, `search/people`, `search/posts`) return 410 unbilled. `LINKEDIN_COMPANY` returns `featured_employees`, a 4-6 person sample, in place of the retired employee directory, and `LINKEDIN_SEARCH_JOBS` with the company name replaces `company/jobs`.
145
+
146
+ ### Resolve first
147
+
148
+ Six tools exist only to turn a name you have into the id everything else on that platform is keyed by. Call them first, or the rest of the platform is unreachable: `SEC_LOOKUP` (ticker to CIK), `GLASSDOOR_COMPANIES` (name to `employer_id`), `TRIPADVISOR_LOCATIONS` (name to `geo_id` + `location_id`), `GOOGLE_ADS_ADVERTISERS` (brand to `advertiser_id`), `COMPANIES_HOUSE_SEARCH` (name to `company_number`) and `KUAISHOU_USER_RESOLVE` (share link to `user_id`).
63
149
 
64
150
  ## Credits
65
151
 
66
- Most endpoints cost 1 credit, including Google (`/api/v2/google`), Reddit, TikTok, Amazon and Walmart. Instagram costs 10 credits per call, except post and comment replies (8) and user posts (2). YouTube search and shorts cost 2, YouTube streams 3, and YouTube transcript 8. See [scavio.dev/docs](https://scavio.dev/docs).
152
+ Every tool states its cost in its description. Most endpoints cost 1 credit.
153
+
154
+ | Platform | Credits |
155
+ |---|---|
156
+ | Google (all 14 v2 endpoints) | 1 |
157
+ | Amazon | 1; `AMAZON_OPTIONS` is free (no key, no credits) |
158
+ | Reddit (all 12) | 1 |
159
+ | TikTok (all 11), TikTok Shop (all 8) | 1 |
160
+ | X (all 11) | 1 |
161
+ | eBay, Target, Zillow, Booking.com, Airbnb, Glassdoor, App Store, SEC EDGAR, Redfin, Companies House, Google Ads, Meta Ads | 1 |
162
+ | Home Depot, Tripadvisor, Indeed, Yelp, Google Play, Capterra | 2 |
163
+ | G2 | 5 |
164
+ | YouTube | 1, except search 2, shorts 2, streams 3, transcript 8 |
165
+ | Instagram | 10, except post 8, comment replies 8, user posts 2 |
166
+ | LinkedIn | 1 for person, person about, company, post; 10 for person posts, company posts, search jobs, post comments; **30 for job** (the most expensive endpoint in the API) |
167
+
168
+ **Four surfaces are body-priced** -- their cost is a function of the request, not a constant for the route, so no single number can be quoted:
169
+
170
+ | Surface | Price |
171
+ |---|---|
172
+ | Walmart | 1 credit on `domain` `com` or `ca`, 2 on `com.mx`. `WALMART_PRODUCT`, `_REVIEWS`, `_OFFERS`, `_SELLER` and `_SELLER_PRODUCTS` take no `domain`, so they are always 1. |
173
+ | Threads | 2 credits addressed by `user_id`, 4 by `username` (the handle has to be resolved through people search first). `THREADS_POST`, `_POST_COMMENTS` and `_SEARCH_USERS` have no username form and are always 2. |
174
+ | Kuaishou | Priced **per endpoint**, never per platform: 1 (`USER_POSTS`, `USER_LIVE`, `USER_RESOLVE`, `VIDEO_COMMENTS`, `COMMENT_REPLIES`, `TAG_FEED`, `TRENDING`), 2 (`VIDEO`), 10 (`PROFILE` and the four searches, per page), 40 (`VIDEOS_BATCH`). |
175
+ | Extract | Tier-priced by `mode`: `normal` and `advanced` 1 credit, `ultra` 2. Only a successful extraction is billed -- a dead link, bot wall or timeout costs nothing. |
176
+
177
+ See [scavio.dev/docs](https://scavio.dev/docs).
178
+
179
+ ## Development
180
+
181
+ ```bash
182
+ npm run build # tsup, CJS + ESM + d.ts
183
+ npm run typecheck # tsc --noEmit
184
+ npm test # vitest run
185
+ ```
67
186
 
68
187
  ## Links
69
188