query: Search MedlinePlus health topics

API: nih.gov:medlineplus-api
Endpoint: /query
Response format: text/xml
Charset: utf-8
Auth: none
Method: GET
Last Status: 200
Latency: 902ms

Description

Alternative search endpoint for MedlinePlus health topics. Functions similarly to /ws/query, returning XML with health topic information. This endpoint appears to provide the same functionality as /ws/query. Use either endpoint for health topic searches — they return similar XML structures with: - Search term metadata - Total count of results - Paginated list of documents with titles, summaries, and URLs The response is ideal for building health information search features where users can discover relevant MedlinePlus articles by keyword.

From spec: Search for health topics in MedlinePlus. Returns XML with matching documents including titles, summaries, MeSH terms, and group classifications. Supports field-specific searches (title, mesh, full-summary, group).

Usage Tips

- **Requires `db` parameter**: Set to `healthTopics` or `healthTopicsSpanish` - **Query syntax**: Supports Boolean operators (+AND+, +OR+) and phrase searching with %22 - **Field qualifiers**: Use `title:`, `altTitle:`, or `FullSummary:` to search specific fields - **Pagination**: Control results with `retstart` (offset) and `retmax` (limit) - **Response is XML**: Parse as XML regardless of the content type header nuances

Parameters (9)

db (string, query, required)

Database to search

Constraints: {'enum': ['healthTopics', 'healthTopicsSpanish']}

email (string, query, optional)

Contact email for NLM tracking (recommended)

file (string, query, optional)

File identifier from previous response for pagination

retmax (integer, query, optional)

Maximum number of documents to return (default: all results)

Constraints: {'minimum': 1}

retstart (integer, query, optional)

Starting position for result pagination. Use with 'file' and 'server' from previous response.

Constraints: {'minimum': 0}

rettype (string, query, optional)

Type of content to return

Constraints: {'enum': ['brief', 'topic', 'all']}

server (string, query, optional)

Server identifier from previous response for pagination

term (string, query, required)

Search term. Can use field:value syntax for field searches: title:asthma, mesh:diabetes, full-summary:heart, group:lungs

tool (string, query, optional)

Tool name for NLM tracking (recommended)

Examples (2)

Search MedlinePlus health topics openapi-spec

Search for MedlinePlus health topics about diabetes

curl 'https://wsearch.nlm.nih.gov/ws/query?term=diabetes'
import requests

resp = requests.get(
    "https://wsearch.nlm.nih.gov/ws/query",
    params={
        'term': 'diabetes',
    },
)
data = resp.json()
import zingu_apis

api = zingu_apis.api("medlineplus")
result = api.fetch("query", term="diabetes")

for item in result:
    print(item)
const resp = await fetch("https://wsearch.nlm.nih.gov/ws/query?term=diabetes");
const data = await resp.json();
Search MedlinePlus health topics openapi-spec
curl 'https://api.nlm.nih.gov/lit/ctxp/v1/query?db=healthTopics&term=asthma&retmax=10&rettype=all'
import requests

resp = requests.get(
    "https://api.nlm.nih.gov/lit/ctxp/v1/query",
    params={
        'db': 'healthTopics',
        'term': 'asthma',
        'retmax': '10',
        'rettype': 'all',
    },
)
data = resp.json()
import zingu_apis

api = zingu_apis.api("medlineplus")
result = api.fetch("query", db="healthTopics", term="asthma", retmax=10, rettype="all")

for item in result:
    print(item)
const resp = await fetch("https://api.nlm.nih.gov/lit/ctxp/v1/query?db=healthTopics&term=asthma&retmax=10&rettype=all");
const data = await resp.json();

Probe History

Latency

Status Codes

TimeStatusLatencySize
2026-04-16 17:08:57.316385 200 902ms
2026-04-16 03:38:37.853856 200 1078ms
2026-04-16 02:57:22.813642 404 3296ms
2026-04-15 02:43:46.415164 404 2383ms
2026-04-15 01:34:57.447819 200 977ms
2026-04-14 02:01:10.866507 200 1197ms
2026-04-14 00:16:36.492167 404 2616ms
2026-04-12 16:10:51.162828 200 1070ms
2026-04-12 15:24:02.221336 404 4394ms
2026-04-10 04:12:52.895102 404 1700ms
2026-04-10 01:34:46.986859 200 650ms
2026-04-09 02:18:06.985231 404 2181ms
2026-04-09 01:26:20.275487 200 890ms
2026-04-08 01:40:57.189730 200 2358ms
2026-04-07 01:45:33.010180 200 787ms
2026-04-05 19:32:34.244226 200 4318ms
2026-04-05 00:55:35.903845 200 734ms
2026-04-04 02:04:30.260450 200 852ms
2026-04-03 13:25:51.805576 200 681ms
2026-03-30 03:05:01.808280 200 1227ms
2026-03-29 13:38:32.862406 200 668ms
2026-03-23 10:45:38.309750 200 640ms