-
Notifications
You must be signed in to change notification settings - Fork 319
Google Search Provider Configuration
In order to search with Google, you'll need to get a developer key and custom search (cx) id. Instructions for getting these keys are laid out here:
Once you have generated keys, you must enable (turn "On") access to "Custom Search API" for the key pair from the Google Developer Console.
Under "Credentials", you will need to generate a "Public API access" key. The value labeled "API KEY" needs to be configured in your scumblr initializer as follow:
config.google_developer_key = "<API KEY>"
To create a custom search engine and get your "cx" value, follow the instructions here for creating a "Custom Search Engine" under "Prerequisites" section. Once you've created a custom search engine, you'll need the "search engine id" (cx). This can be found on the Basic tab of the search engine page, by clicking "Search engine id". This should be configured in the scumblr initializer as follows:
config.google_cx = '<Search Engine ID>'
If you'd like to search the entire Internet (instead of a specific site or sites) follow these instructions to configure your search provider.
Two other settings "google_application_name" and "google_application_version" can optionally be set. These values will be send to google when a search is performed and prevent deprecation warnings when using the API.
config.google_application_name = 'Scumblr'
config.google_application_version = '1.0'
Note: You will need to restart Scumblr in order for the config change to be picked up.