Sign up Google Developer console, create project, generate API key
http://stackoverflow.com/questions/4082966/google-web-search-api-deprecated-what-now/11206266#11206266
Example Code:cx is custom search engine key, developer key is API key
"" "Simple command-line example for Custom Search.
Command-Line application that does a search.
"""
__author__ = ' [email protected] (Joe Gregorio) '
Import Pprint
From Apiclient.discovery Import Build
def main ():
# Build A service object for interacting with the API. Visit
# The Google APIs Console # to get a API key for your own application.
Service = Build ("Customsearch", "V1",
developerkey= "Aizasyawk-vgppyoaktoexv-xedtleoibffrvlu")
res = SERVICE.CSE (). List (
Q= ' chemical spill West Virginia ',
cx= ' 008308517875943079687:j1fqrkb1_yi ',
). Execute ()
Pprint.pprint (RES)
if __name__ = = ' __main__ ':
Main ()
Set up custom Search API