Where to find the Google CSE ID?

If you want to use the GoogleSearch (CSE) component in your Joomla site, you need the Google CSE ID. So where do you find this Google CSE ID?

The Google CSE ID is the unique CSE ID generated by Google for it's Custom Search Engine (CSE). It looks something like partner-pub-1234567812345678:1smy9a-qdjr. It shows up as a "cx" value in the search box code provided by Google.

Note that you can create a Custom Search Engine (CSE) using both AdSense for search and Custom Search.

Using AdSense for Search

  1. Login to your Google Adsense admin
  2. Click "My Ads" on the top menu
  3. Click "Search" followed by "Custom Search Engines" on the left menu
  4. Click "Get code" and copy the Search Box Code.
  5. The Google CSE ID is the value that corresponds to name="cx".
  6. <input type="hidden" name="cx" value="partner-pub-1234567812345678:1smy9a-qdjr" />
    
  7. Copy the Google CSE ID.
  8. Go to your Joomla backend and login as administrator. Select Components > googleSearch(CSE) > Config
  9. Click on the corresponding Search Engine and enter the Google CSE ID

Using AdSense for Search

  1. Login to Google's Custom Search
  2. Click on the corresponding Search Engine.
  3. Click the button "Search engine ID". The Google CSE ID will be displayed.
  4. Copy the Google CSE ID.
  5. Go to your Joomla backend and login as administrator. Select Components > googleSearch(CSE) > Config
  6. Click on the corresponding Search Engine and enter the Google CSE ID

What do the different free editions mean? "Free" and "Free - (partner CSE)

  • If you create the Search Engine using Google's Custom Search, you will see it listed as "Free" in the column "Edition". The Google CSE ID will appear in the following format:
  • 123456789012345678901:abcdef12345

  • However, if you create the Search Engine from within Google Adsense, then it will be listed as Free - (partner CSE) in the column "Edition". The Google CSE ID will appear in the following format:
  • partner-pub-1234567890123456:abcde12345

  • As advised by Google in this article, "If you already have an existing AdSense account, we recommend that you create all your search engines in AdSense for search."
  • For my case, I also find that only the custom search engine created from within Google AdSense works with this component, i.e. use the Google CSE ID that starts with "partner-pub-".
  • Once you have created the Custom Search Engine in Google AdSense, you can then edit the search engine using Google Custom Search, which has some additional features for customization, refinements, etc.

Add comment


Security code
Refresh