What is Google Programmable Search Engine? How Does it Work?

Pooja Gurung
What is Google Programmable Search Engine?

Google Programmable Search Engine (PSE) is a tool that lets website owners create customized search experiences using Google's search technology. Instead of sending visitors to Google.com, organizations can add a search box to their own websites and choose which websites or pages appear in the results.

For example, a university can use PSE to help students search its course catalogs, academic departments, and research pages. Google handles the search functionality, while the university controls the sources and presentation.

PSE remains available for site-specific search, although Google is changing some of its capabilities ahead of January 1, 2027.

TL;DR

  • Google Programmable Search Engine lets websites offer customized search across selected websites and pages.
  • It uses Google's search index and provides an embeddable Search Element, so website owners don't need to build their own search engine.
  • Features include web and image search, autocomplete, customizable layouts, and search refinements.
  • The standard Search Element is free and ad-supported.
  • From January 1, 2027, the Search Element will continue supporting up to 50 selected domains. Google's Custom Search JSON API and affected broader search configurations must transition.

What is Google Programmable Search Engine?

Google Programmable Search Engine, formerly known as Google Custom Search Engine, allows organizations to create search experiences focused on specific websites, pages, or topics.

Unlike Google.com, which searches broadly across the web, PSE lets website owners define the sources their search engine should cover.

Common use cases include:

  • Universities: Help students find courses, academic resources, and research information.
  • Publishers: Allow readers to search articles, archives, and related publications.
  • Businesses: Help customers find product documentation, support articles, and other resources.

PSE uses Google's existing search index, meaning organizations don't have to crawl and index websites themselves.

However, a page generally needs to be in Google's index to appear in PSE results. Adding a website to the search configuration doesn't guarantee that every page will be available.

Use TinyFish in your agent

Add TinyFish to ChatGPT, Claude, Cursor and more in one click.

Connect TinyFish

How does Google Programmable Search Engine work?

Google Programmable Search Engine combines a set of selected websites, Google's search index, and a search interface to return relevant results.

The process works in three steps.

1. Select the websites to search

The website owner chooses which websites or pages to include.

For example, a university might configure PSE to search its main website, departmental websites, and research publications.

The supported site-specific Search Element allows up to 50 selected domains.

2. Google processes the query

When someone enters a query, Google looks for relevant indexed pages within the configured search sources.

For example, searching "computer science courses" could return course descriptions, departmental information, and related academic pages.

3. Display the results

Google returns the matching results through the Programmable Search Element, which can be embedded into the organization's website.

Website owners can customize the layout, while Google handles the underlying search functionality.

How do you create a Google Programmable Search Engine?

You can create a Programmable Search Engine using Google's Control Panel and add it to your website with a JavaScript snippet.

Follow these steps:

  1. Open the Programmable Search Engine Control Panel.
  2. Sign in with your Google account.
  3. Enter a name for your search engine.
  4. Add the websites or pages you want to search.
  5. Create the search engine and configure options such as image search, SafeSearch, and result appearance.

Once configured, Google provides a search engine ID and code for embedding the Search Element.

A basic implementation looks like this:

code
<script async src="https://cse.google.com/cse.js?cx=YOUR_SEARCH_ENGINE_ID"></script>

<div class="gcse-search"></div>

Replace YOUR_SEARCH_ENGINE_ID with the ID from your Control Panel.

The JavaScript loads Google's search functionality, while the gcse-search element determines where the search box and results appear.

This approach uses the embedded Search Element, not the Custom Search JSON API.

For additional customization, see Google's Search Element documentation.

What is the difference between Google Programmable Search Engine and Custom Search JSON API?

Programmable Search Engine configures the search experience, while Custom Search JSON API lets applications retrieve search results programmatically.

They are related but serve different purposes.

ComponentWhat it does
Programmable Search EngineConfigures the websites and search settings
Programmable Search ElementDisplays a search box and results directly on a website
Custom Search JSON APIReturns structured JSON results for software applications

For example, a university website that needs an embedded search box can use the Search Element.

An internal research application that needs to automatically retrieve and process search results might instead use the JSON API.

This distinction matters because Google is discontinuing the JSON API, while its supported site-specific Search Element remains available.

For a deeper explanation, see Google's Custom Search JSON API overview.

What features does Google Programmable Search Engine support?

Google Programmable Search Engine provides several features for customizing search functionality.

  • Web and image search: Find webpages and images from configured sources.
  • Customizable layouts: Control how the search box and results appear.
  • Autocomplete: Suggest search queries as users type.
  • Search refinements: Let visitors narrow results by categories, such as courses, documentation, or articles.
  • Promotions: Highlight selected pages for relevant queries.
  • Structured data support: Use supported structured data to enrich certain search results.

These features help organizations improve content discovery without building and maintaining their own search infrastructure.

Is Google Programmable Search Engine free?

Yes. Google's standard Programmable Search Element is free, although advertisements may appear alongside results.

Google also offers ad-free arrangements for eligible organizations and has a paid Search Element offering that is closed to new customers.

The separate Custom Search JSON API provides existing customers with 100 free queries per day, followed by $5 per 1,000 additional queries, subject to its documented limits.

However, that API is being discontinued on January 1, 2027.

See Google's Programmable Search Engine overview for details.

Is Google Programmable Search Engine being discontinued in 2027?

No. Google Programmable Search Engine is not shutting down entirely. However, certain search configurations and the Custom Search JSON API are being retired.

Google announced these changes on January 20, 2026, with a transition deadline of January 1, 2027.

Here's what changes:

  • Search Element covering up to 50 domains: Remains available for site-specific search.
  • Search Element searching the entire web or more than 50 domains: Existing configurations must transition.
  • Custom Search JSON API: Existing customers must migrate, and the API is already closed to new customers.

Google recommends Vertex AI Search for certain requirements involving up to 50 domains and provides a separate inquiry route for customers requiring full-web search.

For complete details, see Google's official announcement.

Organizations using the retiring JSON API should first identify which applications depend on it and what search capabilities they need to preserve.

For programmatic web-search workloads, TinySearch is one option to evaluate, although technical compatibility should be verified before switching.

Affected by the Google Custom Search API shutdown? Talk to the TinyFish sales team about your existing 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.

FAQ

Questions, answered.

Do you need coding skills to use Google Programmable Search Engine?

Can Google Programmable Search Engine search pages that Google hasn't indexed?

Get started

Start building.

No credit card. No setup. Run your first operation in under a minute.

Get $8 in Wallet fundsRead the docs