Created
June 23, 2017 08:27
-
-
Save nikhilkumarsingh/ed3dce2b000c57d987ea3aa6baf85f88 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
import requests | |
API_ENDPOINT = "https://www.wikidata.org/w/api.php" | |
query = "covfefe" | |
params = { | |
'action': 'wbsearchentities', | |
'format': 'json', | |
'language': 'en', | |
'search': query | |
} | |
r = requests.get(API_ENDPOINT, params = params) | |
print(r.json()['search'][0]['description']) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment