Last active
February 9, 2022 16:51
-
-
Save hpiwowar/c33adcaa03a1de6c00638acef3b4e7ef to your computer and use it in GitHub Desktop.
Sample code to get the children concepts of Library Science, using the OpenAlex API
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
import requests | |
api_response = requests.get("https://api.openalex.org/concepts?filter=ancestors.id:C161191863") | |
parsed_response = api_response.json() | |
result_list = parsed_response["results"] | |
for result in result_list: | |
print(result["display_name"], result["id"], result["level"]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment