Visitors type a query into a box on your website and get results from Google's index, limited to the sites you choose. You set the engine up in a control panel and paste a snippet of code into your pages; Google does the crawling and indexing. Google renamed the product Programmable Search Engine, but most people still look for it as Google Custom Search.
Today it's mainly a quick way to add site search to a public website, and in 2026 Google narrowed what it does.
What changed in 2026
If you're setting one up now, or you rely on one already, two changes matter:
- No more searching the whole web for new engines. Since January 20, 2026, every new search engine must use "Sites to search", which covers up to 50 domains. Engines that already had "Search the entire web" switched on can keep it until January 1, 2027. If you switch it off, you can't switch it back on (Programmable Search Engine Help).
- The Custom Search JSON API is closing. The API returns results as JSON for use in your own apps. It's closed to new customers, and existing customers have until January 1, 2027 to move to something else. For searching up to 50 domains, Google suggests Vertex AI Search. Until the shutdown, existing customers get 100 free queries a day and pay $5 per 1,000 more, up to 10,000 a day (Google for Developers).
So Programmable Search Engine is no longer a way to put Google's results for the whole web into your own tool. It's a search box for a defined set of sites.
How to set up a search box for your site
- Open the Programmable Search Engine control panel and create a search engine.
- Under Sites to search, add the sites or parts of sites you want included. Under Sites to exclude, add any you want left out.
- Choose a pre-built theme, or design the results page yourself.
- Copy the code and paste it into your site where the search box should appear.
Sites are added as URL patterns:
| Pattern | What it includes |
|---|---|
*.example.com/* |
The whole domain, including subdomains such as blog.example.com |
www.example.com/* |
Everything on www.example.com and example.com, but not blog.example.com |
www.example.com/help/* |
Only pages whose address starts with www.example.com/help/ |
www.example.com/pricing.html |
That single page |
Patterns are case-sensitive. One engine can hold up to 5,000 patterns from no more than 50 different domains. Patterns covering a whole public suffix, such as *.com, aren't allowed.
Earning money from the results page
The free version shows ads. To earn a share of the ad revenue, create a "Search engine" ad unit from your Google AdSense account. You can't switch on revenue sharing for an engine you created earlier: you need a new one made in AdSense. Revenue only counts for ads shown in the search box on your own site, not when a visitor leaves your site or uses Google's hosted results page (Programmable Search Engine Help).
Is it the right choice for your site?
It suits a public site that wants a free, decent search box quickly. Before you choose it, weigh what follows from how it works:
- It only finds what Google has indexed. The results come from Google's index, so it follows that a page Google hasn't indexed yet, or one you've marked noindex, can't appear in your own site search either. Your site's indexing becomes your search quality.
- Ads come with the free version. Removing them costs money.
- You can't tune ranking freely the way you can with your own search index.
Pick by your situation:
| Your situation | Option |
|---|---|
| Public site, small budget, ads acceptable | Programmable Search Engine |
| You need results inside your own app | Not the JSON API any more: Google points to Vertex AI Search |
| Internal company documents | Google points to Cloud Search, its enterprise search for internal content |
| Full control over results and freshness | Your CMS's built-in search or a hosted search service |