Skip to content
This repository has been archived by the owner on May 22, 2019. It is now read-only.

Google API Setup for Image Search Command

appu1232 edited this page Jul 20, 2017 · 7 revisions

In order to use the >i command to image search, you will need a Google API key and a Custom Search Engine ID.

Follow these steps to obtain them:

  1. Visit the Google API Console. Once you are in the Console, create a new project.
  2. Go to Library and search Custom Search API. Click it and enable it.
  3. Go to Credentials and click create credentials and choose API Key (no need to restrict the key). The value under "Key" is your api key. Paste this into the optional_config.json under google_api_key.
  4. Go here and click Add and then Create (if asked to specify a site, just do www.google.com)
  5. On the home page of the Custom Search webpage, click on the newly created search engine and change the Sites to Search option to Search the entire web but emphasize included sites.
  6. Make sure the Image search option is enabled and make sure to click the Update button at the bottom when you are done with the changes!
  7. Go to Details section and click Search Engine ID to grab the ID. Copy this and add it for custom_search_engine in the optional_config.json.

Note: Google may take a little while to properly register your key so the search feature may not work right away. If it's still not working after a few hours, then you may have messed up somewhere.

Important Note: Free custom search has a limit of 100 searches per day. The commands >i and >mal use this search. Still, this should be more than enough but feel free to pay for more if you would like, although I don't think it's needed.