ScavioScavio
ToolsPricingDocs
Sign InGet Started
Quick StartAPI & SDKsEcosystem

Pydantic AI Integration

Scavio ships as a search tool for Pydantic AI via the pydantic-scavio package. Install it, add scavio_search_tool() to an Agent, and the model gets live Google results as clean, typed JSON — a cost-effective Tavily and SerpAPI alternative at 1 credit per search.

Typed results

The tool returns list[ScavioSearchResult] — a validated TypedDict with position, title, url, domain, content, and date — so downstream code and the model always see the same shape.

Introduction

The pydantic-scavio package wraps Scavio's Google Search (v2) endpoint as a Pydantic AI Tool. Before you start you need:

  1. Pydantic AI: pydantic-ai or pydantic-ai-slim (Python 3.10+).
  2. A Scavio API key from dashboard.scavio.dev (50 free signup credits, no credit card).

Step-by-Step Integration Guide

Step 1: Install

Bash
pip install pydantic-scavio

Step 2: Set your API key

Bash
export SCAVIO_API_KEY=sk_live_your_key

Step 3: Basic usage

Python
import os

from pydantic_ai import Agent
from pydantic_scavio import scavio_search_tool

agent = Agent(
    "openai:gpt-5.5",
    tools=[scavio_search_tool(os.environ["SCAVIO_API_KEY"])],
    system_prompt="Search the web when you need current information.",
)

result = agent.run_sync("What changed in the latest Pydantic AI release?")
print(result.output)

Fixing parameters for the agent

Parameters passed to the factory are fixed for every search and hidden from the LLM's tool schema. Parameters left unset stay available for the model to set per call.

Python
# Always search from the US in English; the LLM only controls the query.
tool = scavio_search_tool(
    os.environ["SCAVIO_API_KEY"],
    country_code="us",
    language="en",
)

Sharing a client

Pass an existing AsyncScavioClient to share connection pooling and rate limiting across tools:

Python
from scavio import AsyncScavioClient
from pydantic_scavio import scavio_search_tool

client = AsyncScavioClient(api_key=os.environ["SCAVIO_API_KEY"])
tool = scavio_search_tool(client=client)

Result shape

FieldTypeDescription
positionintRank of the result on the page
titlestrResult title
urlstrResult URL
domainstrResult domain
contentstrSnippet
datestr | NonePublication date when available

Use every endpoint via MCP

For the full Scavio API (YouTube, Amazon, Walmart, Reddit, TikTok, Instagram, and all Google surfaces) with no extra install, point Pydantic AI at the hosted MCP server:

Python
from pydantic_ai import Agent
from pydantic_ai.mcp import MCPServerStreamableHTTP

server = MCPServerStreamableHTTP(
    url="https://mcp.scavio.dev/mcp",
    headers={"x-api-key": "sk_live_..."},
)
agent = Agent("openai:gpt-5.5", toolsets=[server])

Benefits of Scavio + Pydantic AI

  • Typed end to end: validated results that match Pydantic AI's type-safe philosophy.
  • Schema control: developer-fixed parameters never leak into the LLM tool schema.
  • Cost-effective: 1 credit per search, full results.
  • One key, every platform: the same account covers 46 MCP tools across 7 platforms.

Next Steps

  • Pydantic AI documentation
  • pydantic-scavio on GitHub
  • Scavio API quickstart
PreviousOpenAI Agents SDKNextVercel AI SDK
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