You can get lists of topics:
- Get all topics in OpenAlex
https://api.openalex.org/topics
Which returns a response like this:
{
"meta": {
"count": 4516,
"db_response_time_ms": 10,
"page": 1,
"per_page": 25,
"groups_count": null
},
"results": [
{
"id": "https://openalex.org/T11475",
"display_name": "Territorial Governance and Environmental Participation",
// more fields (removed to save space)
},
{
"id": "https://openalex.org/T13445",
"display_name": "American Political Thought and History",
// more fields (removed to save space)
},
// more results (removed to save space)
],
"group_by": []
}
By default we return 25 results per page. You can change this default and page through topics with the per-page
and page
parameters:
- Get the second page of topics results, with 50 results returned per page
https://api.openalex.org/topics?per-page=50\&page=2
You also can sort results with the sort
parameter:
- Sort topics by cited by count, descending
https://api.openalex.org/topics?sort=cited\_by\_count:desc
Continue on to learn how you can filter and search lists of topics.
You can use sample
to get a random batch of topics. Read more about sampling and how to add a seed
value here.
- Get 10 random topics
https://api.openalex.org/topics?sample=10
You can use select
to limit the fields that are returned in a list of topics. More details are here.
- Display only the
id
,display_name
, anddescription
within topics results
https://api.openalex.org/topics?select=id,display\_name,description