Metadata-Version: 2.4
Name: openai-agents-scavio
Version: 0.1.0
Summary: Scavio real-time search tools (Google, YouTube, Amazon, Walmart, Reddit, TikTok, Instagram) for the OpenAI Agents SDK
Project-URL: Homepage, https://scavio.dev
Project-URL: Repository, https://github.com/scavio-ai/openai-agents-scavio
Project-URL: Documentation, https://scavio.dev/docs/openai-agents
Author-email: Scavio <support@scavio.dev>
License: MIT
Keywords: agents,openai,openai-agents,scavio,search,serp,tavily-alternative,tools
Requires-Python: >=3.10
Requires-Dist: openai-agents>=0.17
Requires-Dist: scavio>=0.2.1
Provides-Extra: test
Requires-Dist: pytest>=7.0; extra == 'test'
Description-Content-Type: text/markdown

# openai-agents-scavio

[Scavio](https://scavio.dev) real-time search tools for the [OpenAI Agents SDK](https://openai.github.io/openai-agents-python/) — Google, YouTube, Amazon, Walmart, Reddit, TikTok, and Instagram, with one API key.

## Install

```bash
pip install openai-agents-scavio
```

## Setup

Get a Scavio API key from the [Scavio Dashboard](https://dashboard.scavio.dev) (new accounts get free credits, no credit card). Set `SCAVIO_API_KEY` or pass `api_key=` to the factory.

## Usage

```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)
```

Expose 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,
)
```

Pass `all=True` to register every tool regardless of the individual flags.

## Tools

`get_scavio_tools()` returns 32 function tools, one per Scavio endpoint, named `scavio_<provider>_<action>` (e.g. `scavio_google_search`, `scavio_amazon_product`, `scavio_reddit_post`). Each returns the structured Scavio JSON response; errors come back as `{"error": "..."}` rather than raising, so a failed call never crashes the run.

## 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])
```

## Credits

Most calls cost 1 credit. Reddit and Instagram cost 2 credits, and Google costs 2 unless `light_request=True` (1 credit). See [scavio.dev/docs](https://scavio.dev/docs).

## Links

- Scavio: https://scavio.dev
- Docs: https://scavio.dev/docs/openai-agents
- Dashboard: https://dashboard.scavio.dev
