OpenAI Agents SDK Integration
Scavio ships as a tool package for the OpenAI Agents SDK, in both Python and TypeScript. Install openai-agents-scavio, hand the tools to an Agent, and it gets real-time search across Google, YouTube, Amazon, Walmart, Reddit, TikTok, and Instagram — one package, one API key.
Prerequisites
- The OpenAI Agents SDK:
openai-agents(Python 3.10+) or@openai/agents(Node 22+). - A Scavio API key from dashboard.scavio.dev (new accounts get free credits, no credit card).
Install
# Python
pip install openai-agents-scavio
# TypeScript
npm install openai-agents-scavio @openai/agents zodSet your API key
export SCAVIO_API_KEY=sk_live_your_keyThe tools read SCAVIO_API_KEY from the environment, or you can pass api_key / { apiKey } to the factory.
Quickstart (Python)
from agents import Agent, Runner
from openai_agents_scavio import get_scavio_tools
agent = Agent(
name="Search Assistant",
instructions="Search the web, shopping sites, and social platforms with Scavio.",
tools=get_scavio_tools(), # reads SCAVIO_API_KEY
)
result = Runner.run_sync(agent, "Find the top budget laptops on Amazon")
print(result.final_output)Quickstart (TypeScript)
import { Agent, run } from "@openai/agents";
import { buildScavioTools } from "openai-agents-scavio";
const agent = new Agent({
name: "Search Assistant",
instructions: "Search the web, shopping sites, and social platforms with Scavio.",
tools: buildScavioTools(), // reads SCAVIO_API_KEY
});
const result = await run(agent, "Find the top budget laptops on Amazon");
console.log(result.finalOutput);Enable only the providers you need
# Python
tools = get_scavio_tools(
enable_google=True,
enable_reddit=True,
enable_amazon=False,
enable_walmart=False,
enable_youtube=False,
enable_tiktok=False,
enable_instagram=False,
)// TypeScript
const tools = buildScavioTools({
enableGoogle: true,
enableReddit: true,
enableAmazon: false,
enableWalmart: false,
enableYoutube: false,
enableTiktok: false,
enableInstagram: false,
});Pass all=True (Python) or { all: true } (TypeScript) to register every tool regardless of the individual flags.
Available tools
Both packages expose 32 tools, one per Scavio endpoint, named scavio_<provider>_<action> (for example scavio_google_search, scavio_amazon_product, scavio_reddit_post). Each returns the structured Scavio JSON response.
| Provider | Tools |
|---|---|
scavio_google_search | |
| Amazon | scavio_amazon_search, scavio_amazon_product |
| Walmart | scavio_walmart_search, scavio_walmart_product |
| YouTube | scavio_youtube_search, scavio_youtube_metadata |
scavio_reddit_search, scavio_reddit_post | |
| TikTok | 11 tools (profile, posts, video, comments, search, hashtag, followers, ...) |
| 12 tools (profile, posts, reels, stories, post, comments, search, followers, ...) |
Use every endpoint via MCP
For the full Scavio API with no install, point the Agents SDK at the hosted MCP server:
# Python
from agents import Agent
from agents.mcp.server import MCPServerStreamableHttp
server = MCPServerStreamableHttp(
name="scavio",
params={"url": "https://mcp.scavio.dev/mcp", "headers": {"x-api-key": "sk_live_..."}},
)
agent = Agent(name="Search Assistant", mcp_servers=[server])// TypeScript
import { Agent, MCPServerStreamableHttp } from "@openai/agents";
const server = new MCPServerStreamableHttp({
url: "https://mcp.scavio.dev/mcp",
name: "scavio",
requestInit: { headers: { "x-api-key": process.env.SCAVIO_API_KEY! } },
});
const agent = new Agent({ name: "Search Assistant", mcpServers: [server] });Credit costs
Most calls cost 1 credit. Reddit and Instagram cost 2 credits, and Google costs 2 unless light_request is set. See the rate limits reference for plan limits and the errors reference for retry guidance.