MEDS API Documentation Title

 

 

Browse our guides and interact with our API reference for more information about MEDSAPI DynaMed. Try MEDSAPI DynaMed and learn about core concepts.

 

 

 

 

Search Suggestions

Basic Search for Suggestions

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 'title' results will return links that can be used to get the topic content.  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 a minimal request:

Request

GET 'https://apis.ebsco.com/medsapi-dynamed/v1/search/suggestions?query=heart&suggestionType=title&maxItemsPerSuggestionType=5'

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 5 items per page.

List of Request Parameters

Parameter Name Description Values
query The word or words to search Any term or partial term
suggestionType The type of matches to be returned: term and/or title title
maxItemsPerSuggestionType Maximum number of results to return for each suggestion type 10 (default)

Response

{
  "_metadata": {
    "totalItems": 2,
    "request": {
      "suggestionType": "term,title",
      "query": "heart",
      "maxItemsPerSuggestionType": "1"
    },
    "links": [
      {
        "rel": "self",
        "href": "https://apis.ebsco.com/medsapi-dynamed/v1/search/suggestions?suggestionType=term,title&query=heart&maxItemsPerSuggestionType=1"
      }
    ]
  },
  "items": [
    {
      "suggestionType": "title",
      "suggestions": [
        {
          "completedPhrase": "Heart Failure With Reduced Ejection Fraction (HFrEF)",
          "resource": {
            "id": "T114099",
            "title": "Heart Failure With Reduced Ejection Fraction (HFrEF)",
            "links": [
              {
                "rel": "self",
                "href": "https://apis.ebsco.com/medsapi-dynamed/v1/articles/T114099"
              }
            ],
            "slug": "/condition/heart-failure-with-reduced-ejection-fraction-hfref"
          }
        }
      ]
    },
    {
      "suggestionType": "term",
      "suggestions": [
        {
          "completedPhrase": "heart failure"
        }
      ]
    }
  ]
}

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.