Custom Search API Replacement - Web Search JSON API avatar

Custom Search API Replacement - Web Search JSON API

Pricing

from $2.28 / 1,000 search results pages

Go to Apify Store
Custom Search API Replacement - Web Search JSON API

Custom Search API Replacement - Web Search JSON API

Custom Search API replacement: the same parameters (q, cx, num, start, gl, hl, lr, safe, dateRestrict, siteSearch) and the same JSON (items[], searchInformation, queries.nextPage) as the Google Custom Search JSON API. Batch runs or a live HTTP endpoint: change the base URL, keep your code.

Pricing

from $2.28 / 1,000 search results pages

Rating

0.0

(0)

Developer

Scrapewise Data

Scrapewise Data

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

0

Monthly active users

9 days ago

Last modified

Features

Limited permissionsSingle-tenantServer interface

Share

Custom Search API replacement: web search in the same JSON

This Actor gives you web search results in the exact format of the Custom Search JSON API: the same request parameters (q, cx, num, start, gl, hl, lr, cr, safe, dateRestrict, siteSearch, exactTerms...) and the same response (kind, queries with request and nextPage, searchInformation, items[] with title, link, displayLink, snippet, htmlSnippet, pagemap...).

If your code was built around that API and you need a replacement, you can keep your parser. Run it in batch from the Apify Console or the API, or use it as a live HTTP endpoint: change the base URL, swap key= for token=, and your existing requests keep working.

Important: the results come from independent web search indexes, not from Google. The format is the same, but the ranking and the pages found can differ from what Google shows. See the FAQ.

At a glance

WhatPrice
Search results page (up to 10 results)US$ 3.00 per 1,000 pages (US$ 0.003 each)
Run startUS$ 0.005 per run (in endpoint mode: once per started container, not per request)
  • 100 queries, first page each = 100 pages = US$ 0.305 for one batch run.
  • One page = one old API call (up to 10 results). Pages with no results, invalid parameters and errors are never charged.
  • A spending limit set on the run stops it cleanly with everything delivered so far.

Quick start

Batch run (one dataset item per page, in the old API JSON):

{
"queries": ["vector database comparison", "kubernetes operator tutorial"],
"pagesPerQuery": 2,
"gl": "us"
}

Paste old requests as they are. Full URLs and bare query strings both work. key is ignored and cx is only echoed back in queries.request:

{
"queries": [
"https://www.googleapis.com/customsearch/v1?key=YOUR_KEY&cx=YOUR_CX&q=open+source+llm+benchmark&num=5",
"q=postgres+vacuum+full&siteSearch=postgresql.org&dateRestrict=y1"
]
}

Live endpoint (keep your code, change one URL)

The Actor also answers HTTP requests directly (Apify Standby mode), with the same path and parameters as before:

Before: https://www.googleapis.com/customsearch/v1?key=YOUR_KEY&cx=YOUR_CX&q=hello+world
After: https://scrapewise--custom-search-api-replacement.apify.actor/customsearch/v1?token=YOUR_APIFY_TOKEN&q=hello+world
  • Authentication: your Apify API token as ?token=... or the header Authorization: Bearer ....
  • /customsearch/v1 and /customsearch/v1/siterestrict are both accepted. cx is optional: send it or not, it is echoed back in queries.request like before, so you don't need a search engine ID.
  • Errors come back in the same shape as before ({"error": {"code": 400, "message": ..., "errors": [...], "status": "INVALID_ARGUMENT"}}), so your error handling keeps working too.
  • A request that fails on our side returns HTTP 503 and is not charged. Retry after a few seconds.

Python example:

import requests
BASE = "https://scrapewise--custom-search-api-replacement.apify.actor/customsearch/v1"
r = requests.get(BASE, params={"token": "YOUR_APIFY_TOKEN", "q": "vector database comparison", "num": 10})
for item in r.json().get("items", []):
print(item["position"], item["title"], item["link"])

Input

FieldWhat it does
queriesOne search per line: plain terms, search operators (site:, filetype:, "exact phrase", -word) or a full old request URL / query string.
pagesPerQueryResults pages per query (1 to 10). Pages follow start: 1, 11, 21...
outputFormatapi (default): one item per page in the old JSON. results: one flat row per result, ready for CSV and Sheets.
numResults per page, 1 to 10.
startFirst result index, 1 to 91 (start + num cannot pass 101, the old limit).
gl, hlCountry and language codes, for example us / en, de / de. cr=countryXX and lr=lang_xx are also read.
safeactive filters explicit results.
dateRestrictd7, w2, m6, y1: only recent pages.
siteSearch, siteSearchFilterOnly one site (i) or everything except it (e).
lr, crOld style language and country restricts (lang_de, countryDE). Used when hl / gl are empty.
exactTerms, excludeTerms, orTerms, fileType, hqSame meaning as before. They are added to the query as search operators.

Fields set in the form apply to every query. Parameters inside a pasted URL or query string override them for that line.

Output

Example from our own run ("queries": ["vector database comparison"], "num": 3), shortened:

{
"query": "vector database comparison",
"startIndex": 1,
"kind": "customsearch#search",
"queries": {
"request": [{"searchTerms": "vector database comparison", "count": 3, "startIndex": 1, "gl": "us", "hl": "en", "safe": "off", "totalResults": "6"}],
"nextPage": [{"searchTerms": "vector database comparison", "count": 3, "startIndex": 4}]
},
"searchInformation": {"searchTime": 8.625, "formattedSearchTime": "8.63", "totalResults": "6", "formattedTotalResults": "6"},
"items": [
{
"kind": "customsearch#result",
"title": "Vector Database Comparison | Superlinked",
"htmlTitle": "<b>Vector</b> <b>Database</b> <b>Comparison</b> | Superlinked",
"link": "https://superlinked.com/vector-db-comparison",
"displayLink": "superlinked.com",
"snippet": "Compare 47+ vector databases across features, performance, and adoption. Filter by license, languages, index types.",
"htmlSnippet": "Compare 47+ <b>vector</b> databases across features, performance, and adoption. Filter by license, languages, index types.",
"formattedUrl": "https://superlinked.com/vector-db-comparison",
"htmlFormattedUrl": "https://superlinked.com/vector-db-comparison",
"pagemap": {},
"position": 1
},
{
"kind": "customsearch#result",
"title": "We Tried and Tested 10 Best Vector Databases for RAG Pipelines - ZenML Blog",
"link": "https://www.zenml.io/blog/vector-databases-for-rag",
"displayLink": "www.zenml.io",
"snippet": "For this article, we evaluated and tested the 10 best vector databases for RAG pipelines...",
"pagemap": {},
"position": 3,
"date": "October 1, 2025"
}
]
}
FieldMeaning
items[].title, htmlTitlePage title. The HTML version has the query words in <b>.
items[].link, formattedUrl, htmlFormattedUrlThe final page URL.
items[].displayLinkHost name of the result.
items[].snippet, htmlSnippetText excerpt. It can be empty for some pages.
items[].positionAbsolute position (1, 2, ... 11, 12 on page 2). Extra field.
items[].datePublication date or age when the index has it ("October 1, 2025", "4 weeks ago"). Extra field.
items[].pagemapAlways present, as an empty object. Code that reads item["pagemap"] keeps working.
items[].mime, fileFormatOn document results (PDF, Word, Excel, PowerPoint), the same values as before, for example application/pdf and PDF/Adobe Acrobat.
queries.request, queries.nextPage, queries.previousPageSame pagination blocks as before. nextPage is present only when a next page exists.
searchInformation.totalResultsA lower bound (results seen so far, plus one page when this one was full), not an index-wide estimate.
query, startIndex, scrapedAt, errorCode, errorBatch mode only: which line of your input produced the item.

The extra fields don't break parsers written for the old response. In results format each row is one item from items[] with query, startIndex and totalResults added.

Errors you may see

Error rows are free and keep your input line in query, so you can see which search failed.

errorCodeMeaning
INVALID_INPUTA parameter is out of range or malformed (for example num=50). The message names the parameter.
NO_RESULTSThe search returned nothing, or there are no more pages.
SEARCH_UNAVAILABLEThe search did not answer after several retries. Run it again in a few minutes.
NOT_REACHEDThe run timeout arrived before this search. Raise the timeout or split the input.

Integrations, scheduling and AI agents

  • Schedules: run the same queries every day or hour from Apify Schedules to track who ranks for your keywords.
  • Export: download the dataset as JSON, CSV, Excel or XML, or read it from the Apify API (/datasets/{id}/items).
  • Make, n8n, Zapier: use the Apify integration to run the Actor and get the dataset, or call the live endpoint from an HTTP node.
  • AI agents: the endpoint is a plain GET that returns compact JSON, which suits tool calls from LangChain, LlamaIndex or your own agent. The Actor also works through the Apify MCP server.

FAQ

Are these Google results? No. The results come from independent web search indexes. The response format is the same as the Custom Search JSON API, so your integration keeps working, but rankings and coverage differ. If you need Google's ranking exactly, this is not the right tool.

Do I need a cx search engine ID or an API key from Google? No. key is ignored and cx is optional (only echoed back). You only need an Apify account and token.

Can I restrict results to my own website, like a site search? Yes. Use siteSearch=yourdomain.com (or put site:yourdomain.com in the query). How many pages show up depends on how well the site is indexed.

How many results can I get per query? Up to 100, the same as before: 10 per page, start from 1 to 91.

Is there a free daily quota? Apify's free plan includes monthly platform credit you can use here. Beyond that you pay per page with results.

Image search? Not supported. searchType=image returns a clear 400 error.

Limitations

  • Results are not Google's. Rankings, freshness and the number of pages found differ.
  • totalResults is a lower bound, not an estimate of the whole index.
  • pagemap is always empty (no thumbnails or metatags). labels, spelling, promotions and cacheId are not returned.
  • sort, filter, linkSite, relatedSite, lowRange and highRange are accepted but have no effect (sort and filter are echoed back).
  • Very specific queries (rare file types, small sites) may return fewer than 10 results per page.

Changelog

  • 6 Nov 2026: first version. Batch mode with the old API JSON or flat rows, live endpoint on /customsearch/v1, old request URLs accepted as input.
  • 8 Nov 2026: output fields updated: pagemap on every result, mime and fileFormat on documents, cx, sort and filter echoed in queries.request. New input fields lr, cr and hq.

Custom Search JSON API is a product of Google LLC. This Actor is not affiliated with or endorsed by Google.