Google CSE Migration Gateway avatar

Google CSE Migration Gateway

Pricing

from $1.80 / 1,000 search requests

Go to Apify Store
Google CSE Migration Gateway

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

Vamsi Krishna

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

8 hours ago

Last modified

Features

Limited permissionsSingle-tenantServer interface

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/v1 with 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/compare or batch_audit dataset exports

What data can Search Migration Gateway return?

Field / areaTypeDescription
items[].title / link / snippetstringCSE-shaped result fields
items[].pagemapobjectReconstructed when enrichment is on
promotionsarrayCX promotions matched for the query
extensions.enrichment.chunksarrayCitation-ready RAG chunks
extensions.compatibilityobjectWarnings, original vs provider query
Batch diffsobjectorder_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:

  1. Set Actor input: mode=standby, gateway_token, default_provider (brave or tavily), matching BYOK key (brave_api_key or tavily_api_key), storage_backend=kvs.
  2. Start Standby. URL shape: https://<username>--search-migration-gateway.apify.actor.
  3. Check GET /healthz and GET /readyz.
  4. Import XMLs: POST /v1/cx/import (multipart).
  5. Activate: POST /v1/cx/{cx}/activate with { "version": N }.
  6. Point CSE clients at the Standby host. Send Authorization: Bearer <gateway_token> (or X-Api-Key). Google SDK key= query auth is not enough—use a custom HTTP adapter or switch to Bearer.
  7. Optionally run POST /v1/migrate/compare or re-run with mode=batch_audit.
  8. Rollback if needed: POST /v1/cx/{cx}/rollback with { "version": N }.

OpenAPI: /docs on your Standby URL.

Useful endpoints

MethodPathPurpose
GET/healthzLiveness
GET/readyzStorage readiness
POST/v1/cx/importImport CX XML
POST/v1/cx/{cx}/activateActivate draft
POST/v1/cx/{cx}/rollbackRollback active version
GET/customsearch/v1Drop-in CSE JSON API
POST/v1/searchCanonical search
POST/v1/rag/searchSearch + RAG
POST/v1/pages/extractFree utility: fetch/extract URLs (max 10)
POST/v1/migrate/compareProvider-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:

  1. Apify pay-per-event charges below
  2. Apify Standby compute (while the server is up / idle)
  3. Brave or Tavily usage under your own key (BYOK) — billed by that provider
EventPriceWhen
apify-actor-start$0.00005Actor run start (platform synthetic)
search$0.003Successful search (enrichment_mode not rag)
rag-search$0.015Successful RAG search
profile-import$0.25Successful CX profile activation
migration-report$1.00Completed 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.

FieldDescription
modestandby (HTTP API) or batch_audit (dataset export)
gateway_tokenSecret Standby API token (required for auth)
default_providerbrave (default), tavily, or mock (demo/test — no API key needed)
brave_api_keyBrave Search BYOK key (required when default_provider=brave)
tavily_api_keyTavily BYOK key (tvly-...) (required when default_provider=tavily)
storage_backendkvs (platform, survives restarts) or sqlite (local)
audit_cx / audit_queriesBatch 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=mock to run a full demo with synthetic results — no Brave/Tavily key required. Useful for testing the full pipeline before committing to a provider.
  • Prefer kvs on Apify so profiles survive Standby restarts; use sqlite for local apify run.
  • Auth: Bearer or X-Api-Key must match gateway_token. Local only: SEARCH_GATEWAY_DISABLE_AUTH=1.
  • Per-request provider override: provider=tavily|brave on POST body / query, plus X-Tavily-Key / X-Brave-Key / X-Provider-Key.
  • Keep top_n_rag small; 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
  • /docs on Standby for OpenAPI