composio-scavio 0.4.1 → 0.5.1
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 +69 -7
- package/dist/index.cjs +138 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +10 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +138 -3
- package/dist/index.js.map +1 -1
- package/package.json +6 -3
package/README.md
CHANGED
|
@@ -2,7 +2,11 @@
|
|
|
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 31 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 **
|
|
5
|
+
Scavio is a single Search API over 31 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 **194 tools** -- one per live endpoint plus five website tools that map, crawl and batch-extract whole sites -- 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.5.0: website map, crawl and batch.** Five opt-in tools behind
|
|
8
|
+
> `enableCrawl` -- see [Map, crawl and batch](#map-crawl-and-batch). Needs
|
|
9
|
+
> `scavio` >= 0.23.0; the default tool set is unchanged.
|
|
6
10
|
|
|
7
11
|
> **New in 0.4.0: 21 more platforms, and they are opt-in.** Registering all 189
|
|
8
12
|
> tools at once buries the handful an agent actually wants, so the verticals
|
|
@@ -12,7 +16,7 @@ Scavio is a single Search API over 31 platforms -- Google, YouTube, Amazon, Walm
|
|
|
12
16
|
> everything. Nothing that worked in 0.3.0 changes, except that Walmart grew from
|
|
13
17
|
> 2 tools to 7.
|
|
14
18
|
|
|
15
|
-
> **Walmart was rebuilt (breaking)
|
|
19
|
+
> **Walmart was rebuilt (breaking):**
|
|
16
20
|
> `device`, `delivery_zip` and `store_id` never existed on it and are gone,
|
|
17
21
|
> `start_page` is replaced by `page`, and five endpoints beyond search/product
|
|
18
22
|
> are exposed for the first time (`WALMART_REVIEWS`, `WALMART_CATEGORY`,
|
|
@@ -48,7 +52,7 @@ Scavio is a single Search API over 31 platforms -- Google, YouTube, Amazon, Walm
|
|
|
48
52
|
npm install composio-scavio
|
|
49
53
|
```
|
|
50
54
|
|
|
51
|
-
`@composio/core`, `scavio` (>= 0.
|
|
55
|
+
`@composio/core`, `scavio` (>= 0.23.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).
|
|
52
56
|
|
|
53
57
|
## Usage
|
|
54
58
|
|
|
@@ -111,7 +115,7 @@ All tools are grouped under the `SCAVIO` custom toolkit; agent-facing slugs are
|
|
|
111
115
|
| LinkedIn | `enableLinkedin` | 9 | person, person about, person posts, company, company posts, search jobs, job, post, post comments |
|
|
112
116
|
| Extract (any URL) | `enableExtract` | 1 | extract |
|
|
113
117
|
|
|
114
|
-
### Opt-in (
|
|
118
|
+
### Opt-in (90 tools)
|
|
115
119
|
|
|
116
120
|
| Platform | Flag | Tools | Endpoints |
|
|
117
121
|
|---|---|---|---|
|
|
@@ -136,7 +140,8 @@ All tools are grouped under the `SCAVIO` custom toolkit; agent-facing slugs are
|
|
|
136
140
|
| Capterra | `enableCapterra` | 3 | search, product, reviews |
|
|
137
141
|
| Google Ads Transparency | `enableGoogleAds` | 3 | advertisers, search, creative |
|
|
138
142
|
| Meta Ad Library | `enableMetaAds` | 3 | search, advertiser, ad |
|
|
139
|
-
|
|
|
143
|
+
| Website map, crawl, batch | `enableCrawl` | 5 | map website, crawl website, crawl status, batch extract, batch status |
|
|
144
|
+
| **Total** | | **194** | |
|
|
140
145
|
|
|
141
146
|
Two endpoints are deliberately not exposed:
|
|
142
147
|
|
|
@@ -147,6 +152,61 @@ Two endpoints are deliberately not exposed:
|
|
|
147
152
|
|
|
148
153
|
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`).
|
|
149
154
|
|
|
155
|
+
## Map, crawl and batch
|
|
156
|
+
|
|
157
|
+
Five opt-in tools for whole sites, behind `enableCrawl` (off by default, because a
|
|
158
|
+
crawl bills per page):
|
|
159
|
+
|
|
160
|
+
| Tool | What it does | Credits |
|
|
161
|
+
|---|---|---|
|
|
162
|
+
| `LOCAL_SCAVIO_MAP_WEBSITE` | List a site's page URLs from its sitemaps and start page, deduplicated and filtered by path or search words | 1 (normal mode; advanced up to 2, ultra up to 10) |
|
|
163
|
+
| `LOCAL_SCAVIO_CRAWL_WEBSITE` | Crawl a site from one URL; every same-site page as Markdown, text or HTML | per successful page |
|
|
164
|
+
| `LOCAL_SCAVIO_CRAWL_STATUS` | A crawl's progress and page results, cursor-paged | free |
|
|
165
|
+
| `LOCAL_SCAVIO_BATCH_EXTRACT` | Extract a list of URLs (up to 1,000, plan-limited) in one job | per successful page |
|
|
166
|
+
| `LOCAL_SCAVIO_BATCH_STATUS` | A batch's progress and page results, cursor-paged | free |
|
|
167
|
+
|
|
168
|
+
Map answers in one call. Crawl and batch run as background jobs: the start tool
|
|
169
|
+
posts the job and then **waits up to `wait_seconds` (default 45, max 300)** for
|
|
170
|
+
it to finish, returning the job's status with its first page of results (10 by
|
|
171
|
+
default, `limit` up to 100) either way. A job still `queued` or `running` when
|
|
172
|
+
the wait ends keeps going server-side: read the rest later with the matching
|
|
173
|
+
status tool, the returned `data.id` and `next_cursor`. That keeps an agent turn
|
|
174
|
+
bounded while a large crawl (up to 6 hours) runs on.
|
|
175
|
+
|
|
176
|
+
```ts
|
|
177
|
+
const scavio = buildScavioToolkit({ enableCrawl: true });
|
|
178
|
+
const session = await composio.create("user_1", {
|
|
179
|
+
experimental: { customToolkits: [scavio] },
|
|
180
|
+
});
|
|
181
|
+
|
|
182
|
+
const links = await session.execute("LOCAL_SCAVIO_MAP_WEBSITE", { url: "https://hono.dev/docs", limit: 50 });
|
|
183
|
+
const job = await session.execute("LOCAL_SCAVIO_CRAWL_WEBSITE", {
|
|
184
|
+
url: "https://hono.dev/docs",
|
|
185
|
+
max_pages: 25,
|
|
186
|
+
include_paths: ["/docs/**"],
|
|
187
|
+
});
|
|
188
|
+
// -> { data: { id, status: "completed" | "running", pages, credits_used, results, next_cursor } }
|
|
189
|
+
// Page on, or pick up a job that outlived the wait (free):
|
|
190
|
+
await session.execute("LOCAL_SCAVIO_CRAWL_STATUS", { id: "<data.id>", cursor: "<data.next_cursor>" });
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
`pollIntervalMs` (default 3000) sets how often a waiting tool checks its job.
|
|
194
|
+
|
|
195
|
+
**Pricing.** Crawl and batch bill **per successful page** at Extract's price for
|
|
196
|
+
the mode: `normal` (the standard fetch) and `advanced` (renders JavaScript-built
|
|
197
|
+
pages) 1 credit, `ultra` (the hardest pages) 2. Failed and skipped pages are
|
|
198
|
+
free, and if your balance runs out the job stops cleanly with
|
|
199
|
+
`stopped_reason: "insufficient_credits"`. Reading a job is free. Crawl and map
|
|
200
|
+
obey the site's robots.txt, and results are kept for 3 days.
|
|
201
|
+
|
|
202
|
+
**Plan limits** (pages per crawl / active jobs / URLs per batch): Free 10/1/10,
|
|
203
|
+
PAYG 100/1/50, Project 500/2/100, Bootstrap 2,000/3/500, Startup 5,000/5/1,000,
|
|
204
|
+
Growth 10,000/10/1,000.
|
|
205
|
+
|
|
206
|
+
Cancellation, webhooks (signed `Scavio-Signature`) and idempotency keys exist in
|
|
207
|
+
the `scavio` SDK (`extract.cancelCrawl`, `webhook_url`, `idempotencyKey`) and the
|
|
208
|
+
[REST API](https://scavio.dev/docs/extract), but are deliberately not agent tools.
|
|
209
|
+
|
|
150
210
|
## Credits
|
|
151
211
|
|
|
152
212
|
Every tool states its cost in its description. Most endpoints cost 1 credit.
|
|
@@ -161,11 +221,11 @@ Every tool states its cost in its description. Most endpoints cost 1 credit.
|
|
|
161
221
|
| eBay, Target, Zillow, Booking.com, Airbnb, Glassdoor, App Store, SEC EDGAR, Redfin, Companies House, Google Ads, Meta Ads | 1 |
|
|
162
222
|
| Home Depot, Tripadvisor, Indeed, Yelp, Google Play, Capterra | 2 |
|
|
163
223
|
| G2 | 5 |
|
|
164
|
-
| YouTube | 1, except search 2, shorts 2, streams 3, transcript
|
|
224
|
+
| YouTube | 1, except search 2, shorts 2, streams 3, transcript 5 |
|
|
165
225
|
| Instagram | 10, except post 8, comment replies 8, user posts 2 |
|
|
166
226
|
| 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
227
|
|
|
168
|
-
**
|
|
228
|
+
**These 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
229
|
|
|
170
230
|
| Surface | Price |
|
|
171
231
|
|---|---|
|
|
@@ -173,6 +233,8 @@ Every tool states its cost in its description. Most endpoints cost 1 credit.
|
|
|
173
233
|
| 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
234
|
| 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
235
|
| 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. |
|
|
236
|
+
| Map website | 1 credit on `normal`; up to 2 on `advanced`, up to 10 on `ultra`, priced by what the call needed. |
|
|
237
|
+
| Crawl website, batch extract | **Per successful page** at Extract's price for the mode (1 / 1 / 2). Failed and skipped pages are free; `CRAWL_STATUS` and `BATCH_STATUS` cost nothing. |
|
|
176
238
|
|
|
177
239
|
See [scavio.dev/docs](https://scavio.dev/docs).
|
|
178
240
|
|
package/dist/index.cjs
CHANGED
|
@@ -44,6 +44,53 @@ var device = ostr("Device to emulate: 'desktop' or 'mobile'.");
|
|
|
44
44
|
var currency = ostr("Currency code (ISO 4217, e.g. 'USD').");
|
|
45
45
|
var checkInDate = str("Check-in date (YYYY-MM-DD).");
|
|
46
46
|
var checkOutDate = str("Check-out date (YYYY-MM-DD).");
|
|
47
|
+
var JOB_POLL_INTERVAL_MS = 3e3;
|
|
48
|
+
var JOB_WAIT_DEFAULT_SECONDS = 45;
|
|
49
|
+
var JOB_WAIT_MAX_SECONDS = 300;
|
|
50
|
+
var JOB_RESULTS_DEFAULT_LIMIT = 10;
|
|
51
|
+
var JOB_TERMINAL = /* @__PURE__ */ new Set(["completed", "failed", "cancelled"]);
|
|
52
|
+
var sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
53
|
+
async function waitForJob(status, id, waitSeconds, pollMs, query) {
|
|
54
|
+
const deadline = Date.now() + Math.max(0, Math.min(waitSeconds, JOB_WAIT_MAX_SECONDS)) * 1e3;
|
|
55
|
+
for (; ; ) {
|
|
56
|
+
const remaining = deadline - Date.now();
|
|
57
|
+
if (remaining <= 0) break;
|
|
58
|
+
await sleep(Math.min(pollMs, remaining));
|
|
59
|
+
const probe = await status(id, { limit: 1, include_content: false });
|
|
60
|
+
if (JOB_TERMINAL.has(String(probe?.data?.status))) break;
|
|
61
|
+
}
|
|
62
|
+
return await status(id, query);
|
|
63
|
+
}
|
|
64
|
+
async function startAndWait(start, status, input, pollMs) {
|
|
65
|
+
const { wait_seconds, limit, include_content, ...body } = input;
|
|
66
|
+
const created = await start(body);
|
|
67
|
+
const id = created?.data?.id;
|
|
68
|
+
const wait = wait_seconds ?? JOB_WAIT_DEFAULT_SECONDS;
|
|
69
|
+
if (!id || wait <= 0) return created;
|
|
70
|
+
const query = { limit: limit ?? JOB_RESULTS_DEFAULT_LIMIT };
|
|
71
|
+
if (include_content !== void 0) query.include_content = include_content;
|
|
72
|
+
return waitForJob(status, id, wait, pollMs, query);
|
|
73
|
+
}
|
|
74
|
+
var JOB_MODE = ostr(
|
|
75
|
+
"Fetch tier, and the price-bearing parameter: 'normal' is the standard fetch, 'advanced' renders JavaScript-built pages, 'ultra' reaches the hardest pages. Server default 'normal'."
|
|
76
|
+
);
|
|
77
|
+
var JOB_PATHS = "Path globs (max 20). '*' matches within one path segment, '**' across segments; a pattern without wildcards matches that path and everything under it. Example: ['/blog/**'].";
|
|
78
|
+
var JOB_PRICE = "Billed per SUCCESSFUL page at Extract's price for the mode: 'normal' and 'advanced' 1 credit, 'ultra' 2 credits. Failed and skipped pages are free, and if the balance runs out the job stops cleanly.";
|
|
79
|
+
var JOB_FORMAT = ostr("Format for each page, as on extract: 'html', 'markdown' or 'text' (server default 'markdown').");
|
|
80
|
+
var JOB_WAIT = onum(
|
|
81
|
+
"Seconds to wait for the job to finish before returning, 0-300 (default 45). 0 returns the job id at once. A job still running when the wait ends keeps going; read it later with its status tool."
|
|
82
|
+
);
|
|
83
|
+
var JOB_LIMIT = onum(
|
|
84
|
+
"Results per response, 1-100 (default 10, to keep page content inside the context window); page on with next_cursor."
|
|
85
|
+
);
|
|
86
|
+
var JOB_INCLUDE_CONTENT = obool("Set false to list results without their page content (default true).");
|
|
87
|
+
var JOB_STATUS_PARAMS = import_zod.z.object({
|
|
88
|
+
id: str("Job id returned when the job was started (data.id)."),
|
|
89
|
+
cursor: ostr("next_cursor from the previous response, to read the next page."),
|
|
90
|
+
limit: JOB_LIMIT,
|
|
91
|
+
status: ostr("Only results with this status: 'succeeded', 'failed' or 'skipped'."),
|
|
92
|
+
include_content: JOB_INCLUDE_CONTENT
|
|
93
|
+
});
|
|
47
94
|
function buildScavioToolkit(options = {}) {
|
|
48
95
|
const {
|
|
49
96
|
apiKey,
|
|
@@ -79,6 +126,8 @@ function buildScavioToolkit(options = {}) {
|
|
|
79
126
|
enableCapterra = false,
|
|
80
127
|
enableGoogleAds = false,
|
|
81
128
|
enableMetaAds = false,
|
|
129
|
+
enableCrawl = false,
|
|
130
|
+
pollIntervalMs = JOB_POLL_INTERVAL_MS,
|
|
82
131
|
all = false
|
|
83
132
|
} = options;
|
|
84
133
|
const client = new import_scavio.Scavio({ apiKey: apiKey ?? process.env.SCAVIO_API_KEY });
|
|
@@ -532,7 +581,7 @@ function buildScavioToolkit(options = {}) {
|
|
|
532
581
|
tool(
|
|
533
582
|
"YOUTUBE_TRANSCRIPT",
|
|
534
583
|
"Scavio YouTube Transcript",
|
|
535
|
-
"Fetch the transcript or timed captions for a YouTube video. Costs
|
|
584
|
+
"Fetch the transcript or timed captions for a YouTube video. Costs 5 credits.",
|
|
536
585
|
import_zod.z.object({
|
|
537
586
|
video_id: str("YouTube video id or a full watch URL."),
|
|
538
587
|
language: ostr("Caption language code (default 'en')."),
|
|
@@ -2428,15 +2477,101 @@ function buildScavioToolkit(options = {}) {
|
|
|
2428
2477
|
import_zod.z.object({
|
|
2429
2478
|
url: str("Page to read (1-2048 characters). http(s) only; a bare host is upgraded to https, and loopback, private, link-local and metadata hosts are rejected with a 400."),
|
|
2430
2479
|
format: ostr("Output format: 'html' is the raw page, 'markdown' a readability extraction, 'text' that markdown flattened to plain text (server default 'markdown')."),
|
|
2431
|
-
mode: ostr("Fetch tier, and the price-bearing parameter: 'normal'
|
|
2480
|
+
mode: ostr("Fetch tier, and the price-bearing parameter: 'normal' is the standard fetch (1 credit), 'advanced' renders JavaScript-built pages (1 credit), 'ultra' reaches the hardest pages (2 credits). Server default 'normal'.")
|
|
2432
2481
|
}),
|
|
2433
2482
|
(i) => client.extract(i)
|
|
2434
2483
|
)
|
|
2435
2484
|
);
|
|
2436
2485
|
}
|
|
2486
|
+
if (all || enableCrawl) {
|
|
2487
|
+
const crawlStatus = (id, q) => client.extract.crawlStatus(id, q);
|
|
2488
|
+
const batchStatus = (id, q) => client.extract.batchStatus(id, q);
|
|
2489
|
+
const readStatus = (status) => async ({ id, limit, ...q }) => await status(id, {
|
|
2490
|
+
...q,
|
|
2491
|
+
limit: limit ?? JOB_RESULTS_DEFAULT_LIMIT
|
|
2492
|
+
});
|
|
2493
|
+
tools.push(
|
|
2494
|
+
tool(
|
|
2495
|
+
"MAP_WEBSITE",
|
|
2496
|
+
"Scavio Map Website",
|
|
2497
|
+
"List a website's page URLs, gathered from its sitemaps and its start page, deduplicated, filtered by path or search words and limited: { url, links: [{ url, source, lastmod }], total_found, returned, truncated }. Pages the site's robots.txt disallows are left out. Use it to find the right pages before extracting or crawling. Costs 1 credit in normal mode; advanced costs up to 2 credits and ultra up to 10, priced by what the call needed.",
|
|
2498
|
+
import_zod.z.object({
|
|
2499
|
+
url: str("The site to map. A bare host is upgraded to https."),
|
|
2500
|
+
search: ostr("Only return URLs containing every word of this text (case-insensitive)."),
|
|
2501
|
+
limit: onum("Maximum links to return, 1-5000. Default 1000 (or the plan's limit if lower: Free 500, PAYG 1,000, paid plans 5,000)."),
|
|
2502
|
+
sitemap: ostr("'include' combines the site's sitemaps with the start page's links (default); 'only' uses sitemaps alone; 'skip' uses page links alone."),
|
|
2503
|
+
include_subdomains: obool("Also return URLs on subdomains of the site (default false)."),
|
|
2504
|
+
include_paths: oarrstr("Keep only URLs matching these. " + JOB_PATHS),
|
|
2505
|
+
exclude_paths: oarrstr("Drop URLs matching these. " + JOB_PATHS),
|
|
2506
|
+
ignore_query_parameters: obool("Treat URLs that differ only by query string as one URL (default true)."),
|
|
2507
|
+
mode: JOB_MODE
|
|
2508
|
+
}),
|
|
2509
|
+
async (i) => await client.extract.map(i)
|
|
2510
|
+
),
|
|
2511
|
+
tool(
|
|
2512
|
+
"CRAWL_WEBSITE",
|
|
2513
|
+
"Scavio Crawl Website",
|
|
2514
|
+
"Crawl a website from one start URL: same-site pages are discovered and extracted breadth-first within the page, depth and path limits, each returned as Markdown, text or HTML. Pages the site's robots.txt disallows are skipped. Waits up to wait_seconds (default 45) and returns { id, status, pages, credits_used, results, next_cursor }; if status is still queued or running, call LOCAL_SCAVIO_CRAWL_STATUS with the id later. " + JOB_PRICE,
|
|
2515
|
+
import_zod.z.object({
|
|
2516
|
+
url: str("Where the crawl starts. Only pages on the same site are crawled."),
|
|
2517
|
+
max_pages: onum("Maximum pages to fetch. Default 100. Plan limits: Free 10, PAYG 100, Project 500, Bootstrap 2,000, Startup 5,000, Growth 10,000."),
|
|
2518
|
+
max_depth: onum("How many links away from the start page to follow, 0-10 (default 3). 0 fetches only the start page."),
|
|
2519
|
+
include_paths: oarrstr("Crawl only paths matching these. " + JOB_PATHS),
|
|
2520
|
+
exclude_paths: oarrstr("Skip paths matching these. " + JOB_PATHS),
|
|
2521
|
+
allow_subdomains: obool("Also crawl subdomains of the site (default false)."),
|
|
2522
|
+
ignore_query_parameters: obool("Treat URLs that differ only by query string as one page (default true)."),
|
|
2523
|
+
sitemap: ostr("'include' also starts from the site's sitemap (default); 'skip' follows links only; 'only' fetches sitemap pages without following links."),
|
|
2524
|
+
format: JOB_FORMAT,
|
|
2525
|
+
mode: JOB_MODE,
|
|
2526
|
+
wait_seconds: JOB_WAIT,
|
|
2527
|
+
limit: JOB_LIMIT,
|
|
2528
|
+
include_content: JOB_INCLUDE_CONTENT
|
|
2529
|
+
}),
|
|
2530
|
+
(i) => startAndWait(
|
|
2531
|
+
(body) => client.extract.crawl(body),
|
|
2532
|
+
crawlStatus,
|
|
2533
|
+
i,
|
|
2534
|
+
pollIntervalMs
|
|
2535
|
+
)
|
|
2536
|
+
),
|
|
2537
|
+
tool(
|
|
2538
|
+
"CRAWL_STATUS",
|
|
2539
|
+
"Scavio Crawl Status",
|
|
2540
|
+
"Read a crawl's progress and its page results by job id, paged by cursor: { status, stopped_reason, pages, credits_used, results: [{ url, status, content }], next_cursor }. Results are kept for 3 days after the crawl finishes. Free: reading a job costs no credits.",
|
|
2541
|
+
JOB_STATUS_PARAMS,
|
|
2542
|
+
readStatus(crawlStatus)
|
|
2543
|
+
),
|
|
2544
|
+
tool(
|
|
2545
|
+
"BATCH_EXTRACT",
|
|
2546
|
+
"Scavio Batch Extract",
|
|
2547
|
+
"Extract a list of URLs (up to 1,000, plan-limited) in one job, each returned as Markdown, text or HTML exactly like LOCAL_SCAVIO_EXTRACT. Waits up to wait_seconds (default 45) and returns { id, status, pages, credits_used, results, next_cursor }; if status is still queued or running, call LOCAL_SCAVIO_BATCH_STATUS with the id later. " + JOB_PRICE,
|
|
2548
|
+
import_zod.z.object({
|
|
2549
|
+
urls: arrstr("The pages to extract (duplicates removed). Plan limits: Free 10, PAYG 50, Project 100, Bootstrap 500, Startup and Growth 1,000."),
|
|
2550
|
+
format: JOB_FORMAT,
|
|
2551
|
+
mode: JOB_MODE,
|
|
2552
|
+
wait_seconds: JOB_WAIT,
|
|
2553
|
+
limit: JOB_LIMIT,
|
|
2554
|
+
include_content: JOB_INCLUDE_CONTENT
|
|
2555
|
+
}),
|
|
2556
|
+
(i) => startAndWait(
|
|
2557
|
+
(body) => client.extract.batch(body),
|
|
2558
|
+
batchStatus,
|
|
2559
|
+
i,
|
|
2560
|
+
pollIntervalMs
|
|
2561
|
+
)
|
|
2562
|
+
),
|
|
2563
|
+
tool(
|
|
2564
|
+
"BATCH_STATUS",
|
|
2565
|
+
"Scavio Batch Status",
|
|
2566
|
+
"Read a batch extract's progress and its page results by job id, paged by cursor: { status, pages, credits_used, results: [{ url, status, content }], next_cursor }. Results are kept for 3 days after the batch finishes. Free: reading a job costs no credits.",
|
|
2567
|
+
JOB_STATUS_PARAMS,
|
|
2568
|
+
readStatus(batchStatus)
|
|
2569
|
+
)
|
|
2570
|
+
);
|
|
2571
|
+
}
|
|
2437
2572
|
return (0, import_core.experimental_createToolkit)("SCAVIO", {
|
|
2438
2573
|
name: "Scavio",
|
|
2439
|
-
description: "Real-time structured search over 31 platforms - Google (SERP, AI Mode, Maps, Shopping, Flights, Hotels, News, Trends), 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.",
|
|
2574
|
+
description: "Real-time structured search over 31 platforms - Google (SERP, AI Mode, Maps, Shopping, Flights, Hotels, News, Trends), 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, and website map, crawl and batch extract.",
|
|
2440
2575
|
tools
|
|
2441
2576
|
});
|
|
2442
2577
|
}
|