Hi everyone! I wanted to share with you some instructions to start working with Google Custom Search for out Image Search Abstraction Layer project, since this is a great API for the project. I hope it helps!
- First of all, you must go to Google Custom Search https://developers.google.com/custom-search/
- Click on Sign In at the top right corner of the screen
- Log in to your account
- Go to Create a custom search engine tab and read the section Defining a Custom Search Engine in Control Panel
- Click on the link âControl panelâ
- Next, provide a url to create your search engine e.g www.google.com (donât worry, we will remove this later)
- select language and give the search engine a name
- Then, create the search engine and go to the Edit search engine tab
- Select your custom search engine
- Enable image search by clicking on the button to the right of Image search
- On the panel that displays the site you entered initially, click on the top menu, where it says search only site youâve included and change it to search the whole web but emphasize sites youâve included
- next, delete the site you included.
Now youâve configured your custom search engine, but to get the actual URL to query the API you must:
- go to the âdetailsâ section right above the previous panel and click on "Search Engine ID" . This will be the cx parameter on your URL, one of the three required parameters
- Next you need a key parameter that you can find in the documentation by being logged in to your account and clicking on the button key.
- AND⌠for this project, you will want to filter the search to only images by adding the searchType parameter in the url set to image.
You can find the documentation and a âplaygroundâ on these links:
https://developers.google.com/custom-search/json-api/v1/reference/cse/list
https://developers.google.com/custom-search/docs/tutorial/creatingcse
Hope it helps! Good luck with your project