How To Create A Google Custom Search API key?
(1) Visit https://console.developers.google.com/
(2) Create your first project if it is the first time to use the API
(3) Name your project anything then after your project will start creating.
(4) Select your created project and on the top, you can see the Enable Search API Key and services option just click on that option If you don’t see this enabling option click on the library option on the left side and you will be redirected to the API library.
(5) Search for the Custom search Api select the first option and enable that addon on your Google console.
Once you enable that Custom search Api now comes to your main page by clicking on Google API.
(6) After enabling the API now on the left-hand side click on credentials and again click on create credentials select the API key now the Search API key is successfully created copy that API key and paste it On your website or anywhere you want.
Also, Read This Articles.