Skip to main content
Glama

Openfda Get Drug Label

openfda_get_drug_label
Read-only

Look up FDA drug labeling (package inserts / SPL documents). Check indications, warnings, dosage, contraindications, active ingredients, or any structured label section. A label runs to tens of thousands of tokens, so a page that exceeds the inline budget returns the list of available sections instead; re-call with sections to pull the ones you need.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
skipNoNumber of records to skip for pagination (default 0). openFDA caps pagination at 25000 records; a higher value returns a pagination_limit_reached error.
sortNoSort expression — a field path optionally suffixed with :asc or :desc (any letter case; :ascending and :descending are also accepted, and every direction is sent as asc or desc); comma-separate for multi-field sort. Example: effective_time:desc. Field paths take only letters, digits, underscores, and dots; any other character or direction is rejected before the request. A well-formed but non-sortable field still causes a query error — use a documented field name.
limitNoMaximum number of results to return (1-1000). Default 5. Labels are large, and the cost of a sections selection is the section summed across every record on the page — so it scales with this limit. Lower it before widening a selection.
searchYesQuery targeting label fields. Examples: openfda.brand_name:"aspirin", openfda.generic_name:"metformin", openfda.manufacturer_name:"pfizer". For a specific revision, pass set_id with the SPL UUID returned in earlier results. Double quotes, parentheses, and range brackets must balance, and the query must not end on a backslash — each is rejected before the request.
sectionsNoLabel sections to return, e.g. ["boxed_warning","indications_and_usage"]. Names come from the outline an oversized page returns, or from openfda_describe_fields. Omit for the whole label — which returns the section outline instead when the page exceeds the inline size budget; an empty list is treated as omitted. A selection is returned whole even when it exceeds that budget, with its serialized size reported on the notice; the outline names a section measured to fit at the requested limit. Sections ending in _table hold SPL table markup: raw in structured results, rendered as Markdown tables in the text output. Metadata (openfda, set_id, id, effective_time, version) is returned either way and counts toward the size.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
capNoThe limit applied to this page.
kindNoWhether this response carries label records ("full") or only the section outline of a page too large to inline ("outline").
metaNoPagination and freshness metadata.
errorNoPresent when the call failed. Absent on success.
shownNoNumber of labels returned in this response.
noticeNoGuidance for this page: how to broaden filters or correct field names when results are empty or paging overshot, the sized re-call example when a page overflowed to its section outline, section names no record carried, and the serialized size when a sections selection exceeds the inline budget. Absent when nothing needs saying.
outlineNoSection names available across the matched page and their serialized size, largest first. Present when kind is "outline" — pass names back in sections to retrieve them.
resultsNoDrug label records, present when kind is "full". Each carries an openfda block (brand_name, generic_name, manufacturer_name, route) plus optional SPL sections like indications_and_usage, warnings, dosage_and_administration, contraindications, adverse_reactions; section presence varies per label. Sections ending in _table carry raw SPL table markup (tags and character entities) exactly as openFDA returns it. Narrowed to the requested sections plus metadata when sections was supplied.
truncatedNoTrue when more labels matched than this page returned — page with skip for the rest.
totalResultsNoTotal matching label records in the dataset
effectiveQueryNoSearch filter applied to the drug label query, as submitted to openFDA

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / sort / description
      Previous value: -"Sort expression — a field path optionally suffixed with :asc or :desc; comma-separate for multi-field sort. Example: effective_time:desc. Field paths take only letters, digits, underscores, and dots; anything else is rejected before the request. A well-formed but non-sortable field still causes a query error — use a documented field name."New value: +"Sort expression — a field path optionally suffixed with :asc or :desc (any letter case; :ascending and :descending are also accepted, and every direction is sent as asc or desc); comma-separate for multi-field sort. Example: effective_time:desc. Field paths take only letters, digits, underscores, and dots; any other character or direction is rejected before the request. A well-formed but non-sortable field still causes a query error — use a documented field name."
    • changedInput schema / properties / sort / pattern
      Previous value: -"^ *[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)*(?::[^,:]*)?(?: *, *[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)*(?::[^,:]*)?)* *$"New value: +"^\\s*(?=\\S)(?![,:.])(?!.*,(?: *[,:.]|\\s*$))(?!.*[^\\s,] +[^\\s,])(?!.*\\.(?:[.:,\\s]|$))(?!.*:(?!(?:[Aa][Ss][Cc](?:[Ee][Nn][Dd][Ii][Nn][Gg])?|[Dd][Ee][Ss][Cc](?:[Ee][Nn][Dd][Ii][Nn][Gg])?)(?: *,|\\s*$)))[A-Za-z0-9_.:, ]*[A-Za-z0-9_]\\s*$"
  2. Changed2 schema fields changed
    • changedInput schema / properties / sections / description
      Previous value: -"Label sections to return, e.g. [\"boxed_warning\",\"indications_and_usage\"]. Names come from the outline an oversized page returns, or from openfda_describe_fields. Omit for the whole label — which returns the section outline instead when the page exceeds the inline size budget. A selection is returned whole even when it exceeds that budget, with its serialized size reported on the notice; the outline names a section measured to fit at the requested limit. Metadata (openfda, set_id, id, effective_time, version) is returned either way and counts toward the size."New value: +"Label sections to return, e.g. [\"boxed_warning\",\"indications_and_usage\"]. Names come from the outline an oversized page returns, or from openfda_describe_fields. Omit for the whole label — which returns the section outline instead when the page exceeds the inline size budget; an empty list is treated as omitted. A selection is returned whole even when it exceeds that budget, with its serialized size reported on the notice; the outline names a section measured to fit at the requested limit. Sections ending in _table hold SPL table markup: raw in structured results, rendered as Markdown tables in the text output. Metadata (openfda, set_id, id, effective_time, version) is returned either way and counts toward the size."
    • changedOutput schema / properties / results / description
      Previous value: -"Drug label records, present when kind is \"full\". Each carries an openfda block (brand_name, generic_name, manufacturer_name, route) plus optional SPL sections like indications_and_usage, warnings, dosage_and_administration, contraindications, adverse_reactions; section presence varies per label. Narrowed to the requested sections plus metadata when sections was supplied."New value: +"Drug label records, present when kind is \"full\". Each carries an openfda block (brand_name, generic_name, manufacturer_name, route) plus optional SPL sections like indications_and_usage, warnings, dosage_and_administration, contraindications, adverse_reactions; section presence varies per label. Sections ending in _table carry raw SPL table markup (tags and character entities) exactly as openFDA returns it. Narrowed to the requested sections plus metadata when sections was supplied."
  3. Changed1 schema field changed
    • addedOutput schema / properties / meta / properties / totalUnverified
      Added value: +{
      +  "description": "Present (true) only on an empty page at skip > 0 whose total could not be confirmed: openFDA answers a page past the end and a search that matched nothing alike, and the follow-up request for the total failed. total then reads 0 without ruling out records at a lower skip — re-call with skip=0 to tell.",
      +  "type": "boolean"
      +}
  4. Changed6 schema fields changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedInput schema / additionalProperties
      Added value: +false
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedOutput schema / anyOf
      Added value: +[
      +  {
      +    "not": {
      +      "required": [
      +        "error"
      +      ]
      +    },
      +    "required": [
      +      "meta",
      +      "kind",
      +      "totalResults",
      +      "effectiveQuery"
      +    ]
      +  },
      +  {
      +    "required": [
      +      "error"
      +    ]
      +  }
      +]
    • addedOutput schema / properties / error
      Added value: +{
      +  "additionalProperties": {},
      +  "description": "Present when the call failed. Absent on success.",
      +  "properties": {
      +    "code": {
      +      "description": "JSON-RPC error code for this failure.",
      +      "maximum": 9007199254740991,
      +      "minimum": -9007199254740991,
      +      "type": "integer"
      +    },
      +    "data": {
      +      "additionalProperties": {},
      +      "properties": {
      +        "reason": {
      +          "description": "Machine-readable failure mode. Declared by this tool: `rate_limited`: The openFDA daily or per-minute request limit is exceeded. `upstream_error`: The openFDA API returned a 5xx server error. `malformed_search`: The search query leaves a double quote, parenthesis, or range bracket unclosed, or ends on a backslash. `query_error`: The search query was rejected by openFDA (malformed field name, invalid syntax). `pagination_limit_reached`: skip exceeds the 25000 record pagination ceiling. Other values are possible when a failure originates below the handler.",
      +          "examples": [
      +            "rate_limited",
      +            "upstream_error",
      +            "malformed_search",
      +            "query_error",
      +            "pagination_limit_reached"
      +          ],
      +          "type": "string"
      +        },
      +        "recovery": {
      +          "additionalProperties": {},
      +          "description": "Actionable next step for the caller.",
      +          "properties": {
      +            "hint": {
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "hint"
      +          ],
      +          "type": "object"
      +        },
      +        "retryable": {
      +          "description": "Whether retrying may succeed.",
      +          "type": "boolean"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "message": {
      +      "description": "Human-readable description of what went wrong.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "code",
      +    "message"
      +  ],
      +  "type": "object"
      +}
    • removedOutput schema / required
      Removed value: -[
      -  "meta",
      -  "kind",
      -  "totalResults",
      -  "effectiveQuery"
      -]
  5. Changed3 schema fields changed
    • changedInput schema / properties / limit / description
      Previous value: -"Maximum number of results to return (1-1000). Default 5. Labels are large."New value: +"Maximum number of results to return (1-1000). Default 5. Labels are large, and the cost of a sections selection is the section summed across every record on the page — so it scales with this limit. Lower it before widening a selection."
    • changedInput schema / properties / sections / description
      Previous value: -"Label sections to return, e.g. [\"boxed_warning\",\"indications_and_usage\"]. Names come from the outline an oversized page returns, or from openfda_describe_fields. Omit for the whole label — which returns the section outline instead when the page exceeds the inline size budget. Metadata (openfda, set_id, id, effective_time, version) is returned either way."New value: +"Label sections to return, e.g. [\"boxed_warning\",\"indications_and_usage\"]. Names come from the outline an oversized page returns, or from openfda_describe_fields. Omit for the whole label — which returns the section outline instead when the page exceeds the inline size budget. A selection is returned whole even when it exceeds that budget, with its serialized size reported on the notice; the outline names a section measured to fit at the requested limit. Metadata (openfda, set_id, id, effective_time, version) is returned either way and counts toward the size."
    • changedOutput schema / properties / notice / description
      Previous value: -"Guidance when results are empty or paging overshot — how to broaden filters or correct field names. Absent when results are returned."New value: +"Guidance for this page: how to broaden filters or correct field names when results are empty or paging overshot, the sized re-call example when a page overflowed to its section outline, section names no record carried, and the serialized size when a sections selection exceeds the inline budget. Absent when nothing needs saying."
  6. Changed3 schema fields changed
    • changedInput schema / properties / search / description
      Previous value: -"Query targeting label fields. Examples: openfda.brand_name:\"aspirin\", openfda.generic_name:\"metformin\", openfda.manufacturer_name:\"pfizer\". For a specific revision, pass set_id with the SPL UUID returned in earlier results."New value: +"Query targeting label fields. Examples: openfda.brand_name:\"aspirin\", openfda.generic_name:\"metformin\", openfda.manufacturer_name:\"pfizer\". For a specific revision, pass set_id with the SPL UUID returned in earlier results. Double quotes, parentheses, and range brackets must balance, and the query must not end on a backslash — each is rejected before the request."
    • changedInput schema / properties / sort / description
      Previous value: -"Sort expression (field:asc or field:desc). Example: effective_time:desc. Invalid or non-sortable fields cause a query error — use a documented field name."New value: +"Sort expression — a field path optionally suffixed with :asc or :desc; comma-separate for multi-field sort. Example: effective_time:desc. Field paths take only letters, digits, underscores, and dots; anything else is rejected before the request. A well-formed but non-sortable field still causes a query error — use a documented field name."
    • changedInput schema / properties / sort / pattern
      Previous value: -"\\S"New value: +"^ *[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)*(?::[^,:]*)?(?: *, *[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)*(?::[^,:]*)?)* *$"
  7. Changed7 schema fields changed
    • addedInput schema / properties / sections
      Added value: +{
      +  "description": "Label sections to return, e.g. [\"boxed_warning\",\"indications_and_usage\"]. Names come from the outline an oversized page returns, or from openfda_describe_fields. Omit for the whole label — which returns the section outline instead when the page exceeds the inline size budget. Metadata (openfda, set_id, id, effective_time, version) is returned either way.",
      +  "items": {
      +    "description": "A top-level label section name.",
      +    "minLength": 1,
      +    "pattern": "\\S",
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • changedInput schema / properties / skip / description
      Previous value: -"Number of results to skip for pagination (0-25000). Default 0."New value: +"Number of records to skip for pagination (default 0). openFDA caps pagination at 25000 records; a higher value returns a pagination_limit_reached error."
    • removedInput schema / properties / skip / maximum
      Removed value: -25000
    • addedOutput schema / properties / kind
      Added value: +{
      +  "description": "Whether this response carries label records (\"full\") or only the section outline of a page too large to inline (\"outline\").",
      +  "enum": [
      +    "full",
      +    "outline"
      +  ],
      +  "type": "string"
      +}
    • addedOutput schema / properties / outline
      Added value: +{
      +  "description": "Section names available across the matched page and their serialized size, largest first. Present when kind is \"outline\" — pass names back in sections to retrieve them.",
      +  "items": {
      +    "additionalProperties": false,
      +    "description": "One retrievable label section and its serialized size.",
      +    "properties": {
      +      "bytes": {
      +        "description": "Serialized byte size of the section",
      +        "maximum": 9007199254740991,
      +        "minimum": 0,
      +        "type": "integer"
      +      },
      +      "name": {
      +        "description": "Section identifier — pass in `sections` to retrieve it",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "name",
      +      "bytes"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • changedOutput schema / properties / results / description
      Previous value: -"Drug label records. Each carries an openfda block (brand_name, generic_name, manufacturer_name, route) plus optional SPL sections like indications_and_usage, warnings, dosage_and_administration, contraindications, adverse_reactions; section presence varies per label."New value: +"Drug label records, present when kind is \"full\". Each carries an openfda block (brand_name, generic_name, manufacturer_name, route) plus optional SPL sections like indications_and_usage, warnings, dosage_and_administration, contraindications, adverse_reactions; section presence varies per label. Narrowed to the requested sections plus metadata when sections was supplied."
    • changedOutput schema / required
      Previous value: -[
      -  "meta",
      -  "results",
      -  "totalResults",
      -  "effectiveQuery"
      -]New value: +[
      +  "meta",
      +  "kind",
      +  "totalResults",
      +  "effectiveQuery"
      +]
  8. Changed4 schema fields changed
    • addedInput schema / properties / search / minLength
      Added value: +1
    • addedInput schema / properties / search / pattern
      Added value: +"\\S"
    • addedInput schema / properties / sort / minLength
      Added value: +1
    • addedInput schema / properties / sort / pattern
      Added value: +"\\S"
  9. Changed3 schema fields changed
    • addedOutput schema / properties / cap
      Added value: +{
      +  "description": "The limit applied to this page.",
      +  "type": "number"
      +}
    • addedOutput schema / properties / shown
      Added value: +{
      +  "description": "Number of labels returned in this response.",
      +  "type": "number"
      +}
    • addedOutput schema / properties / truncated
      Added value: +{
      +  "description": "True when more labels matched than this page returned — page with skip for the rest.",
      +  "type": "boolean"
      +}
  10. Changed5 schema fields changed
    • addedOutput schema / properties / effectiveQuery
      Added value: +{
      +  "description": "Search filter applied to the drug label query, as submitted to openFDA",
      +  "type": "string"
      +}
    • removedOutput schema / properties / message
      Removed value: -{
      -  "description": "Human-readable note when the result set is empty.",
      -  "type": "string"
      -}
    • addedOutput schema / properties / notice
      Added value: +{
      +  "description": "Guidance when results are empty or paging overshot — how to broaden filters or correct field names. Absent when results are returned.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / totalResults
      Added value: +{
      +  "description": "Total matching label records in the dataset",
      +  "type": "number"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "meta",
      -  "results"
      -]New value: +[
      +  "meta",
      +  "results",
      +  "totalResults",
      +  "effectiveQuery"
      +]
  11. Changed3 schema fields changed
    • changedInput schema / properties / search / description
      Previous value: -"Query targeting label fields. Examples: openfda.brand_name:\"aspirin\", openfda.generic_name:\"metformin\", openfda.manufacturer_name:\"pfizer\", set_id:\"uuid\"."New value: +"Query targeting label fields. Examples: openfda.brand_name:\"aspirin\", openfda.generic_name:\"metformin\", openfda.manufacturer_name:\"pfizer\". For a specific revision, pass set_id with the SPL UUID returned in earlier results."
    • changedInput schema / properties / sort / description
      Previous value: -"Sort expression (field:asc or field:desc). Example: effective_time:desc. Unrecognized fields are silently ignored by the API — results return in default order."New value: +"Sort expression (field:asc or field:desc). Example: effective_time:desc. Invalid or non-sortable fields cause a query error — use a documented field name."
    • changedOutput schema / properties / results / description
      Previous value: -"Array of drug label records."New value: +"Drug label records. Each carries an openfda block (brand_name, generic_name, manufacturer_name, route) plus optional SPL sections like indications_and_usage, warnings, dosage_and_administration, contraindications, adverse_reactions; section presence varies per label."
  12. First observed

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.