ScavioScavio
ProductPricingDocs
Sign InGet Started
  1. Home
  2. Tutorials
  3. How to Replace Google Programmable Search Engine
Tutorial

How to Replace Google Programmable Search Engine

Migrate from Google Programmable Search Engine before the Jan 2027 shutdown. Drop-in replacement with structured results.

Get Free API KeyAPI Docs

Google Programmable Search Engine is disabling web-wide searches by January 2027. Replace it with a structured search API that returns JSON instead of HTML. Migration takes under 20 minutes for most integrations.

Prerequisites

  • Existing PSE integration
  • Python 3.8+ or Node.js 18+
  • Scavio API key

Walkthrough

Step 1: Document current PSE usage

Note your PSE custom search engine ID, query patterns, and how you parse results.

Step 2: Map PSE params to API params

PSE uses cx (engine ID) and q (query). API uses query and country_code. No engine ID needed.

Step 3: Replace HTTP calls

Change from GET googleapis.com/customsearch to POST api.scavio.dev/api/v1/search.

Step 4: Update result parsing

PSE returns items[]. API returns organic_results[] with title, link, snippet, position.

Python Example

Python
import requests, os

# Old: Google PSE
# resp = requests.get('https://www.googleapis.com/customsearch/v1',
#     params={'key': pse_key, 'cx': engine_id, 'q': 'python tutorial'})

# New: Scavio
H = {'x-api-key': os.environ['SCAVIO_API_KEY'], 'Content-Type': 'application/json'}
resp = requests.post('https://api.scavio.dev/api/v1/search',
    headers=H, json={'query': 'python tutorial', 'country_code': 'us'})
data = resp.json()
for r in data.get('organic_results', []):
    print(f"{r['title']}: {r['link']}")

JavaScript Example

JavaScript
const resp = await fetch('https://api.scavio.dev/api/v1/search', {
  method: 'POST',
  headers: {'x-api-key': process.env.SCAVIO_API_KEY, 'Content-Type': 'application/json'},
  body: JSON.stringify({query: 'python tutorial', country_code: 'us'})
});
const data = await resp.json();
data.organic_results?.forEach(r => console.log(`${r.title}: ${r.link}`));

Expected Output

JSON
Python Tutorial - W3Schools: https://www.w3schools.com/python/
The Python Tutorial: https://docs.python.org/3/tutorial/
...

Related Tutorials

  • How to Ground AI Agents to Prevent Hallucination
  • How to Switch from Brave Search Free Tier to a Scalable API

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.

Existing PSE integration. Python 3.8+ or Node.js 18+. Scavio API key. A Scavio API key gives you 50 free credits on signup.

Yes. The free tier includes 50 credits on signup, 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.

Related Resources

Solution

Migrate from Google CSE to a Structured Search API

Read more
Workflow

Migrate Google CSE Integration to Search API

Read more
Comparison

Google CSE (Post-2027) vs Modern Search APIs (Scavio, Tavily, SerpAPI)

Read more
Best Of

Best Google CSE Alternatives: May 2026 Updated

Read more
Best Of

Best Google CSE Replacements in 2026

Read more
Solution

Replace Google Programmable Search Engine with Scavio API

Read more

Start Building

Migrate from Google Programmable Search Engine before the Jan 2027 shutdown. Drop-in replacement with structured results.

Get Free API KeyRead the Docs
ScavioScavio

Real-time search API for AI agents. Search every platform, not just Google.

Product

  • Features
  • Pricing
  • Dashboard
  • Affiliates

Developers

  • Documentation
  • API Reference
  • Quickstart
  • MCP Integration
  • Python SDK

Alternatives

  • Tavily Alternative
  • SerpAPI Alternative
  • Firecrawl Alternative
  • Exa Alternative

Tools

  • JSON Formatter
  • cURL to Code
  • Token Counter
  • All Tools

© 2026 Scavio. All rights reserved.

Featured on TAAFT
Terms of ServicePrivacy Policy