The best way to search for concepts is to use the search query parameter, which searches the display_name and description fields. Example:
- Search concepts'
display_nameanddescriptionfor "artificial intelligence":
https://api.openalex.org/concepts?search=artificial intelligence
{% hint style="info" %} You can read more about search here. It will show you how relevance score is calculated, how words are stemmed to improve search results, and how to do complex boolean searches. {% endhint %}
You can also use search as a filter, allowing you to fine-tune the fields you're searching over. To do this, you append .search to the end of the property you are filtering for:
- Get concepts with "medical" in the
display_name:
https://api.openalex.org/concepts?filter=display_name.search:medical
The following field can be searched as a filter within concepts:
| Search filter | Field that is searched |
|---|---|
display_name.search |
display_name |
You can also use the filter default.search, which works the same as using the search parameter.
You can autocomplete concepts to create a very fast type-ahead style search function:
- Autocomplete concepts with "comp" in the
display_name:
https://api.openalex.org/autocomplete/concepts?q=comp
This returns a list of concepts with the description set as the hint:
{
"results": [
{
"id": "https://openalex.org/C41008148",
"display_name": "Computer science",
"hint": "theoretical study of the formal foundation enabling the automated processing or computation of information, for example on a computer or over a data transmission network",
"cited_by_count": 392939277,
"works_count": 76722605,
"entity_type": "concept",
"external_id": "https://www.wikidata.org/wiki/Q21198"
},
...
]
}
{% hint style="info" %} Read more in the autocomplete page in the API guide. {% endhint %}