Google Programmable Search Engine offers web developers a platform to make customized search engines for their web pages. This helps them refine web searches and feature specialized information. When we make a programmable search engine using Google, it gives us a search engine ID using which we can access it in our code. In this Answer, we’ll look at how to get that ID.
When we open the Google Programmable Search Engine platform, we reach the following landing page:
To create our own search engine, we begin by clicking the “Get started” button. After logging in using our Google account, we get to the dashboard:
Here we click on the “Preview” button to get to the new search engine control panel:
On the control panel, we have several options to customize our search engine. We can give it a name of our liking. We can also set it to search specific sites (or site) or to search the entire internet. We can also choose to search for images by checking the “Image search” toggle button. If we want, we can choose to have the SafeSearch option on.
After filling in the required inputs, we check the “I’m not a robot” captcha and then click on “Create” to get our programmable search engine.
After clicking "Create", we get the following HTML code which we can use in our web application to access the search engine.
To get our programmable search engine ID, we click on "Customize" which takes us to a dashboard like the one shown below. Finally, in the "Overview" section, we can see the "Search engine ID". We can copy this to our clipboard with the click of a button.