Skip to content

Instantly share code, notes, and snippets.

@hpiwowar
Last active February 9, 2022 16:51
Show Gist options
  • Save hpiwowar/c33adcaa03a1de6c00638acef3b4e7ef to your computer and use it in GitHub Desktop.
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
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