Skip navigation

MedlinePlus Connect: Web Service

MedlinePlus Connect is available as a Web application or Web service. Below are the technical details for implementing the Web service, which responds to requests based on:

If you use data from the MedlinePlus Connect Web Service, please indicate that the information is from MedlinePlus.gov. You are welcome to link to and display the data provided by MedlinePlus Connect. For more information on how to link to MedlinePlus content outside of this service, please see our guidelines and instructions on linking.

If you decide to use MedlinePlus Connect, sign up for the email list to keep up with developments and exchange ideas with your colleagues. Please tell us if you implement MedlinePlus Connect by contacting us.

Web Service Overview

The REST-based MedlinePlus Connect Web service conforms to the HL7 Context-Aware Knowledge Retrieval (Infobutton) Service-Oriented Architecture Implementation Guide, which uses Atom as the framework for the knowledge response. The output of the request is XML, which is presented in the Atom feed format.

The structure of the request indicates what type of code you are sending. In all cases, the base URL for the Web service is:

http://apps.nlm.nih.gov/medlineplus/services/mpconnect_service.cfm

MedlinePlus Connect works over HTTP or HTTPS.

Requests for Diagnosis (Problem) Codes

For a problem code, MedlinePlus Connect will return links and information for up to three MedlinePlus health topic pages. The service can provide a response to a diagnosis code request in English or Spanish.

MedlinePlus Connect will return the following:

  • MedlinePlus health topic page title (up to three matches). To see the range of possible matches, refer to the full list of MedlinePlus health topics.
  • MedlinePlus health topic page URL
  • Synonyms for that topic ("Also called")
  • MedlinePlus health topic summary, including formatting and links to other appropriate MedlinePlus topics
  • Summary attribution
  • Selected links for patients, including formatting, the page name, URL, and associated organization (when applicable)
There may not always be a match for each code. In those cases, MedlinePlus Connect will return a null response.

The base URL of the service is:
http://apps.nlm.nih.gov/medlineplus/services/mpconnect_service.cfm

There are two required parameters for any query to this service:
  1. Code System
  2. Identify the problem code system you will be using, either ICD-9-CM or SNOMED CT.

    For ICD-9-CM use:
    mainSearchCriteria.v.cs=2.16.840.1.113883.6.103

    MedlinePlus Connect will also accept:
    mainSearchCriteria.v.cs=2.16.840.1.113883.6.2
    mainSearchCriteria.v.cs=2.16.840.1.113883.6.42

    For SNOMED CT use:
    mainSearchCriteria.v.cs=2.16.840.1.113883.6.96

  3. Code
  4. Identify the actual code that you are trying to look up:
    mainSearchCriteria.v.c=250.33

Optional Parameters

Code Title
You may also identify the name/title of the problem code. However, this information does not impact the response (unlike the MedlinePlus Connect Web application where the name/title information may be used).
mainSearchCriteria.v.dn=Diabetes mellitus with other coma type 1 uncontrolled

Language
Identify if you would like the request to be in English or Spanish. MedlinePlus Connect will assume English is the language if it is not specified.

If you wish the response to the problem code lookup to be in Spanish, use:
informationRecipient.languageCode.c=sp

To specify English, use the following:
informationRecipient.languageCode.c=en

Description of Selected Atom: Entry Node Elements in Response to Problem Code Requests

Element Class node Description
title    Title of matched MedlinePlus health topic page
link   URL for matched MedlinePlus health topic page
summary   The full summary for the health topic. This includes embedded links to other relevant health topics, and all formatting, including bullets and paragraph spacing. The summary is in HTML.
summary class="NLMalsoCalled" Synonyms for the topic. These are referred to as "Also called" on a health topic page. Not all topics have "Also called" terms.
summary class="NLMattribution" Attribution acknowledgement for summary text, if the majority of the summary was from another federal agency. Not all summaries have an attribution. Unattributed text is original to MedlinePlus.
summary class="NLMrelatedLinks" Selected links associated with the topic. This includes the page name, URL, and associated organization (when applicable). The links are formatted in a bulleted list. Not all topics have these links. The number of links can range from zero to dozens.

Examples of Requests for Problem Codes

A complete request for Diabetes Mellitus with other coma type 1 uncontrolled, ICD-9 code 250.33, for a Spanish speaking patient would have the following URL address:

http://apps.nlm.nih.gov/medlineplus/services/mpconnect_service.cfm?mainSearchCriteria.v.cs=2.16.840.1.113883.6.103&mainSearchCriteria.v.c=250.33&mainSearchCriteria.v.dn=Diabetes%20mellitus%20with%20other%20coma%20type%201%20uncontrolled&informationRecipient.languageCode.c=sp


A patient diagnosed with "Pneumonia due to Pseudomonas" using SNOMED CT code 41381004:

http://apps.nlm.nih.gov/medlineplus/services/mpconnect_service.cfm?mainSearchCriteria.v.cs=2.16.840.1.113883.6.96&mainSearchCriteria.v.c=41381004&mainSearchCriteria.v.dn=Pneumonia%20due%20to%20Pseudomonas%20%28disorder%29&informationRecipient.languageCode.c=en


Related Services and Files

To receive MedlinePlus health topics in response to text requests, as opposed to problem codes, investigate the MedlinePlus Web service. Also, if you need the full set of MedlinePlus health topics in XML format, see our XML files page.

Requests for Drug Information

MedlinePlus Connect provides the best drug information matches when receiving an RXCUI. It also provides good results when receiving an NDC code. If you do not send an NDC code, the system will use the text string that you send to find the best possible drug information match.

The MedlinePlus Connect Web service will return the following:

  • MedlinePlus medication page title
  • MedlinePlus medication page URL

There could be multiple responses to one medication request. There may not always be a match for each request. In those cases, MedlinePlus Connect will return a null response. At this time, MedlinePlus Connect provides responses to medication information in English only.

For requests for drug information, the base URL is:
http://apps.nlm.nih.gov/medlineplus/services/mpconnect_service.cfm

To send a request, include these pieces of information:
  1. Code System
  2. Identify the type of medication code you are sending.
    For RXCUI use:
    mainSearchCriteria.v.cs=2.16.840.1.113883.6.88

    For NDC use:
    mainSearchCriteria.v.cs=2.16.840.1.113883.6.69

    MedlinePlus Connect can also accept a text string, but you must indicate you are looking for medication information by including one of the two code systems listed above.

  3. Code
  4. Identify the actual code you are trying to look up.
    mainSearchCriteria.v.c=637188

  5. Drug Name
  6. Identify the name of the drug with a text string.
    mainSearchCriteria.v.dn=Chantix 0.5 MG Oral Tablet

At a minimum you should identify the code system and the code, or the code system and the name of the drug. Send all three for best results.

Description of Selected Atom: Entry Node Elements in Response to Medication Requests

Element Description
title Title for matched MedlinePlus medication page
link URL for the matched MedlinePlus medication page

Your medication information request should look like one of the following.

To request information by an RXCUI, your request should look like this:
http://apps.nlm.nih.gov/medlineplus/services/mpconnect_service.cfm?mainSearchCriteria.v.cs=2.16.840.1.113883.6.88&mainSearchCriteria.v.c=%20637188%20&mainSearchCriteria.v.dn=Chantix%200.5%20MG%20Oral%20Tablet

To request information by an NDC, your request should look like this:
http://apps.nlm.nih.gov/medlineplus/services/mpconnect_service.cfm?mainSearchCriteria.v.cs=2.16.840.1.113883.6.69&mainSearchCriteria.v.c=%2000310-0751-39&mainSearchCriteria.v.dn=Crestor%2010%20MG%20Oral%20Tablet

To send a Text String without a medication code, you must identify your query as an NDC-type request so MedlinePlus Connect knows you are looking for medication information. Your request could look like this:
http://apps.nlm.nih.gov/medlineplus/services/mpconnect_service.cfm?mainSearchCriteria.v.cs=2.16.840.1.113883.6.69&mainSearchCriteria.v.dn=Chantix%200.5%20MG%20Oral%20Tablet

Requests for Lab Test Information

MedlinePlus Connect provides matches to laboratory test information when receiving a LOINC request. The service can provide a response in English or Spanish.

The MedlinePlus Connect Web service will return the following:

  • MedlinePlus lab test page title
  • MedlinePlus lab test page URL
There may not always be a match for each code. In those cases, MedlinePlus Connect will return a null response.

The base URL of the service is:
http://apps.nlm.nih.gov/medlineplus/services/mpconnect_service.cfm

These are two required parameters for any lab test query to this service:

  1. Code System
    Identify that you are using the LOINC code system. Use:
    mainSearchCriteria.v.cs=2.16.840.1.113883.6.1
  2. MedlinePlus Connect will also accept:
    mainSearchCriteria.v.cs=2.16.840.1.113883.11.79

  3. Code
    identify the actual code you are trying to look up:
    mainSearchCriteria.v.c=3187-2

Optional Parameters

Code Title
You may also identify the name of the lab test. However, this information does not impact the response.
mainSearchCriteria.v.dn=Factor IX assay

Language
Identify if you would like the request to be in English or Spanish. MedlinePlus Connect will assume English is the language if it is not specified.

If you wish the response to be in Spanish, use:
informationRecipient.languageCode.c=sp

To specify English, use:
informationRecipient.languageCode.c=en

Description of Selected Atom: Entry Node Elements in Response to Lab Test Requests

Element Description
title Title of matched MedlinePlus lab test page
link URL for matched MedlinePlus lab test page

Examples of Requests for Lab Tests

To request information for an English speaker, your request may look like one of the following:

http://apps.nlm.nih.gov/medlineplus/services/mpconnect_service.cfm?mainSearchCriteria.v.cs=2.16.840.1.113883.6.1&mainSearchCriteria.v.c=3187-2&mainSearchCriteria.v.dn=Factor%20IX%20assay&informationRecipient.languageCode.c=en
http://apps.nlm.nih.gov/medlineplus/services/mpconnect_service.cfm?mainSearchCriteria.v.cs=2.16.840.1.113883.6.1&mainSearchCriteria.v.c=3187-2&informationRecipient.languageCode.c=en

To request information for a Spanish speaker, your request may look like one of the following:

http://apps.nlm.nih.gov/medlineplus/services/mpconnect_service.cfm?mainSearchCriteria.v.cs=2.16.840.1.113883.6.1&mainSearchCriteria.v.c=3187-2&mainSearchCriteria.v.dn=Factor%20IX%20assay&informationRecipient.languageCode.c=sp
http://apps.nlm.nih.gov/medlineplus/services/mpconnect_service.cfm?mainSearchCriteria.v.cs=2.16.840.1.113883.6.1&mainSearchCriteria.v.c=3187-2&informationRecipient.languageCode.c=sp

More Information