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:
Hope it helps! Good luck with your project