ScavioScavio
ToolsPricing
Sign InsGet Startedg
Quick StartAPI & SDKsEcosystem

Vercel AI SDK Integration

Scavio ships as a set of ready-made tools for the Vercel AI SDK. Import the tools from @scavio/ai-sdk and pass them to generateText or streamText to give any AI SDK agent real-time search across Google, YouTube, Reddit, Amazon, Walmart, TikTok, and Instagram — a cost-effective Tavily and SerpAPI alternative, with one package, one API key, and no custom HTTP code.

Drop-in tools for any AI SDK agent

Spread scavioTools() into generateText or streamText and your model can search seven platforms — a cost-effective Tavily and SerpAPI alternative with typed Zod schemas.

Introduction

@scavio/ai-sdk exposes each Scavio endpoint as a standard AI SDK tool() with a typed Zod input schema. Pass scavioTools() for the full set, or import individual factories to expose a lean tool list to the model. You need Node.js 18 or later and a Scavio API key from dashboard.scavio.dev.

The scavio JS SDK is bundled and called under the hood — it handles auth, rate limiting, and request formatting, and returns each result to the model as the raw Scavio JSON response.

Step-by-Step Integration Guide

Step 1: Install

Bash
npm install @scavio/ai-sdk ai zod

ai and zod are peer dependencies; the scavio JS SDK is bundled and called under the hood. Requires Node.js 18 or later.

Step 2: Set your API key

Get a key at dashboard.scavio.dev (free credits, no card), then set it as an environment variable:

Bash
export SCAVIO_API_KEY=sk_live_your_key

Each tool factory reads SCAVIO_API_KEY from the environment. You can also pass it explicitly: scavioSearch({ apiKey: "sk_live_..." }).

Step 3: Basic usage

import { generateText, stepCountIs } from "ai";
import { openai } from "@ai-sdk/openai";
import { scavioTools } from "@scavio/ai-sdk";

const { text } = await generateText({
  model: openai("gpt-5.5"),
  tools: scavioTools(),
  stopWhen: stepCountIs(3),
  prompt: "Find the official GitHub repo of the Agno framework and summarize it",
});

console.log(text);

Available Tools

scavioTools() returns every tool keyed by name, ready to spread into the tools option. Or import factories individually.

FactoryTool nameProvider
scavioSearchscavio_searchGoogle web search
scavioYoutubeSearchscavio_youtube_searchYouTube video search
scavioRedditSearchscavio_reddit_searchReddit (2 credits)
scavioAmazonSearchscavio_amazon_searchAmazon products
scavioWalmartSearchscavio_walmart_searchWalmart products
scavioTiktokSearchscavio_tiktok_searchTikTok videos
scavioInstagramSearchscavio_instagram_searchInstagram users

Every provider is also exported as its own factory, so you can expose a lean tool list to the model:

import { generateText, stepCountIs } from "ai";
import { openai } from "@ai-sdk/openai";
import { scavioSearch, scavioAmazonSearch } from "@scavio/ai-sdk";

const { text } = await generateText({
  model: openai("gpt-5.5"),
  tools: {
    scavio_search: scavioSearch({ maxResults: 5 }),
    scavio_amazon_search: scavioAmazonSearch(),
  },
  stopWhen: stepCountIs(3),
  prompt: "Compare prices for a mechanical keyboard on Amazon",
});

Each factory accepts { apiKey?, maxResults?, ...ScavioConfig }. maxResults trims long results arrays before they reach the model (defaults to 10), keeping token usage down.

Advanced Example

Stream a multi-step research run: the model chains web and Reddit searches on its own, then narrates its findings token by token.

import { streamText, stepCountIs } from "ai";
import { openai } from "@ai-sdk/openai";
import { scavioTools } from "@scavio/ai-sdk";

const result = streamText({
  model: openai("gpt-5.5"),
  tools: scavioTools(),
  stopWhen: stepCountIs(5),
  system: "You are a research assistant. Use Scavio for fresh web data and cite sources.",
  prompt: "Research Tavily alternatives: check the web, then see what developers on Reddit say.",
});

for await (const chunk of result.textStream) {
  process.stdout.write(chunk);
}

The agent picks scavio_search and scavio_reddit_search as it goes, up to the stepCountIs(5) budget — you never wire up that routing yourself.

How it works

Each tool is a standard AI SDK tool() with a typed Zod input schema, so the model gets accurate argument hints and the SDK validates calls before they run. Calls go through the scavio JS SDK, which handles auth, rate limiting, and request formatting. Tool results are returned to the model as the raw Scavio JSON response.

Credit costs

Most calls cost 1 credit, including every Google search. Instagram is priced per endpoint: 10 credits for most calls, 8 for post details and comment replies, and 2 for user posts. See the rate limits reference for plan limits and the errors reference for retry guidance.

Benefits of Scavio + Vercel AI SDK

  • Drop-in tools: spread scavioTools() into generateText or streamText and go.
  • Typed Zod schemas: accurate argument hints for the model and validated calls before they run.
  • Seven platforms, one key: Google, YouTube, Reddit, Amazon, Walmart, TikTok, and Instagram behind a single API key.
  • Cost-effective: most calls cost a single credit — a Tavily and SerpAPI alternative with broader platform coverage.

Next Steps

  • Scavio API quickstart — keys, credits, and your first request
  • Google Search API reference — the endpoint behind scavio_search
  • MCP Integration — every Scavio endpoint as a tool
  • @scavio/ai-sdk on npm
  • Vercel AI SDK documentation
  • scavio JS SDK on npm
PreviousPydantic AINextMastra
ScavioScavio

One scraper API for every social, search and ecommerce platform. Built for AI agents.

Product

  • Features
  • Pricing
  • Dashboard
  • Affiliates

Developers

  • Documentation
  • API Reference
  • Quickstart
  • MCP Integration
  • Python SDK

Alternatives

  • Tavily Alternative
  • SerpAPI Alternative
  • Firecrawl Alternative
  • Exa Alternative
  • Serper Alternative
  • Tavily vs Scavio
  • SerpAPI vs Scavio
  • All alternatives
  • Compare Scavio vs alternatives

Search APIs

  • Google Search API
  • Amazon Product API
  • YouTube API
  • Reddit API
  • Walmart Product API
  • TikTok API
  • Instagram API

Tools

  • All Tools

© 2026 Scavio. All rights reserved.

Featured on TAAFT
Terms of ServicePrivacy Policy