Tutorial

How to Replace Google Custom Search API with Scavio

Move from Google Custom Search API to Scavio. Lower limits, structured JSON, multi-platform — drop-in for AI assistant pipelines.

An r/n8n thread mentioned the OP was using 'Google Custom Search plus manual scraping' and wanted a single API. This tutorial walks the replacement path.

Prerequisites

  • Python 3.10+
  • Scavio API key

Walkthrough

Step 1: Identify Google Custom Search calls

Usually with a CSE key + cx ID.

Python
# Before:
# r = requests.get('https://www.googleapis.com/customsearch/v1', params={'key': KEY, 'cx': CX, 'q': q})

Step 2: Replace with Scavio

No CX needed; Scavio searches the open web.

Python
# After:
r = requests.post('https://api.scavio.dev/api/v1/search',
    headers={'x-api-key': SCAVIO_API_KEY},
    json={'query': q}).json()

Step 3: Map response

items[] becomes organic_results[].

Python
# Google CSE: r['items'][i]['link']
# Scavio: r['organic_results'][i]['link']

Step 4: Add extract endpoint for content

Replaces the 'manual scraping' half of the OP's flow.

Python
def fetch(url):
    return requests.post('https://api.scavio.dev/api/v1/extract',
        headers={'x-api-key': SCAVIO_API_KEY}, json={'url': url, 'format': 'markdown'}).json().get('markdown', '')

Step 5: Compare quotas

Google CSE caps at 100/day on free, $5/1K above. Scavio free is 500 credits/mo + $30/mo for 7K.

Text
// Daily research agent making 50 queries: Google CSE = $7.50/mo above quota; Scavio = $0 above the 500 free tier or $30/mo flat.

Python Example

Python
# Migration takes ~20 minutes for a typical agent.

JavaScript Example

JavaScript
// Same in TS.

Expected Output

JSON
Same query intent, structured JSON, plus extract endpoint that replaces 'manual scraping' under the same key. No more two-vendor split.

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.

Python 3.10+. Scavio API key. 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

Move from Google Custom Search API to Scavio. Lower limits, structured JSON, multi-platform — drop-in for AI assistant pipelines.