Google custom search CSE keys

Google custom search CSE keys

Rate this article

Share this article

Read

A Google CSE key pair has two parts: the API key, enabled from the Cloud Developer Console, and the CX (CSE Search Engine ID). The CX is domain-specific, tied to each CSE engine, and there is no global CX. Both the API key and the CX must be included in the JSON API query to retrieve results.

google custom search cse keys for more information.

  • Custom Search Engine (CSE): a search engine whose results are served as per its CSE configuration, such as the “Sites to search” setting in the CSE control panel.
  • Custom Search API: the product enabled from the Cloud Developer Console, used to retrieve results with the JSON API.
  • API key: the key enabled from the Cloud Developer Console that is used along with the CSE engine ID and query.
  • CX: the CSE Search Engine ID, unique per CSE engine.

How to get “CX”

“CX” parameter is mandatory and we get it after entering the domain name, so basically it is domain-specific. So now the question is how to get “CX” that would be global and valid for all of the domains.google custom search cse keys

API key: enabled from the Cloud Developer Console

Google Custom Search Engine (CSE) and Custom Search API (Key enabled from Cloud Developer Console) are different products. Since there is no built-in API with CSE engine, if users want to retrieve results using JSON API, they will need to use the API key (enabled from Cloud Developer Console) along with the CSE engine ID and query. The results will be served as per the CSE configuration.
Key Source Scope
API key Enabled from the Cloud Developer Console Used with the Custom Search API in the JSON API query
CX (CSE Search Engine ID) Obtained after entering the domain name in CSE Domain-specific, unique per CSE engine; there is no global CX

Results and why there is no global CX

Since results will be served as per the “SItes to search” configuration on CSE control panel, the CSE Search Engine ID i.e cx value is per CSE Engine and there is nothing as Global CSE Search Engine. This cx value (CSE Search Engine ID) has to be mentioned in the JSON API query and its unique value.

Build a fully customizable Search without any coding

Are you showing the right products, to the right shoppers, at the right time? Contact us to know more.
You may also like