You can filter concepts with the filter
parameter:
- Get concepts that are at level 0 (top level)
https://api.openalex.org/concepts?filter=level:0
{% hint style="info" %} It's best to read about filters before trying these out. It will show you how to combine filters and build an AND, OR, or negation query {% endhint %}
You can filter using these attributes of the Concept
object (click each one to view their documentation on the Concept
object page):
ancestors.id
cited_by_count
ids.openalex
(alias:openalex
)level
works_count
These filters aren't attributes of the Concept
object, but they're included to address some common use cases:
Value: a search string
Returns: concepts with a display_name
containing the given string; see the search page for details.
- Get concepts with
display_name
containing "electrodynamics":
https://api.openalex.org/concepts?filter=display_name.search:electrodynamics
{% hint style="info" %}
In most cases, you should use the search
parameter instead of this filter because it uses a better search algorithm.
{% endhint %}
Value: a Boolean (true
or false
)
Returns: concepts that have or lack a Wikidata ID, depending on the given value. For now, all concepts in OpenAlex do have Wikidata IDs.
- Get concepts without Wikidata IDs:
https://api.openalex.org/concepts?filter=has_wikidata:false