What Is Google Custom Search JSON API?

Google Custom Search JSON API is a REST API that lets developers retrieve Google-powered web and image search results in JSON format. Applications can use it to display search results, find relevant webpages, or support automated research workflows without sending users to Google.com.
The API works with Google Programmable Search Engine and returns structured data, including page titles, URLs, snippets, and search metadata.
However, Google is discontinuing the Custom Search JSON API on January 1, 2027. The API is already closed to new customers, and existing users must move to another solution before the deadline.
This guide explains how the API works, what developers use it for, its pricing and limitations, and what's changing in 2027.
TL;DR
- What it is: A Google API for retrieving web and image search results programmatically from a configured Programmable Search Engine.
- How it works: Developers send a search query (q), API key (key), and search engine ID (cx) to receive results in JSON format.
- What it costs: Existing customers receive 100 free queries per day, with additional requests costing $5 per 1,000 queries, up to 10,000 queries per day.
- What's changing: The API is closed to new customers. Existing customers must transition by January 1, 2027.
What is Google Custom Search JSON API?
Google Custom Search JSON API is a developer interface that retrieves search results from a configured Google Programmable Search Engine.
Instead of manually entering a query on Google.com, an application sends an HTTP request to Google's API endpoint and receives machine-readable search results.
For example, an internal research application searching for "electric vehicle battery developments" could receive relevant webpages with their titles, links, and descriptions.
The application can then display those results, identify useful sources, or pass the URLs into another research process.
The API supports two search types:
- Web search: Returns webpage results, including titles, URLs, snippets, and metadata.
- Image search: Returns image results and related metadata.
Custom Search JSON API is not the same as unrestricted access to Google.com's search results. Its behavior depends on the configuration and capabilities of the underlying Programmable Search Engine.
What is the difference between Google Programmable Search Engine and Custom Search JSON API?
Google Programmable Search Engine (PSE), formerly Google Custom Search Engine, allows website owners and developers to configure customized Google-powered search experiences.
For example, a university might create a search experience that helps students find information across its academic departments, course catalogs, and research pages.
Programmable Search Engine provides the underlying search configuration, while the Search Element and Custom Search JSON API offer different ways to access its results.
| Component | What it does | Typical use |
|---|---|---|
| Google Programmable Search Engine | Configures the websites and search behavior | Defining a custom search experience |
| Programmable Search Element | Displays a Google-powered search interface on a website | Embedded website search |
| Custom Search JSON API | Returns search results as structured JSON | Applications and automated workflows |
The main difference is how applications access the results.
The Search Element displays a ready-made search interface, while the JSON API gives developers the data to process or display themselves.
This distinction matters because Google is discontinuing the JSON API, but some site-specific Search Element functionality will remain available after January 2027.
How does Google Custom Search JSON API work?
Google Custom Search JSON API follows a request-and-response process. An application sends a search query to Google's API endpoint, and Google returns matching results from the configured search engine in JSON format.
An existing integration needs three main components.
1. A Programmable Search Engine ID
The search engine ID, represented by cx, identifies the configured Programmable Search Engine.
It tells Google which search configuration to use when processing a request.
2. A Google API key
The API key identifies the project making the request and is used to manage access and usage.
Developers should apply appropriate key restrictions and protect credentials from unauthorized use.
3. A search query
The query parameter, q, contains the search terms.
For example, an existing integration could send this HTTP request:
GET https://www.googleapis.com/customsearch/v1?key=YOUR_API_KEY&cx=YOUR_SEARCH_ENGINE_ID&q=electric+vehicle+battery+news
The request uses three key parameters:
| Parameter | Purpose |
|---|---|
| key | Identifies the Google API project |
| cx | Identifies the configured search engine |
| q | Specifies what to search for |
Google processes the request and returns a JSON response.
A simplified response looks like this:
{
"items": [
{
"title": "Electric Vehicle Battery Research",
"link": "https://example.com/battery-research",
"snippet": "Recent developments in electric vehicle battery technology."
}
]
}
Illustrative response, not actual search results.
The items array contains the returned search results. Each result can include a title, a source URL, a snippet, and additional metadata.
The application decides what to do next. It might display the results to users, store selected URLs, or retrieve full-page content through a separate tool.
The API provides search results, not the complete contents of every webpage.
For implementation details, see Google's Custom Search JSON API documentation.
What features does Google Custom Search JSON API support?
Google Custom Search JSON API supports web and image search, language and country controls, domain restrictions, file-type filters, date restrictions, and pagination.
These capabilities help developers control which results are returned and how applications process them.
Web and image search
The API returns webpage results by default.
To request images, developers can use the searchType=image parameter.
This matters for applications that depend on images, because not every web search API supports image results or equivalent metadata.
Language, location, and search filters
The API provides several parameters for refining results:
| Parameter | What it controls |
|---|---|
| lr | Restricts results by document language |
| gl | Boosts results associated with a specified country |
| cr | Restricts results by country |
| dateRestrict | Restricts results by date |
| siteSearch | Includes or excludes results from a specified website, together with siteSearchFilter |
| fileType | Restricts results to particular file extensions |
For example, an application could search for recent PDF reports from a particular website or restrict results to Japanese-language documents.
Pagination and result limits
The API uses num and start to control result pagination.
- num specifies how many results to return per request, up to 10.
- start specifies the position of the first result.
- The API cannot return more than the first 100 results for a query.
These limits are important for applications that need to process larger sets of search results.
The complete parameter list is available in Google's API reference.
What is Google Custom Search JSON API used for?
Google Custom Search JSON API has been used in applications that need search results as structured data rather than a traditional search page.
Common use cases include the following.
1. Search functionality inside applications
Developers can integrate search results into an application's interface.
For example, a research portal could allow users to enter a topic and receive relevant webpages without leaving the portal.
The application controls how those results are organized and displayed.
2. Internal research tools
Organizations may use the API in internal applications that search for technical documentation, industry developments, or other publicly available information.
For example, an internal research dashboard could retrieve relevant results about electric vehicle technology and present them to employees in one place.
3. Automated research workflows
The API can serve as the search component of an automated workflow.
An application might periodically search for new information, collect relevant URLs, and pass those results to another system for review or processing.
4. AI applications and retrieval workflows
AI applications can use search APIs to discover relevant external information.
For example, an AI research assistant could search for technical documents or industry reports, identify useful URLs, and retrieve selected pages for further analysis.
The distinction is that Custom Search JSON API retrieves search results; it does not generate the AI's final answer.
The surrounding application decides how to use that information.
Is Google Custom Search JSON API free?
Google Custom Search JSON API provides 100 free search queries per day for existing customers. Additional queries cost $5 per 1,000 requests, up to Google's documented limit of 10,000 queries per day.
| Usage | Published pricing |
|---|---|
| First 100 queries per day | Free |
| Additional queries | $5 per 1,000 queries |
| Maximum daily query limit | 10,000 |
These rates apply only to existing customers during the transition period. Google no longer accepts new customers for the API.
This pricing is also separate from the free Programmable Search Element, which serves a different purpose.
For current details, see Google's official pricing documentation.
Is Google Custom Search JSON API being discontinued?
Yes. Google is discontinuing the Custom Search JSON API on January 1, 2027. Existing customers must transition to another solution by that date.
Google announced the change on January 20, 2026, alongside updates to its Programmable Search Engine offerings.
However, not every Google search product is being discontinued.
| Google product or feature | What changes in January 2027? |
|---|---|
| Custom Search JSON API | Existing customers must transition to another solution |
| Search Element configured for up to 50 domains | Remains available |
| Search Element searching the entire web or more than 50 domains | Existing configurations must transition |
| Google Search (Google.com) | Not affected by this announcement |
Google recommends Vertex AI Search, now also known as Agent Search, for certain use cases involving up to 50 domains.
For applications requiring full-web search, Google directs customers to inquire about a separate full-web search solution.
This means the shutdown doesn't necessarily affect every business using Google Programmable Search Engine. The impact depends on whether the application uses the retiring JSON API or an affected Search Element configuration.
Read Google's official announcement for the complete transition details.
What should existing Google Custom Search API users do?
Existing users should first identify which applications depend on the API and which capabilities need to be preserved after January 1, 2027.
A search API replacement may require more than changing the endpoint and API key.
Before selecting a replacement, teams should review:
- Existing dependencies: Which applications, scripts, or workflows currently call the Custom Search JSON API?
- Search coverage: Does the application search selected domains, the wider web, or both?
- Required features: Does it depend on image search, regional targeting, domain filtering, pagination, or specific JSON response fields?
- Usage and performance: How many requests does it make, and what reliability and response-time requirements must the replacement meet?
- Integration changes: Which request parameters, authentication details, and response-handling logic need to be updated?
For applications that primarily need structured web search results, another web search API may be an option.
For example, TinySearch provides structured results containing titles, URLs, snippets, and source information. Applications can use those results for research, source discovery, and retrieval workflows.
However, TinySearch should not be assumed to replicate every Google Custom Search JSON API feature. Teams need to verify compatibility, especially for image search, specialized filters, and existing response-handling logic.
Final thoughts
Google Custom Search JSON API made it possible for developers to integrate Google-powered web and image search results directly into applications.
With its discontinuation scheduled for January 1, 2027, existing customers need to evaluate their dependencies and understand which capabilities a replacement must support.
The most useful starting point is to identify how the current integration works, which features it relies on, and what must continue working after the transition.
Migrating from Google Custom Search JSON API?
If your organization relies on the retiring API, talk to the TinyFish sales team about your search requirements and migration options.
AI disclosure
Content on this website may be created or refined with the assistance of AI tools and is subject to human editorial review.



