Created
December 23, 2016 15:45
-
-
Save ricrogz/bef9042e1e4928f8b9cda720cac72b53 to your computer and use it in GitHub Desktop.
Google Custom Search JSON API example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
api = "api_key" | |
search_id = "search_id_code" | |
query = "query words" | |
url="https://www.googleapis.com/customsearch/v1?key={}&cx={}&q={{}}&fields=items(link)&dateRestrict=y2&start=11".format(api, search_id); | |
a = requests.get(url.format(query)); print(a.status_code); a.json() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment