Google Custom Search API: price, limits and the 2027 shutdown

By Benjamin · Founder of Lempile · Updated
Checked against the official sources listed at the end.

Google's Custom Search JSON API is closed to new customers, and existing customers must move off it by 1 January 2027. Until then it gives 100 free queries a day, then costs $5 per 1,000, up to 10,000 a day, with at most 10 results per call and 100 per query. Here is what it does, what it costs, the errors it returns and how to move your code, from Google's own pages read on 3 December 2026.

Table of contents
  1. What is the Google Custom Search JSON API?
  2. Is the Google Custom Search API shutting down?
  3. Does Google charge for the Custom Search API?
  4. What are the Custom Search API's limits?
  5. How do I fix the "unregistered callers" error?
  6. What can replace the Custom Search JSON API?
  7. How do you move Custom Search code to another API?
  8. Where does Lempile fit?
  9. Which replacement should you choose?
  10. Frequently asked questions
  11. Official sources checked

What is the Google Custom Search JSON API?

It is Google's REST API for getting web or image results from a Programmable Search Engine as JSON. It has one method, cse.list. Each request needs an API key (key), the ID of a search engine you set up (cx) and a query (q).

A Custom Search request
# One call, one answer: up to 10 results
curl -sS "https://www.googleapis.com/customsearch/v1?key=$GOOGLE_API_KEY&cx=$SEARCH_ENGINE_ID&q=coffee"

# Results are in "items": each has title, link, snippet and displayLink

The results come in an items array with each page's URL, title and snippet, plus rich snippet data where Google has it. The format follows the OpenSearch 1.1 specification. The search engine decides what is searched: before 20 January 2026 it could be the entire web; engines created since then search only the sites you list.

Is the Google Custom Search API shutting down?

Yes. Google's overview says the Custom Search JSON API is closed to new customers, and existing customers have until 1 January 2027 to move to another solution. Google's Programmable Search Engine team set out the plan in a blog post on 20 January 2026:

  • Custom Search JSON API users: move by 1 January 2027. Google suggests Vertex AI Search for up to 50 domains, and asks anyone who needs full web search to contact it.
  • Engines set to "Search the entire web" or to more than 50 domains: same deadline.
  • New engines: since 20 January 2026 they must use "Sites to search", up to 50 domains.
  • The free Search Element (the widget on your own site) stays, for up to 50 domains.

One page lags behind: the summary table in Google's Programmable Search Engine overview still lists the JSON API as available to everyone. The API's own page, which says it is closed, is the one to go by.

Does Google charge for the Custom Search API?

Yes, past 100 queries a day. The first 100 are free; after that, existing customers who turn on billing pay $5 per 1,000 queries, up to 10,000 queries a day. Google says this pricing applies only to existing customers until the API is discontinued on 1 January 2027.

Swipe the table sideways to see every column →

Queries a dayPaid queries a dayCost a dayCost over 30 days
1000$0$0
1,000900$4.50$135
5,0004,900$24.50$735
10,000 (the daily cap)9,900$49.50$1,485

Google's other Programmable Search offerings are widgets, not data for your code: the Standard Search Element is free and shows ads, the Non-profit one is free without ads for non-profits, and the Paid Search Element costs $5 per 1,000 queries without ads or a daily limit. All three run as JavaScript on your page.

What are the Custom Search API's limits?

  • 10 results per request: num takes 1 to 10.
  • 100 results per query: the API "will never return more than 100 results", and a request where start plus num goes past 100 fails.
  • 10,000 queries a day on billing, 100 a day free.
  • Your engine's sites only for any engine created since 20 January 2026, up to 50 domains.
  • No new customers, and no API after 1 January 2027.

How do I fix the "unregistered callers" error?

Google refuses any Custom Search call that doesn't carry a valid API key it accepts for this API. We called the endpoint on 3 December 2026 at 15:11 UTC with no key and with a made-up key, and got these answers:

Swipe the table sideways to see every column →

RequestHTTP statusGoogle's message
No key parameter403 PERMISSION_DENIEDPermission denied on the service.
A key that doesn't exist400 INVALID_ARGUMENTAPI key not valid. Please pass a valid API key.

Whatever the wording, "unregistered callers" or the 403 above, check these in order:

  1. Send the key on every request: Google's guide says to append key=yourAPIKey to all request URLs.
  2. Use the key of the project that already uses the API: pricing and billing apply only to existing customers.
  3. Check the cx: it is the Search engine ID from the Overview page of your engine in the Programmable Search Engine control panel, Basic section.
  4. A new project has no fix: the API is closed to new customers, so plan for one of the replacements below.

What can replace the Custom Search JSON API?

It depends on what you searched. If your engine covered your own site or a short list of domains, Google's own products still cover it. If it searched the entire web, you need a third-party API, and the closest match returns Google's own results as JSON.

Swipe the table sideways to see every column →

What you needOptionsPrice per 1,000
Your site or up to 50 domains, in your pageProgrammable Search Element, "Sites to search"Free
Your site or up to 50 domains, through an APIVertex AI Search (Google's page is now titled Agent Search pricing)$1.50 Standard, $4.00 Enterprise; 10,000 free queries a month in the trial
Google's full web results, from GoogleContact Google, as its blog post saysNot published
Google's results as JSON, from another companySerper, DataForSEO, Bright Data, SearchApi, SerpApiSerper $0.30–$1.00, DataForSEO $0.60–$2.00, Bright Data $1.50, SearchApi $1–$4, SerpApi $1.96–$25
Web results from an independent indexBrave Search API$5, with $5 of credit a month (card required)
Page content for AI agentsTavily$8 for basic searches (1 credit each at $0.008), 1,000 free credits a month

The APIs that return Google's results collect Google's pages themselves, and Google has sued one of them; see where the court cases stand. Each is compared in detail, with free tiers and limits, in SerpApi alternatives.

How do you move Custom Search code to another API?

Most Custom Search parameters have a direct counterpart in SerpApi's format, which several of the APIs above use. The table maps them to the names in Lempile's public API reference.

Swipe the table sideways to see every column →

Custom Search JSON APISerpApi format (Lempile)Note
keyX-API-KEY header or api_keyYour new provider's key
cxNoneNo engine to configure; limit sites per request instead
qqGoogle operators such as quoted phrases still work
start (1, 11, 21…)start (0, 10, 20…)Subtract 1: page 2 is start=10
num (1 to 10)NonePage with start
gl, hl, cr, lr, safe, filterSame names
siteSearch and siteSearchFilter (i or e)as_sitesearch and as_dt (i or e)One site per request
exactTermsas_epqA phrase every result contains
excludeTermsas_eqWords no result contains
orTermsas_oqAt least one of these words
hqas_qExtra words added to the query
dateRestrict (d5, w2, m6, y1)as_qdr (d5, w2, m6, y1)Same format
linkSiteas_lqResults that link to a URL
lowRange and highRangeas_nlo and as_nhiA number range
searchType=imagetbm=ischLempile: organic web search first, verticals best-effort
items[]: title, link, snippet, displayLinkorganic_results[]: title, link, snippet, displayed_link, positionRename the fields your code reads
The same search, before and after
# Before: Custom Search JSON API, page 2, one site, past 6 months
curl -sS "https://www.googleapis.com/customsearch/v1?key=$GOOGLE_API_KEY&cx=$SEARCH_ENGINE_ID&q=coffee&siteSearch=example.com&dateRestrict=m6&start=11&gl=us&hl=en"

# After: the same search in SerpApi's format, on Lempile
curl -sS "https://api.lempile.com/search.json?engine=google&q=coffee&as_sitesearch=example.com&as_qdr=m6&start=10&gl=us&hl=en" \
  -H "X-API-KEY: $LEMPILE_API_KEY"

# 202 Accepted: poll search_metadata.json_endpoint until the status
# is "Success" or "Error", then read organic_results

Three differences to plan for:

  • No search engine ID. The sites your engine listed become a filter on each request. as_sitesearch takes one site, so an engine with several sites becomes several requests.
  • Pagination starts at 0, and Google decides how many results a page holds.
  • Timing. Custom Search answers in the same call. Queued APIs such as Lempile return 202 Accepted first, and you poll until the search is done.

Where does Lempile fit?

Lempile's Google Search API takes SerpApi's request format, with the parameters in the table above, and parses Google's results into SerpApi-style JSON. Every search is kept in an archive by search id, with the JSON and the raw HTML. Its limits, from its own docs:

  • Early access, no published price: access and billing are in the Google Search API docs.
  • Queue first: a fresh search returns 202 Accepted; you poll until it finishes. One Google browser job runs per runner by default, and a full queue returns 429 workspace_search_queue_full.
  • Two engines: Google, and Yahoo with engine=yahoo.

If your code needs an answer within the same call, a synchronous API such as Serper fits better (its credits and packs are in our Serper pricing guide). If you only searched your own site, Google's Search Element or Vertex AI Search is the simpler move.

Which replacement should you choose?

Swipe the table sideways to see every column →

If your engine…Move to
searched your own site, shown in a widgetThe Programmable Search Element with "Sites to search" (free)
searched up to 50 domains from your codeVertex AI Search
searched the entire web and you need Google's resultsA Google results API: Serper or DataForSEO for price, SearchApi or SerpApi for monthly plans and legal cover
searched the entire web and any good index will doBrave Search API or one of its alternatives
fed an AI agentTavily, or a Google results API (see SerpApi vs Tavily)
used Google's advanced parameters and you want an archiveLempile (early access)

Whichever you pick, test it on the queries your code really sends before 1 January 2027, and compare the results with what Custom Search returned. For AI agents, SerpApi vs Tavily explains the difference between a results page and page content.

Frequently asked questions

Does Google charge for their Custom Search API?
Yes, past 100 queries a day. Google's overview says the Custom Search JSON API gives 100 free queries a day, then costs $5 per 1,000 queries, up to 10,000 a day. That pricing applies only to existing customers, until the API is discontinued on 1 January 2027. New customers can't sign up.
Can I still get a Google Custom Search API key?
Not for a new project. Google says the Custom Search JSON API is closed to new customers. Existing customers keep their keys until 1 January 2027. For up to 50 domains, Google points to Vertex AI Search; for full web search, it asks you to contact it. Other APIs return Google's results as JSON.
When does the Google Custom Search API shut down?
On 1 January 2027. Google's Programmable Search Engine team announced on 20 January 2026 that Custom Search JSON API users must move to another solution by then. Search engines set to search the entire web have the same deadline, and every engine created since that day can only search sites you list.
How many results can the Custom Search API return?
At most 10 results per request and 100 per query. The num parameter takes 1 to 10, and Google's reference says the API never returns more than 100 results: if start plus num goes past 100, the request fails. Paying customers can send up to 10,000 queries a day.
What is the difference between Programmable Search Engine and the Custom Search JSON API?
Programmable Search Engine is the search engine you set up: which sites it searches, its ranking and its look. The Custom Search JSON API is one way to query it from code, with your engine's ID (cx) and an API key. The free Search Element is another way, a widget on your page.
What is the best alternative to the Google Custom Search API?
It depends on what you searched. For your own site or up to 50 domains, Google suggests Vertex AI Search. For Google's full results as JSON, Serper, DataForSEO, SearchApi, SerpApi and Bright Data cost $0.30 to $25 per 1,000. Brave Search API uses its own index for $5 per 1,000.

Official sources checked

Read on 3 December 2026.

Need Google results after 2026?

Move your Custom Search calls to SerpApi's format: q, gl, hl, start and Google's advanced parameters, Google results parsed into JSON, every search archived. In early access.

Try every endpoint for 7 days. No card needed.