This module provides a search input form that returns search results from Google. You control which site(s) are indexed. It supports all configuration provided by the Programmable Search Element API. Theming is the responsibility of the site owner.

Drupal core to remove Search

Drupal 12, which is planned to be released in December 2026, will move the core Search module into contributed code. Sites that use Google CSE will need either to:

  • (recommended) update to the forthcoming 6.x version, which will not include a dependency on core Search, or
  • (discouraged) start including the contributed version of the Search module in their codebase and continue to use the 5.x version of Google CSE, which will eventually become unsupported.

Google Programmable Search Engine (formerly "Custom Search Engine") is a free service that can be used to search a set of one or more sites. Google PSE uses Google's index of the site. Content changes are not immediately reflected in the results the way they are with Drupal's core search.

Similar modules

  • google_json_api retrieves search results using Google's JSON API, which can be manipulated and formatted as needed. In contrast, this module (google_cse) just returns the search results from Google as an embed.
  • flexible_google_cse provides some options to customize the search input,. In contrast, this module (google_cse) uses Drupal core's search input block.
  • simple_gse_search provides a search input with no configuration options.

Basic Setup

1. Install this module as you normally would.
2. Create a new Google PSE instance at https://programmablesearchengine.google.com/about/
3. Go to Configuration > Search Pages (/admin/config/search/pages) and create a new search page of type "Google PSE search". Enter the PSE ID from the previous step.
4. Place the core Drupal "Search" block in your layout. Searches will return results from Google.

Supporting organizations: 
Development of Drupal 7 Release
Development and Support of Drupal 7 & 8 Branches
Development and Support of Drupal 8 Release
Development and support of current supported version

Project information

Releases