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
- What is the Google Custom Search JSON API?
- Is the Google Custom Search API shutting down?
- Does Google charge for the Custom Search API?
- What are the Custom Search API's limits?
- How do I fix the "unregistered callers" error?
- What can replace the Custom Search JSON API?
- How do you move Custom Search code to another API?
- Where does Lempile fit?
- Which replacement should you choose?
- Frequently asked questions
- 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).
# 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 displayLinkThe 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 day | Paid queries a day | Cost a day | Cost over 30 days |
|---|---|---|---|
| 100 | 0 | $0 | $0 |
| 1,000 | 900 | $4.50 | $135 |
| 5,000 | 4,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:
numtakes 1 to 10. - 100 results per query: the API "will never return more than 100 results", and a request where
startplusnumgoes 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 →
| Request | HTTP status | Google's message |
|---|---|---|
| No key parameter | 403 PERMISSION_DENIED | Permission denied on the service. |
| A key that doesn't exist | 400 INVALID_ARGUMENT | API key not valid. Please pass a valid API key. |
Whatever the wording, "unregistered callers" or the 403 above, check these in order:
- Send the key on every request: Google's guide says to append
key=yourAPIKeyto all request URLs. - Use the key of the project that already uses the API: pricing and billing apply only to existing customers.
- 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. - 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 need | Options | Price per 1,000 |
|---|---|---|
| Your site or up to 50 domains, in your page | Programmable Search Element, "Sites to search" | Free |
| Your site or up to 50 domains, through an API | Vertex 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 Google | Contact Google, as its blog post says | Not published |
| Google's results as JSON, from another company | Serper, DataForSEO, Bright Data, SearchApi, SerpApi | Serper $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 index | Brave Search API | $5, with $5 of credit a month (card required) |
| Page content for AI agents | Tavily | $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 API | SerpApi format (Lempile) | Note |
|---|---|---|
| key | X-API-KEY header or api_key | Your new provider's key |
| cx | None | No engine to configure; limit sites per request instead |
| q | q | Google 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) | None | Page with start |
| gl, hl, cr, lr, safe, filter | Same names | |
| siteSearch and siteSearchFilter (i or e) | as_sitesearch and as_dt (i or e) | One site per request |
| exactTerms | as_epq | A phrase every result contains |
| excludeTerms | as_eq | Words no result contains |
| orTerms | as_oq | At least one of these words |
| hq | as_q | Extra words added to the query |
| dateRestrict (d5, w2, m6, y1) | as_qdr (d5, w2, m6, y1) | Same format |
| linkSite | as_lq | Results that link to a URL |
| lowRange and highRange | as_nlo and as_nhi | A number range |
| searchType=image | tbm=isch | Lempile: organic web search first, verticals best-effort |
| items[]: title, link, snippet, displayLink | organic_results[]: title, link, snippet, displayed_link, position | Rename the fields your code reads |
# 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_resultsThree differences to plan for:
- No search engine ID. The sites your engine listed become a filter on each request.
as_sitesearchtakes 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 Acceptedfirst, 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 returns429 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 widget | The Programmable Search Element with "Sites to search" (free) |
| searched up to 50 domains from your code | Vertex AI Search |
| searched the entire web and you need Google's results | A 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 do | Brave Search API or one of its alternatives |
| fed an AI agent | Tavily, or a Google results API (see SerpApi vs Tavily) |
| used Google's advanced parameters and you want an archive | Lempile (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?
Can I still get a Google Custom Search API key?
When does the Google Custom Search API shut down?
How many results can the Custom Search API return?
What is the difference between Programmable Search Engine and the Custom Search JSON API?
What is the best alternative to the Google Custom Search API?
Official sources checked
Read on 3 December 2026.
- Google: Custom Search JSON API: https://developers.google.com/custom-search/v1/overview
- Google: Custom Search JSON API, introduction: https://developers.google.com/custom-search/v1/introduction
- Google: cse.list reference: https://developers.google.com/custom-search/v1/reference/rest/v1/cse/list
- Google: using REST: https://developers.google.com/custom-search/v1/using_rest
- Google: Programmable Search Engine overview: https://developers.google.com/custom-search/docs/overview
- Programmable Search Engine blog: updates of 20 January 2026: https://programmablesearchengine.googleblog.com/2026/01/updates-to-our-web-search-products.html
- Google: migrate from the Site Restricted JSON API: https://developers.google.com/custom-search/v1/site_restricted_api
- Google Cloud: Agent Search pricing: https://cloud.google.com/generative-ai-app-builder/pricing
- Serper: pricing: https://serper.dev/
- DataForSEO: SERP API pricing: https://dataforseo.com/pricing/serp/google-organic-serp-api
- SearchApi: pricing: https://www.searchapi.io/pricing
- SerpApi: pricing: https://serpapi.com/pricing
- Bright Data: SERP API pricing: https://brightdata.com/pricing/serp
- Brave Search API: https://brave.com/search/api/
- Tavily: pricing: https://www.tavily.com/pricing