Skip to main content
POST
/
labels
/
classify
Classify a product label
curl --request POST \
  --url https://api.meddra.co/labels/classify \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <x-api-key>' \
  --data '
{
  "description": "HIGHLIGHTS OF PRESCRIBING INFORMATION\\nWARNINGS AND PRECAUTIONS: Anaphylaxis and angioedema have occurred. Discontinue immediately and provide supportive care.\\nADVERSE REACTIONS: Most common (>=5%) were headache, nausea, and pruritus."
}
'
{
  "requestId": "req_01JD5TQZAF7W9HQ3SJ8K2YTW4K",
  "version": "28.1",
  "results": {
    "meddraCodes": [
      {
        "value": {
          "code": "10029505",
          "term": "Dizziness",
          "level": "SOC"
        },
        "confidence": 0.94,
        "reasons": [
          "Matched synonym 'anaphylaxis'",
          "Narrative mentions severe allergic reaction"
        ]
      }
    ]
  }
}
POST /labels/classify ingests an entire product label (raw text only) via the description field, extracts clinically relevant statements, and returns MedDRA-coded predictions with confidences.

When to use this endpoint

  • Normalize drug labels into structured MedDRA-coded findings before surfacing them in safety or labeling workflows.
  • Batch-review labels for new warnings, adverse reactions, and indications.
Want to try it interactively? Try it here.

Authentication

Include the header X-API-Key: sk-<API_KEY> with every request to this endpoint. Requests without the key return 401 Unauthorized.

What real labels look like (for better requests)

Public labels (e.g., FDA prescribing information) typically include:
  • A “HIGHLIGHTS OF PRESCRIBING INFORMATION” cover block with boxed warnings.
  • Numbered sections like 1 INDICATIONS AND USAGE, 4 CONTRAINDICATIONS, 5 WARNINGS AND PRECAUTIONS, 6 ADVERSE REACTIONS, 17 PATIENT COUNSELING INFORMATION.
  • Bulleted adverse reactions with frequencies, and prose warnings that mention specific events (anaphylaxis, hepatotoxicity, etc.). Paste those sections verbatim after OCR—the more structure you keep (headings + bullet text), the better the mapping.

Request body

{
	"description": "Full label text (required)",
	"maxResults": 25,
	"minConfidence": 0.25
}
  • description – full label text. Keep headings intact if possible.
  • maxResults (optional) – cap on returned MedDRA codes (default 25, max 100).
  • minConfidence (optional) – drop codes below this calibrated confidence (default 0.25).

Response shape (grounded output)

{
	"requestId": "req_xxx",
	"version": "26.1",
	"results": {
		"meddraCodes": [
			{
				"value": {
					"code": "10011906",
					"term": "Anaphylactic reaction",
					"level": "PT"
				},
				"rawScore": 0.82,
				"confidence": 0.73,
				"reasons": [
					"From Adverse Reactions: \"Two cases of anaphylaxis were reported post-marketing\"",
					"Strong lexical/hierarchy match",
					"Supported by 2 snippets"
				],
				"supportingSnippets": [
					{
						"id": "snippet_123",
						"section": "Adverse Reactions",
						"text": "Two cases of anaphylaxis were reported post-marketing.",
						"start": 1024,
						"end": 1083,
						"likelihood": 0.92,
						"confidence": 0.73,
						"explanations": ["Matches key terms: anaphylaxis"]
					}
				]
			}
		]
	}
}
What changed:
  • The service now extracts adverse-event sentences from the label, classifies each snippet, and aggregates them.
  • Confidence is calibrated (not just “top score relative”) and codes below minConfidence are filtered out.
  • Every returned code includes grounded snippets and reasons so you can see where in the label the AE came from.

Headers

X-API-Key
string
required

Static API key required for POST /classify, POST /labels/classify, and POST /identify requests.

Example:

"sk-<API_KEY>"

X-API-Version
string
default:1

Override the default API version. Defaults to 1.

Example:

"1"

X-MedDRA-Version
string

Target a specific MedDRA release. Defaults to the latest.

Example:

"28.0"

Body

application/json

Classify raw label text provided directly in the request body.

description
string
required

Full product label text.

Minimum string length: 1
Example:

"HIGHLIGHTS OF PRESCRIBING INFORMATION\\nWARNINGS AND PRECAUTIONS: Anaphylaxis and angioedema have occurred. Discontinue immediately and provide supportive care.\\nADVERSE REACTIONS: Most common (>=5%) were headache, nausea, and pruritus."

Response

MedDRA-coded findings for the supplied product label.

requestId
string
required

Unique identifier for this label classification request.

Example:

"req_01JD5TQZAF7W9HQ3SJ8K2YTW4K"

version
string
required

MedDRA version used for classification.

Example:

"28.1"

results
object
required

MedDRA predictions for the supplied label text.