Google CSE Migration Gateway
Pricing
from $1.80 / 1,000 search requests
Google CSE Migration Gateway
Drop-in Google Custom Search JSON API alternative for teams migrating before Jan 2027. Import CX XML, run Standby /customsearch/v1 API with Brave or Tavily BYOK, audit migrations in batch, and return citation-ready Vertical RAG chunks. Demo with mock provider—no API key. Not affiliated with Google.
Pricing
from $1.80 / 1,000 search requests
Rating
0.0
(0)
Developer
Vamsi Krishna
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
8 hours ago
Last modified
Categories
Features
Share
What does Search Migration Gateway do?
Search Migration Gateway is a drop-in Google Custom Search JSON API / Programmable Search Engine alternative for teams migrating before the January 1, 2027 retirement. It imports your existing CX XML profiles, runs licensed web search via Brave or Tavily (BYOK), and optionally returns citation-ready Vertical RAG chunks—without unauthorized SERP scraping.
This Actor is not affiliated with, endorsed by, or made by Google. It does not reproduce exact Google ranking, result counts, spelling, or PageMap.
See the docs/compatibility-matrix.md for Supported / Approximate / Unsupported behavior.
Why migrate from Google CSE?
- Keep clients that call
GET /customsearch/v1with a base-URL + auth change - Reuse portable CX assets:
context.xml,annotations.xml,promotions.xml,synonyms.xml - Run a persistent HTTP API on Apify Standby
- Enrich results with reconstructed metadata and RAG chunks
- Audit migration quality with
POST /v1/migrate/compareorbatch_auditdataset exports
What data can Search Migration Gateway return?
| Field / area | Type | Description |
|---|---|---|
items[].title / link / snippet | string | CSE-shaped result fields |
items[].pagemap | object | Reconstructed when enrichment is on |
promotions | array | CX promotions matched for the query |
extensions.enrichment.chunks | array | Citation-ready RAG chunks |
extensions.compatibility | object | Warnings, original vs provider query |
| Batch diffs | object | order_changed, removed_domains, promotions, timings |
How to migrate a Custom Search Engine
Quick demo (no API key needed): Set default_provider=mock and gateway_token=smg-demo-token to try the full API immediately using synthetic results. No BYOK key required.
Production setup:
- Set Actor input:
mode=standby,gateway_token,default_provider(braveortavily), matching BYOK key (brave_api_keyortavily_api_key),storage_backend=kvs. - Start Standby. URL shape:
https://<username>--search-migration-gateway.apify.actor. - Check
GET /healthzandGET /readyz. - Import XMLs:
POST /v1/cx/import(multipart). - Activate:
POST /v1/cx/{cx}/activatewith{ "version": N }. - Point CSE clients at the Standby host. Send
Authorization: Bearer <gateway_token>(orX-Api-Key). Google SDKkey=query auth is not enough—use a custom HTTP adapter or switch to Bearer. - Optionally run
POST /v1/migrate/compareor re-run withmode=batch_audit. - Rollback if needed:
POST /v1/cx/{cx}/rollbackwith{ "version": N }.
OpenAPI: /docs on your Standby URL.
Useful endpoints
| Method | Path | Purpose |
|---|---|---|
GET | /healthz | Liveness |
GET | /readyz | Storage readiness |
POST | /v1/cx/import | Import CX XML |
POST | /v1/cx/{cx}/activate | Activate draft |
POST | /v1/cx/{cx}/rollback | Rollback active version |
GET | /customsearch/v1 | Drop-in CSE JSON API |
POST | /v1/search | Canonical search |
POST | /v1/rag/search | Search + RAG |
POST | /v1/pages/extract | Free utility: fetch/extract URLs (max 10) |
POST | /v1/migrate/compare | Provider-raw vs CX-policy diff report |
How much will it cost?
Normal (non-Standby) runs: pay-per-event (PPE) charges below include Apify platform usage. You still pay Brave/Tavily under your own key (BYOK) when those providers are used.
Standby (live HTTP API): PPE events do not cover platform usage. You pay three layers:
- Apify pay-per-event charges below
- Apify Standby compute (while the server is up / idle)
- Brave or Tavily usage under your own key (BYOK) — billed by that provider
| Event | Price | When |
|---|---|---|
apify-actor-start | $0.00005 | Actor run start (platform synthetic) |
search | $0.003 | Successful search (enrichment_mode not rag) |
rag-search | $0.015 | Successful RAG search |
profile-import | $0.25 | Successful CX profile activation |
migration-report | $1.00 | Completed migrate compare / batch audit |
Example (Standby): 1,000 searches ≈ $3 PPE + Brave/Tavily ($5/1k on typical Search plans) + Standby compute. RAG is higher ($15 PPE per 1,000) because pages are fetched and chunked.
/v1/pages/extract is a free utility (no PPE event) but still consumes Standby compute.
Input
See the Input tab for the full schema.
| Field | Description |
|---|---|
mode | standby (HTTP API) or batch_audit (dataset export) |
gateway_token | Secret Standby API token (required for auth) |
default_provider | brave (default), tavily, or mock (demo/test — no API key needed) |
brave_api_key | Brave Search BYOK key (required when default_provider=brave) |
tavily_api_key | Tavily BYOK key (tvly-...) (required when default_provider=tavily) |
storage_backend | kvs (platform, survives restarts) or sqlite (local) |
audit_cx / audit_queries | Batch audit inputs |
Output
You can download the dataset in various formats such as JSON, HTML, CSV, or Excel.
Example CSE-shaped item
{"kind": "customsearch#result","title": "Example Security Guide","link": "https://docs.example.com/security","displayLink": "docs.example.com","snippet": "Overview of SOC 2 controls…"}
Example migration audit row
{"query": "soc2 checklist","cx": "my-engine","status": "success","order_changed": true,"removed_domains": ["partner.org"],"promotion_count": 1,"first_link": "https://docs.example.com/security","duration_ms": 342.5}
CX profiles persist in the Key-Value Store as {cx}_v{version}, versions_{cx}, and active_{cx}.
Tips and advanced options
- Demo mode: Set
default_provider=mockto run a full demo with synthetic results — no Brave/Tavily key required. Useful for testing the full pipeline before committing to a provider. - Prefer
kvson Apify so profiles survive Standby restarts; usesqlitefor localapify run. - Auth: Bearer or
X-Api-Keymust matchgateway_token. Local only:SEARCH_GATEWAY_DISABLE_AUTH=1. - Per-request provider override:
provider=tavily|braveon POST body / query, plusX-Tavily-Key/X-Brave-Key/X-Provider-Key. - Keep
top_n_ragsmall; enrichment has concurrency and deadline caps. - Remaining gaps: no Google legacy BYOK baseline adapter yet; image search unsupported; no exact Google parity.
FAQ, disclaimers, and support
Do I need a search key and a gateway token?
Yes for production Standby: a BYOK key for your chosen provider (brave_api_key or tavily_api_key) and gateway_token for API auth.
Why 401 Unauthorized?
Missing/wrong Bearer or X-Api-Key, or Actor started without gateway_token.
Can results contain personal data?
Our Actors are ethical and do not extract private user data that is not publicly available. Search snippets and fetched page content may still include personal data that websites publish. Personal data is protected by the GDPR and other regulations. You should not process personal data unless you have a legitimate reason. If you are unsure, consult your lawyers.
Where can I get help?
- Issues tab on the Actor page
- API tab for programmatic access
/docson Standby for OpenAPI