Searching for Suggestions GET V2

Basic Search for Suggestions

The DynaMed API GET /v2/content/search/suggestions endpoint returns a list of titles and/or terms that closely match the query supplied to the DynaMed content set. The /v2/content/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/v2/content/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.

Request Parameters

Parameter NameDescriptionValues
queryThe word or words to searchAny term or partial term
suggestionTypeThe type of matches to be returned: term and/or titletitle
maxItemsPerSuggestionTypeMaximum number of results to return for each suggestion type10 (default)

Response

{
  "_metadata": {
    "totalItems": 2,
    "request": {
      "suggestionType": "term,title",
      "query": "heart",
      "maxItemsPerSuggestionType": "1"
    },
    "links": [
      {
        "rel": "self",
        "href": "https://apis.ebsco.com/medsapi-dynamed/v2/content/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/v2/content/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.