SEO

Google Custom Search: Setup, API, and Usage Guide

Configure Google Custom Search for your website. Understand the Programmable Search Engine, integrate the JSON API, and monetize your search results.

6.6k
google custom search
Monthly Search Volume

Google Custom Search (now branded as Programmable Search Engine) lets you add a search box to your website that returns results from Google’s index, limited to domains you specify. You control which sites are searched, how results appear, and whether to monetize the results page with ads. For marketers, it offers site search without server maintenance, plus API access for custom tools and applications.

Google Custom Search is the former name for Programmable Search Engine (PSE), a platform Google launched in October 2006 (originally called Google Co-op). It allows you to create a search engine that searches specific websites, collections of sites, or images using the same core technology that powers Google.com.

The platform offers two access methods: - Embedded Search Box: A pre-built widget you add to web pages via HTML code. - Custom Search JSON API: A RESTful interface that returns search results in JSON format for custom applications.

Why Google Custom Search matters

  • Keeps traffic on-site: Visitors find answers without leaving your domain, reducing bounce rates and increasing page views.
  • Controls content scope: Limit searches to your domain, partner sites, or specific verticals to ensure relevance and quality.
  • Generates revenue: Connect your engine to Google AdSense to display ads on search results pages and earn revenue from clicks.
  • Zero index maintenance: Google handles crawling and indexing; you configure the engine via a control panel without managing servers.
  • Flexible pricing for developers: The JSON API includes 100 free queries per day, with paid tiers for higher volumes.
  • Brand consistency: Choose pre-built themes or design your results page from scratch to match your site’s visual identity.

How Google Custom Search works

  1. Configure your engine: Use the Programmable Search Engine Control Panel to select which sites to search and set ranking preferences.
  2. Get credentials: For the JSON API, locate your Search Engine ID and generate an API key from the Google Cloud Console.
  3. Integrate: Add the provided HTML code to your site for the embedded box, or make RESTful API calls for custom implementations.
  4. Monitor: Track usage through the Cloud Platform Console's API Dashboard or Google Cloud's Operations suite for advanced alerting and metrics.
  5. Monetize (optional): Link your AdSense account to display ads alongside results.

Best practices

  • Curate your site list: Include only authoritative domains to prevent diluting results with off-brand or low-quality content.
  • Set up billing before scaling: If using the API, enable billing in the API Console to avoid service interruption when you exceed 100 daily queries.
  • Customize the UI: Use the theme options or build a custom results page to maintain visual consistency with your brand.
  • Monitor quota usage: Check the Cloud Platform Console regularly to predict when you'll need to upgrade from the free tier.
  • Distinguish from Cloud Search: Use Programmable Search Engine for public web content; choose Google Cloud Search for internal enterprise documents.

Common mistakes

  • Mistake: Confusing Programmable Search Engine with Cloud Search. Fix: Use PSE for public website search and Cloud Search for secure internal business content.
  • Mistake: Hitting API limits without realizing. Fix: Set up alerts in the Cloud Platform Console when approaching the 100 query/day free threshold; additional queries cost $5 per 1,000 queries up to 10,000 per day.
  • Mistake: Forgetting to retrieve the Search Engine ID. Fix: Visit the control panel help center to locate this required credential before deploying the API.
  • Mistake: Expecting historical features. Fix: Note that Subscribed Links were discontinued on September 15, 2011 and are no longer available.

Examples

Example scenario: A marketing blog uses the embedded search box restricted to its own domain and three trusted partner sites. They enable AdSense to monetize search traffic, earning revenue when visitors click ads on results pages.

Example scenario: A developer builds a price comparison tool using the JSON API to search specific e-commerce sites. They cache results to stay within the 100 free daily queries, displaying data in a custom mobile app interface.

Example scenario: An enterprise mistakenly tries to use PSE to search internal HR documents. They switch to Google Cloud Search for secure access to internal content, using PSE only for their public-facing support site.

Use this table to choose the right tool:

Feature Programmable Search Engine (Custom Search) Google Cloud Search
Content type Public websites and images Internal enterprise content
Access Public or restricted site search Secure, employee-only access
Monetization AdSense integration available Enterprise pricing model
Setup Control panel, JSON API Google Cloud integration
Best for External marketing sites, blogs, directories Internal knowledge bases, document repositories

Rule of thumb: If your content is public and you want SEO benefits or ad revenue, use Programmable Search Engine. If content is internal and sensitive, use Cloud Search.

FAQ

Q: Is Google Custom Search the same as Programmable Search Engine? Yes. Google Custom Search was rebranded as Programmable Search Engine (PSE). It was originally launched as Google Co-op in October 2006.

Q: How much does the Custom Search JSON API cost? The API provides 100 free queries per day. Beyond that, you pay $5 per 1,000 queries, with a current daily maximum of 10,000 queries.

Q: Can I restrict searches to just my website? Yes. During setup, you specify which sites to include. You can list a single domain or multiple specific URLs.

Q: How do I earn money from search results? Connect your Programmable Search Engine to a Google AdSense account. Relevant ads will appear on your search results pages, and you earn revenue from valid clicks.

Q: What happened to Google Site Search? Google Site Search was discontinued. Programmable Search Engine is the current supported solution for adding Google-powered search to websites.

Q: What do I need to start using the JSON API? You need a configured Programmable Search Engine (to get a Search Engine ID) and an API key from the Google Cloud Console.

Start Your SEO Research in Seconds

5 free searches/day • No credit card needed • Access all features