The DynaMed API GET /search/suggestions endpoint returns a list of titles and/or terms that closely match the query supplied to the DynaMed content set. The /search/suggestions endpoint is a good starting point for someone who is not very familiar with the DynaMed content set. The endpoint can search for terms that will return articles available in DynaMed that match the supplied term. The endpoint can also search for terms that match the content in DynaMed. The results will return links that can be used to get the topic content or search for the terms against the DynaMed content set. The /search/suggestions endpoint provides three parameters for specifying the search criteria: the query term, the suggestion type to perform either a title or a term search and the max number of results to return for each suggestion type. Only the search query term is required.
To Perform a Search Suggestions Query (example):
Gather the following information for the request:
- An access token. Please see Use the Client Credentials Grant for further information.
- A word or phrase to search for suggestions.
The request above is for suggestions for the term heart. The request specifies to search for titles in DynaMed content that match the query term and to only return 10 items per page.
The response returned is outlined in the API reference section. The items array will be formatted as either image or non-image items. If image items are mixed with non-image items, the items will still have the same format. The items are sorted by best match order regardless of the order that suggestionType specified.
Error Response Codes
The DynaMed search suggestions endpoint can return one of the error response codes.