pi-agentcodingsearch

Setting Up Web Search in Pi Coding Agent

Pi Coding Agent web search defaults to DuckDuckGo which is unreliable at scale. Configure a stable provider with 500 free credits per month.

5 min read

Pi Coding Agent added web search support through the pi-web-providers package. The default setup points to DuckDuckGo's unofficial API, which is free but unreliable at scale due to aggressive rate limiting and bot detection. Brave dropped its free tier in February 2026 and now requires $5/month minimum. Here is how to set up a reliable search provider with a genuine free tier.

The provider reliability problem

DuckDuckGo works in development: low volume, single-user, no rate pressure. In a real coding session where the agent makes 20-30 searches, DuckDuckGo starts throttling and returning empty results. The agent falls back to training data, which may be outdated for fast-moving libraries and APIs. A reliable search provider eliminates this class of degradation.

Configuring Scavio as a provider

Add Scavio as a custom HTTP provider in Pi's configuration. The 500 free credits per month are enough for typical coding sessions (15-30 searches per day, about 500 per month).

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"
    }
  }
}

Multi-platform bonus for coding agents

By changing the platform field, Pi can search Reddit for community solutions (many coding answers live in Reddit threads, not Stack Overflow), YouTube for video tutorials, and Google for documentation. The same API key and config structure works for all platforms, just with a different body template.

Free tier math

500 free credits per month. A typical coding session: 20 searches. At 25 coding days per month: 500 searches. The free tier covers exactly one developer's typical usage. For heavier use, the paid tier at $30/month for 7,000 credits covers even intensive daily coding with search-heavy research sessions.