Tutorial

How to Add Scavio as a Search Provider in Pi Coding Agent

Learn how to configure Scavio as a search provider in Pi Coding Agent's pi-web-providers package for reliable, multi-platform web search.

Pi Coding Agent supports web search through the pi-web-providers package, which allows multiple search backends. DuckDuckGo's free API is unreliable at scale due to rate limiting, and Brave dropped its free tier in February 2026. This tutorial adds Scavio as a search provider, giving Pi access to Google, Reddit, YouTube, Amazon, and Walmart under a single configuration with 500 free credits per month.

Prerequisites

  • Pi Coding Agent installed (v0.73.0+)
  • pi-web-providers package installed
  • A Scavio API key from scavio.dev

Walkthrough

Step 1: Check current search configuration

See which providers are currently configured in Pi.

Bash
# Check Pi's current web search config:
cat ~/.pi-agent/config.json | grep -A5 web_search

# Or check pi-web-providers config:
cat ~/.pi-agent/providers.json

Step 2: Add Scavio as a custom HTTP provider

Configure Scavio in Pi's provider settings as a custom HTTP search backend.

JSON
// Add to ~/.pi-agent/providers.json:
{
  "web_search": {
    "provider": "custom_http",
    "config": {
      "url": "https://api.scavio.dev/api/v1/search",
      "method": "POST",
      "headers": {
        "x-api-key": "your_scavio_api_key",
        "Content-Type": "application/json"
      },
      "body_template": {
        "platform": "google",
        "query": "{{query}}"
      },
      "result_path": "organic",
      "title_field": "title",
      "url_field": "link",
      "snippet_field": "snippet"
    }
  }
}

Step 3: Test the integration

Run a test search in Pi to verify the Scavio provider works.

Bash
# In Pi Coding Agent:
> /search best Python web framework 2026

# Should return structured results from Scavio's Google endpoint
# Verify results appear with titles, URLs, and snippets

Step 4: Configure multi-platform search (optional)

Set up separate search commands for different platforms.

JSON
// Extended provider config for multi-platform:
// You can add platform-specific providers:
{
  "web_search": { /* google config from above */ },
  "reddit_search": {
    "provider": "custom_http",
    "config": {
      "url": "https://api.scavio.dev/api/v1/search",
      "method": "POST",
      "headers": { "x-api-key": "your_key", "Content-Type": "application/json" },
      "body_template": { "platform": "reddit", "query": "{{query}}" },
      "result_path": "organic"
    }
  }
}

Python Example

Python
# Pi Coding Agent provider configuration:
import json

config = {
    'web_search': {
        'provider': 'custom_http',
        'config': {
            'url': 'https://api.scavio.dev/api/v1/search',
            'method': 'POST',
            'headers': {'x-api-key': 'your_key', 'Content-Type': 'application/json'},
            'body_template': {'platform': 'google', 'query': '{{query}}'},
            'result_path': 'organic'
        }
    }
}
print(json.dumps(config, indent=2))

JavaScript Example

JavaScript
// Pi provider config:
const config = {
  web_search: {
    provider: 'custom_http',
    config: {
      url: 'https://api.scavio.dev/api/v1/search',
      method: 'POST',
      headers: { 'x-api-key': 'your_key', 'Content-Type': 'application/json' },
      body_template: { platform: 'google', query: '{{query}}' },
      result_path: 'organic'
    }
  }
};

Expected Output

JSON
Pi Coding Agent with Scavio as a reliable, multi-platform search provider replacing DuckDuckGo or Brave.

Related Tutorials

Frequently Asked Questions

Most developers complete this tutorial in 15 to 30 minutes. You will need a Scavio API key (free tier works) and a working Python or JavaScript environment.

Pi Coding Agent installed (v0.73.0+). pi-web-providers package installed. A Scavio API key from scavio.dev. A Scavio API key gives you 500 free credits per month.

Yes. The free tier includes 500 credits per month, which is more than enough to complete this tutorial and prototype a working solution.

Scavio has a native LangChain package (langchain-scavio), an MCP server, and a plain REST API that works with any HTTP client. This tutorial uses the raw REST API, but you can adapt to your framework of choice.

Start Building

Learn how to configure Scavio as a search provider in Pi Coding Agent's pi-web-providers package for reliable, multi-platform web search.