Skip to content

Commit 066cc7c

Browse files
authored
Add Scavio integration (#531)
* Add Scavio integration * docs: drop redundant In a Pipeline example per review
1 parent 7562e8e commit 066cc7c

2 files changed

Lines changed: 91 additions & 0 deletions

File tree

integrations/scavio.md

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
---
2+
layout: integration
3+
name: Scavio
4+
description: Search the web using Scavio, a unified search API for AI agents
5+
authors:
6+
- name: Scavio
7+
socials:
8+
github: scavio-ai
9+
repo: https://github.com/scavio-ai/haystack-scavio
10+
pypi: https://pypi.org/project/scavio-haystack
11+
type: Search & Extraction
12+
report_issue: https://github.com/scavio-ai/haystack-scavio/issues
13+
logo: /logos/scavio.png
14+
version: Haystack 2.0
15+
toc: true
16+
---
17+
18+
### Table of Contents
19+
20+
- [Overview](#overview)
21+
- [Installation](#installation)
22+
- [Usage](#usage)
23+
- [ScavioWebSearch](#scaviowebsearch)
24+
- [License](#license)
25+
26+
## Overview
27+
28+
[Scavio](https://scavio.dev) is a unified search API built for AI agents. It provides real-time
29+
search across Google, YouTube, Amazon, Walmart, Reddit, TikTok, and more through a single API,
30+
returning structured results with content and source URLs.
31+
32+
This integration provides:
33+
- `ScavioWebSearch`: Searches the web using Scavio's Google web search endpoint and returns results
34+
as Haystack `Document` objects along with source URLs.
35+
36+
You need a Scavio API key to use this integration. You can get one at
37+
[dashboard.scavio.dev](https://dashboard.scavio.dev).
38+
39+
## Installation
40+
41+
```bash
42+
pip install scavio-haystack
43+
```
44+
45+
## Usage
46+
47+
### ScavioWebSearch
48+
49+
`ScavioWebSearch` queries the Scavio search API and returns results as Haystack `Document` objects
50+
containing the content snippets and metadata (title, URL). Source URLs are also returned separately.
51+
52+
Set your API key as the `SCAVIO_API_KEY` environment variable.
53+
54+
#### Basic Example
55+
56+
```python
57+
from haystack_integrations.components.websearch.scavio import ScavioWebSearch
58+
59+
web_search = ScavioWebSearch(top_k=5)
60+
61+
result = web_search.run(query="What is Haystack by deepset?")
62+
documents = result["documents"]
63+
links = result["links"]
64+
```
65+
66+
#### Async Support
67+
68+
The component supports asynchronous execution via `run_async`:
69+
70+
```python
71+
import asyncio
72+
from haystack_integrations.components.websearch.scavio import ScavioWebSearch
73+
74+
async def main():
75+
web_search = ScavioWebSearch(top_k=3)
76+
result = await web_search.run_async(query="What is Haystack by deepset?")
77+
print(f"Found {len(result['documents'])} documents")
78+
79+
asyncio.run(main())
80+
```
81+
82+
#### Parameters
83+
84+
- **`api_key`**: API key for Scavio. Defaults to the `SCAVIO_API_KEY` environment variable.
85+
- **`top_k`**: Maximum number of results to return. Defaults to 10.
86+
- **`search_params`**: Additional parameters passed to the Scavio Google search endpoint. Supported
87+
keys include `country_code`, `language`, `page`, `search_type`, `device`, `nfpr`, `light_request`.
88+
89+
### License
90+
91+
`scavio-haystack` is distributed under the terms of the [Apache-2.0](https://spdx.org/licenses/Apache-2.0.html) license.

logos/scavio.png

32.2 KB
Loading

0 commit comments

Comments
 (0)