{
  "openapi": "3.1.0",
  "info": {
    "title": "FDA Intel API",
    "version": "v1",
    "summary": "FDA inspection data: Form 483s, EIRs, warning letters, investigators, 21 CFR citations, plus FDA public data.",
    "description": "Read-only REST API over the FDA Intel catalog of FDA inspection documents and FDA public data. The same tools are available to AI assistants through the MCP server at https://fdaintel.ai/mcp.\n\nOne request is one tool call in Claude or ChatGPT, or one API call. Usage resets every month. Standard: 10,000 requests a month (up to 1,000 a day). Premium: 50,000 requests a month (up to 5,000 a day). A top-up adds 10,000 requests for $29, one time. Unused top-up requests end with the current monthly allowance period.\n\nFull reference: https://fdaintel.ai/api/docs",
    "contact": {
      "name": "FDA Intel",
      "url": "https://fdaintel.ai/contact"
    },
    "termsOfService": "https://fdaintel.ai/legal/terms"
  },
  "externalDocs": {
    "description": "API reference",
    "url": "https://fdaintel.ai/api/docs"
  },
  "servers": [
    {
      "url": "https://fdaintel.ai"
    }
  ],
  "security": [
    {
      "apiKey": []
    },
    {
      "oauth2": [
        "intel:read"
      ]
    }
  ],
  "tags": [
    {
      "name": "Inspection documents",
      "description": "Form 483s, EIRs, warning letters, responses and close-out letters in the FDA Intel catalog: search, metadata, summaries and observation previews, with each document's link on FDA Intel."
    },
    {
      "name": "Firms and investigators",
      "description": "Site profiles by firm id or FEI, and FDA investigator profiles with what each one cites most."
    },
    {
      "name": "Regulations and catalog",
      "description": "21 CFR sections with how often FDA cites them, filter values and catalog totals."
    },
    {
      "name": "FDA public data",
      "description": "Inspections and citations, warning-letter status, import alerts, recalls, drug shortages, registrations, 510(k), PMA, NDC, drug applications and debarment."
    }
  ],
  "paths": {
    "/api/intel/v1/call/search": {
      "get": {
        "operationId": "search",
        "summary": "Search FDA Intel documents",
        "description": "Search the FDA Intel catalog of FDA inspection documents (Form 483s, EIRs, warning letters, responses, close-out letters) by keyword, firm, FEI, investigator, regulation or topic. Returns up to 20 matches as {results:[{id,title,url,text}]}; pass an id to fetch for the document. For filters and paging use search_documents.\n\nSame as the MCP tool `search`.",
        "tags": [
          "Inspection documents"
        ],
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "required": true,
            "description": "What to look for, e.g. 'Sun Pharma Halol data integrity' or 'aseptic processing 211.113'.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateRemaining"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "results": [
                    {
                      "id": "ex4mpl3d0c01",
                      "title": "Form 483 · Example Pharma Ltd. · Hyderabad, Telangana, India · 2025-03-14",
                      "url": "https://fdaintel.ai/d/ex4mpl3d0c01",
                      "text": "Laboratory records were incomplete and out-of-specification results were not investigated."
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/intel/v1/call/fetch": {
      "get": {
        "operationId": "fetch",
        "summary": "Fetch a document",
        "description": "Fetch one FDA Intel document by id: its summary, observation previews and every metadata field. The full document is not included; the \"document\" field gives its type, date, observations, pages, price_usd and link on FDA Intel.\n\nSame as the MCP tool `fetch`.",
        "tags": [
          "Inspection documents"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "description": "Document id from search.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateRemaining"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "id": "ex4mpl3d0c01",
                  "title": "Form 483 · Example Pharma Ltd. · Hyderabad, Telangana, India · 2025-03-14",
                  "text": "Laboratory records were incomplete and out-of-specification results were not investigated.",
                  "url": "https://fdaintel.ai/d/ex4mpl3d0c01",
                  "metadata": {
                    "id": "ex4mpl3d0c01",
                    "doc_type": "483",
                    "label": null,
                    "title": "Form 483 · Example Pharma Ltd. · 2025-03-14",
                    "firm_name": "Example Pharma Ltd.",
                    "firm_name_on_document": "Example Pharma Ltd.",
                    "firm_id": "3001234567",
                    "fei": "3001234567",
                    "street": "1 Example Road",
                    "city": "Hyderabad",
                    "state": "Telangana",
                    "zip": "500001",
                    "country": "India",
                    "document_date": "2025-03-14",
                    "issue_date": "2025-03-14",
                    "inspection_start": "2025-03-03",
                    "inspection_end": "2025-03-14",
                    "date_estimated": false,
                    "center_program": "Drugs (CDER)",
                    "establishment_type": "Manufacturer",
                    "page_count": 9,
                    "observation_count": 6,
                    "investigator_names": "Jane Example",
                    "summary": "Laboratory records were incomplete and out-of-specification results were not investigated.",
                    "marcs_cms": null,
                    "available": true,
                    "has_text": true,
                    "price_cents": 9900,
                    "url": "https://fdaintel.ai/d/ex4mpl3d0c01",
                    "owned": false,
                    "observations": [
                      {
                        "ordinal": 1,
                        "preview": "Laboratory controls do not include the establishment of scientifically sound…",
                        "cfr": [
                          {
                            "cite": "21 CFR 211.160",
                            "section": "211.160",
                            "heading": "General requirements",
                            "inferred": false
                          }
                        ],
                        "system_area": "drug:laboratory",
                        "topics": [
                          "lab_controls",
                          "data_integrity"
                        ],
                        "repeat": true,
                        "severity": 3
                      }
                    ],
                    "document": {
                      "type": "Form 483",
                      "date": "2025-03-14",
                      "observations": 6,
                      "pages": 9,
                      "price_usd": 99,
                      "link": "https://fdaintel.ai/d/ex4mpl3d0c01",
                      "owned": false,
                      "available_to_buy": true
                    },
                    "full_text": "not_included"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/intel/v1/documents": {
      "get": {
        "operationId": "search_documents",
        "summary": "Search documents with filters",
        "description": "Search documents with every available filter (keyword, type, firm, FEI, investigator, place, date range, CFR section, observation text, product type, classification, topic, sector …). Returns total, a page of documents with all list fields (summary included) and next_offset.\n\nAlso callable as /api/intel/v1/call/search_documents.\n\nSame as the MCP tool `search_documents`.",
        "tags": [
          "Inspection documents"
        ],
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "description": "Keyword full-text search over the whole document text, title, firm and investigators. Supports \"quoted phrases\", OR, and -exclusions. Also matches an exact FEI, document id or MARCS-CMS number.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "doc_type",
            "in": "query",
            "required": false,
            "description": "Document types: 483 (Form FDA 483), 483_amended, eir (Establishment Inspection Report), 483_response, warning_letter, wl_response, untitled_letter (FDA enforcement letter below warning-letter level), untitled_letter_response, close_out_letter, import_alert, fda_correspondence, other.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "483",
                  "483_amended",
                  "eir",
                  "483_response",
                  "warning_letter",
                  "wl_response",
                  "untitled_letter",
                  "untitled_letter_response",
                  "close_out_letter",
                  "import_alert",
                  "fda_correspondence",
                  "other"
                ]
              }
            },
            "style": "form",
            "explode": false
          },
          {
            "name": "firm",
            "in": "query",
            "required": false,
            "description": "Firm / site name contains (case-insensitive; also matches known aliases).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "firm_id",
            "in": "query",
            "required": false,
            "description": "Exact firm id (slug from search_firms) or numeric firm id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fei",
            "in": "query",
            "required": false,
            "description": "Exact FDA Establishment Identifier (FEI) of the inspected site.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "investigator",
            "in": "query",
            "required": false,
            "description": "Investigator name contains (case-insensitive, any name variant).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "investigator_id",
            "in": "query",
            "required": false,
            "description": "Exact investigator id (slug from search_investigators).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "city",
            "in": "query",
            "required": false,
            "description": "City (exact, case-insensitive).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "state",
            "in": "query",
            "required": false,
            "description": "US state or province code/name (exact, case-insensitive), e.g. NJ.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "description": "Country (exact, case-insensitive), e.g. India. 'US'/'USA'/'United States' all match the United States.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "date_from",
            "in": "query",
            "required": false,
            "description": "Earliest date, inclusive: 2023, 2023-06 or 2023-06-15.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "date_to",
            "in": "query",
            "required": false,
            "description": "Latest date, inclusive: 2024, 2024-03 or 2024-03-31.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "date_field",
            "in": "query",
            "required": false,
            "description": "Which date the range applies to: document (default: issue date, else inspection end/start), issue, inspection_start, inspection_end.",
            "schema": {
              "type": "string",
              "enum": [
                "document",
                "issue",
                "inspection_start",
                "inspection_end"
              ]
            }
          },
          {
            "name": "cfr",
            "in": "query",
            "required": false,
            "description": "Cited regulation: a 21 CFR section (211.192) or a whole part (211, 820). Matches 483 observations and warning-letter violations.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "observation",
            "in": "query",
            "required": false,
            "description": "Full-text search within 483 observation statements and warning-letter violation headings only.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "center",
            "in": "query",
            "required": false,
            "description": "FDA center / program contains, e.g. CDER, CDRH, Biologics, Foods, Tobacco, compounding.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "establishment_type",
            "in": "query",
            "required": false,
            "description": "Establishment type contains, e.g. 'Manufacturer', 'Outsourcing Facility'.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "product_type",
            "in": "query",
            "required": false,
            "description": "Product type contains (from FDA inspection data and warning letters): Drugs, Devices, Biologics, Food/Cosmetics, Veterinary, Tobacco …",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sector",
            "in": "query",
            "required": false,
            "description": "Establishment sector: drugs, devices, food, blood_biologics, vet, tobacco, bimo.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "inspecting_agency",
            "in": "query",
            "required": false,
            "description": "fda, state_under_fda_contract or state_local.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "classification",
            "in": "query",
            "required": false,
            "description": "FDA inspection classification of the matched inspection.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "NAI",
                  "VAI",
                  "OAI"
                ]
              }
            },
            "style": "form",
            "explode": false
          },
          {
            "name": "system_area",
            "in": "query",
            "required": false,
            "description": "Quality system area of an observation/violation contains, e.g. drug:laboratory, device:capa (see list_facets).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "topic",
            "in": "query",
            "required": false,
            "description": "Observation topic, e.g. aseptic_sterility, data_integrity, cleaning_validation (exact; see list_facets).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repeat",
            "in": "query",
            "required": false,
            "description": "Only documents with an explicit repeat observation / repeat violation.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "issuing_office",
            "in": "query",
            "required": false,
            "description": "Warning letters: issuing office contains.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "marcs_cms",
            "in": "query",
            "required": false,
            "description": "Exact MARCS-CMS case number (warning letters, close-outs).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "has_summary",
            "in": "query",
            "required": false,
            "description": "Only documents with (true) or without (false) a written summary.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "has_text",
            "in": "query",
            "required": false,
            "description": "Only documents with (true) or without (false) extracted text.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "has_observations",
            "in": "query",
            "required": false,
            "description": "Only documents with (true) or without (false) extracted observations.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "available",
            "in": "query",
            "required": false,
            "description": "Only documents that are (true) or are not (false) available to buy as a PDF.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "min_observations",
            "in": "query",
            "required": false,
            "description": "At least this many observations.",
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          },
          {
            "name": "min_pages",
            "in": "query",
            "required": false,
            "description": "At least this many pages.",
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "relevance (default with q), date_desc (default otherwise), date_asc, firm, observations, added_desc.",
            "schema": {
              "type": "string",
              "enum": [
                "relevance",
                "date_desc",
                "date_asc",
                "firm",
                "observations",
                "added_desc"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Results per page (default 25, max 100).",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "description": "Skip this many results (use next_offset from the previous page).",
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateRemaining"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "total": 12,
                  "offset": 0,
                  "limit": 10,
                  "returned": 1,
                  "next_offset": 1,
                  "results": [
                    {
                      "id": "ex4mpl3d0c01",
                      "doc_type": "483",
                      "label": null,
                      "title": "Form 483 · Example Pharma Ltd. · 2025-03-14",
                      "firm_name": "Example Pharma Ltd.",
                      "firm_name_on_document": "Example Pharma Ltd.",
                      "firm_id": "3001234567",
                      "fei": "3001234567",
                      "street": "1 Example Road",
                      "city": "Hyderabad",
                      "state": "Telangana",
                      "zip": "500001",
                      "country": "India",
                      "document_date": "2025-03-14",
                      "issue_date": "2025-03-14",
                      "inspection_start": "2025-03-03",
                      "inspection_end": "2025-03-14",
                      "date_estimated": false,
                      "center_program": "Drugs (CDER)",
                      "establishment_type": "Manufacturer",
                      "page_count": 9,
                      "observation_count": 6,
                      "investigator_names": "Jane Example",
                      "summary": "Laboratory records were incomplete and out-of-specification results were not investigated.",
                      "marcs_cms": null,
                      "available": true,
                      "has_text": true,
                      "price_cents": 9900,
                      "url": "https://fdaintel.ai/d/ex4mpl3d0c01",
                      "owned": false
                    }
                  ],
                  "sort": "date_desc"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/intel/v1/documents/{id}": {
      "get": {
        "operationId": "get_document",
        "summary": "Get everything about a document",
        "description": "Everything about one document: metadata, summary, investigators (with career stats), each 483 observation's opening words with its CFR citations, system area and topics, inspection classification, warning-letter data (violations with CFR citations and response verdicts, linked 483s/EIRs, close-out), follow-on actions and other documents for the same site. The full document is not included; the \"document\" field gives its type, date, observations, pages, price_usd and link on FDA Intel.\n\nAlso callable as /api/intel/v1/call/get_document.\n\nSame as the MCP tool `get_document`.",
        "tags": [
          "Inspection documents"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Document id (the public id, e.g. 'dfjgwg9kdht2', as returned by search).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateRemaining"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "id": "ex4mpl3d0c01",
                  "doc_type": "483",
                  "label": null,
                  "title": "Form 483 · Example Pharma Ltd. · 2025-03-14",
                  "firm_name": "Example Pharma Ltd.",
                  "firm_name_on_document": "Example Pharma Ltd.",
                  "firm_id": "3001234567",
                  "fei": "3001234567",
                  "street": "1 Example Road",
                  "city": "Hyderabad",
                  "state": "Telangana",
                  "zip": "500001",
                  "country": "India",
                  "document_date": "2025-03-14",
                  "issue_date": "2025-03-14",
                  "inspection_start": "2025-03-03",
                  "inspection_end": "2025-03-14",
                  "date_estimated": false,
                  "center_program": "Drugs (CDER)",
                  "establishment_type": "Manufacturer",
                  "page_count": 9,
                  "observation_count": 6,
                  "investigator_names": "Jane Example",
                  "summary": "Laboratory records were incomplete and out-of-specification results were not investigated.",
                  "marcs_cms": null,
                  "available": true,
                  "has_text": true,
                  "price_cents": 9900,
                  "url": "https://fdaintel.ai/d/ex4mpl3d0c01",
                  "owned": false,
                  "investigators": [
                    {
                      "id": "jane-example",
                      "name": "Jane Example",
                      "name_variants": []
                    }
                  ],
                  "observations": [
                    {
                      "ordinal": 1,
                      "preview": "Laboratory controls do not include the establishment of scientifically sound…",
                      "cfr": [
                        {
                          "cite": "21 CFR 211.160",
                          "section": "211.160",
                          "heading": "General requirements",
                          "inferred": false
                        }
                      ],
                      "system_area": "drug:laboratory",
                      "topics": [
                        "lab_controls",
                        "data_integrity"
                      ],
                      "repeat": true,
                      "severity": 3
                    }
                  ],
                  "inspection": {
                    "fei": "3001234567",
                    "inspection_start": "2025-03-03",
                    "inspection_end": "2025-03-14",
                    "duration_days": 12,
                    "classification": "OAI"
                  },
                  "warning_letter": null,
                  "same_site_documents": [
                    {
                      "id": "ex4mpl3d0c02",
                      "doc_type": "warning_letter",
                      "document_date": "2025-09-30",
                      "url": "https://fdaintel.ai/d/ex4mpl3d0c02"
                    }
                  ],
                  "document": {
                    "type": "Form 483",
                    "date": "2025-03-14",
                    "observations": 6,
                    "pages": 9,
                    "price_usd": 99,
                    "link": "https://fdaintel.ai/d/ex4mpl3d0c01",
                    "owned": false,
                    "available_to_buy": true
                  },
                  "full_text": "not_included"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/intel/v1/observations": {
      "get": {
        "operationId": "search_observations",
        "summary": "Search observations and violations",
        "description": "Search individual 483 observations and warning-letter violations by words, CFR section, system area, topic or repeat flag, with the same document filters as search_documents (firm, FEI, investigator, dates, type, place …). Each hit has the statement's opening words, CFR citations, area, topics and its document.\n\nAlso callable as /api/intel/v1/call/search_observations.\n\nSame as the MCP tool `search_observations`.",
        "tags": [
          "Inspection documents"
        ],
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "description": "Full-text search in observation statements / violation headings.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "kind",
            "in": "query",
            "required": false,
            "description": "all (default), 483 or warning_letter.",
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "483",
                "warning_letter"
              ]
            }
          },
          {
            "name": "cfr",
            "in": "query",
            "required": false,
            "description": "Cited regulation: a 21 CFR section (211.192) or a whole part (211, 820). Matches 483 observations and warning-letter violations.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "system_area",
            "in": "query",
            "required": false,
            "description": "Quality system area of an observation/violation contains, e.g. drug:laboratory, device:capa (see list_facets).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "topic",
            "in": "query",
            "required": false,
            "description": "Observation topic, e.g. aseptic_sterility, data_integrity, cleaning_validation (exact; see list_facets).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repeat",
            "in": "query",
            "required": false,
            "description": "Only repeat observations / violations.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "firm",
            "in": "query",
            "required": false,
            "description": "Firm / site name contains (case-insensitive; also matches known aliases).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "firm_id",
            "in": "query",
            "required": false,
            "description": "Exact firm id (slug from search_firms) or numeric firm id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fei",
            "in": "query",
            "required": false,
            "description": "Exact FDA Establishment Identifier (FEI) of the inspected site.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "investigator",
            "in": "query",
            "required": false,
            "description": "Investigator name contains (case-insensitive, any name variant).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "investigator_id",
            "in": "query",
            "required": false,
            "description": "Exact investigator id (slug from search_investigators).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "doc_type",
            "in": "query",
            "required": false,
            "description": "Document types: 483 (Form FDA 483), 483_amended, eir (Establishment Inspection Report), 483_response, warning_letter, wl_response, untitled_letter (FDA enforcement letter below warning-letter level), untitled_letter_response, close_out_letter, import_alert, fda_correspondence, other.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "483",
                  "483_amended",
                  "eir",
                  "483_response",
                  "warning_letter",
                  "wl_response",
                  "untitled_letter",
                  "untitled_letter_response",
                  "close_out_letter",
                  "import_alert",
                  "fda_correspondence",
                  "other"
                ]
              }
            },
            "style": "form",
            "explode": false
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "description": "Country (exact, case-insensitive), e.g. India. 'US'/'USA'/'United States' all match the United States.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "state",
            "in": "query",
            "required": false,
            "description": "US state or province code/name (exact, case-insensitive), e.g. NJ.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "date_from",
            "in": "query",
            "required": false,
            "description": "Earliest date, inclusive: 2023, 2023-06 or 2023-06-15.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "date_to",
            "in": "query",
            "required": false,
            "description": "Latest date, inclusive: 2024, 2024-03 or 2024-03-31.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "center",
            "in": "query",
            "required": false,
            "description": "FDA center / program contains, e.g. CDER, CDRH, Biologics, Foods, Tobacco, compounding.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "product_type",
            "in": "query",
            "required": false,
            "description": "Product type contains (from FDA inspection data and warning letters): Drugs, Devices, Biologics, Food/Cosmetics, Veterinary, Tobacco …",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Results per page (default 25, max 100).",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "description": "Skip this many results (use next_offset from the previous page).",
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateRemaining"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "total": 140,
                  "offset": 0,
                  "limit": 10,
                  "returned": 1,
                  "next_offset": 1,
                  "results": [
                    {
                      "kind": "483_observation",
                      "document_id": "ex4mpl3d0c01",
                      "doc_type": "483",
                      "firm_name": "Example Pharma Ltd.",
                      "firm_id": "3001234567",
                      "fei": "3001234567",
                      "country": "India",
                      "document_date": "2025-03-14",
                      "ordinal": 2,
                      "cfr": [
                        "211.192"
                      ],
                      "system_area": "drug:quality",
                      "topics": [
                        "investigations"
                      ],
                      "repeat": false,
                      "severity": 3,
                      "url": "https://fdaintel.ai/d/ex4mpl3d0c01",
                      "preview": "There is a failure to thoroughly review any unexplained discrepancy…",
                      "owned": false
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/intel/v1/firms": {
      "get": {
        "operationId": "search_firms",
        "summary": "Search firms and sites",
        "description": "Find firms / inspected sites in the FDA Intel catalog by name, alias, FEI or place. A name query matches firms whose name contains every word (exact and prefix matches first); only if none do does it fall back to a short list of similar names (match: fuzzy). Returns firm ids, FEI, location, document counts and last document date.\n\nAlso callable as /api/intel/v1/call/search_firms.\n\nSame as the MCP tool `search_firms`.",
        "tags": [
          "Firms and investigators"
        ],
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "description": "Firm name, alias, FEI or slug.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fei",
            "in": "query",
            "required": false,
            "description": "Exact FEI.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "city",
            "in": "query",
            "required": false,
            "description": "City.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "state",
            "in": "query",
            "required": false,
            "description": "State.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "description": "Country.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Results per page (default 25, max 100).",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "description": "Skip this many results (use next_offset from the previous page).",
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateRemaining"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "total": 1,
                  "offset": 0,
                  "limit": 25,
                  "returned": 1,
                  "next_offset": null,
                  "results": [
                    {
                      "id": "3001234567",
                      "name": "Example Pharma Ltd.",
                      "aliases": [
                        "Example Pharma Unit II"
                      ],
                      "fei": "3001234567",
                      "city": "Hyderabad",
                      "state": "Telangana",
                      "country": "India",
                      "establishment_type": "Manufacturer",
                      "documents": 5,
                      "last_document_date": "2025-09-30",
                      "types": [
                        "483",
                        "warning_letter"
                      ],
                      "url": "https://fdaintel.ai/firm/3001234567"
                    }
                  ],
                  "match": "all_words"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/intel/v1/firms/{id}": {
      "get": {
        "operationId": "get_firm",
        "summary": "Firm / site profile",
        "description": "Full profile of a firm or site (by firm id, numeric id or FEI): all its documents (paged), investigators who inspected it, most-cited CFR sections, observation topics and system areas, inspection classifications, warning letters, and FDA public history for the FEI (inspections, compliance actions, recalls, import refusals, import alerts). Use for pre-inspection briefs.\n\nAlso callable as /api/intel/v1/call/get_firm.\n\nSame as the MCP tool `get_firm`.",
        "tags": [
          "Firms and investigators"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Firm id (slug), numeric firm id, or FEI.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Documents per page (default 100, max 500).",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "description": "Skip this many results (use next_offset from the previous page).",
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateRemaining"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "firm": {
                    "id": "3001234567",
                    "name": "Example Pharma Ltd.",
                    "aliases": [],
                    "fei": "3001234567",
                    "city": "Hyderabad",
                    "state": "Telangana",
                    "country": "India",
                    "establishment_type": "Manufacturer",
                    "url": "https://fdaintel.ai/firm/3001234567"
                  },
                  "documents": {
                    "total": 5,
                    "offset": 0,
                    "limit": 25,
                    "returned": 1,
                    "next_offset": 1,
                    "results": [
                      {
                        "id": "ex4mpl3d0c01",
                        "doc_type": "483",
                        "label": null,
                        "title": "Form 483 · Example Pharma Ltd. · 2025-03-14",
                        "firm_name": "Example Pharma Ltd.",
                        "firm_name_on_document": "Example Pharma Ltd.",
                        "firm_id": "3001234567",
                        "fei": "3001234567",
                        "street": "1 Example Road",
                        "city": "Hyderabad",
                        "state": "Telangana",
                        "zip": "500001",
                        "country": "India",
                        "document_date": "2025-03-14",
                        "issue_date": "2025-03-14",
                        "inspection_start": "2025-03-03",
                        "inspection_end": "2025-03-14",
                        "date_estimated": false,
                        "center_program": "Drugs (CDER)",
                        "establishment_type": "Manufacturer",
                        "page_count": 9,
                        "observation_count": 6,
                        "investigator_names": "Jane Example",
                        "summary": "Laboratory records were incomplete and out-of-specification results were not investigated.",
                        "marcs_cms": null,
                        "available": true,
                        "has_text": true,
                        "price_cents": 9900,
                        "url": "https://fdaintel.ai/d/ex4mpl3d0c01",
                        "owned": false
                      }
                    ]
                  },
                  "investigators": [
                    {
                      "id": "jane-example",
                      "name": "Jane Example",
                      "documents": 2
                    }
                  ],
                  "top_cfr_sections": [
                    {
                      "section": "211.160",
                      "heading": "General requirements",
                      "documents": 2,
                      "citations": 3
                    }
                  ],
                  "top_topics": [
                    {
                      "topic": "lab_controls",
                      "observations": 4
                    }
                  ],
                  "inspection_classifications": [
                    {
                      "classification": "OAI",
                      "n": 1
                    },
                    {
                      "classification": "VAI",
                      "n": 2
                    }
                  ],
                  "warning_letters": [
                    {
                      "document_id": "ex4mpl3d0c02",
                      "letter_date": "2025-09-30",
                      "subject": "CGMP/Finished Pharmaceuticals/Adulterated",
                      "violation_count": 3,
                      "closeout_date": null
                    }
                  ],
                  "fda_history": {
                    "summary": {
                      "fda_inspections": 4,
                      "oai_inspections": 1,
                      "warning_letters": 1,
                      "recalled_products": 0,
                      "import_refusals": 2
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/intel/v1/investigators": {
      "get": {
        "operationId": "search_investigators",
        "summary": "Search FDA investigators",
        "description": "Find FDA investigators by name (fuzzy, any variant). Returns ids, document and site counts, first/last seen.\n\nAlso callable as /api/intel/v1/call/search_investigators.\n\nSame as the MCP tool `search_investigators`.",
        "tags": [
          "Firms and investigators"
        ],
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "description": "Investigator name or part of it.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Results per page (default 25, max 100).",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "description": "Skip this many results (use next_offset from the previous page).",
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateRemaining"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "total": 1,
                  "offset": 0,
                  "limit": 25,
                  "returned": 1,
                  "next_offset": null,
                  "results": [
                    {
                      "id": "jane-example",
                      "name": "Jane Example",
                      "name_variants": [
                        "J. Example"
                      ],
                      "documents": 48,
                      "sites": 41,
                      "first": "2016-02-09",
                      "last": "2025-03-14",
                      "form_483s": 44,
                      "eirs": 4,
                      "oai_inspections": 9,
                      "classified_inspections": 40,
                      "url": "https://fdaintel.ai/investigator/jane-example"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/intel/v1/investigators/{id}": {
      "get": {
        "operationId": "get_investigator",
        "summary": "Investigator profile",
        "description": "Full profile of an FDA investigator: stats (483s, EIRs, average observations, inspection length, OAI share), every document (paged), sites inspected, co-investigators, the CFR sections, topics and system areas they cite most, classifications and centers by year. Use for pre-inspection briefs.\n\nAlso callable as /api/intel/v1/call/get_investigator.\n\nSame as the MCP tool `get_investigator`.",
        "tags": [
          "Firms and investigators"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Investigator id (slug) from search_investigators.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Documents per page (default 100, max 500).",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "description": "Skip this many results (use next_offset from the previous page).",
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateRemaining"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "investigator": {
                    "id": "jane-example",
                    "name": "Jane Example",
                    "name_variants": [
                      "J. Example"
                    ],
                    "url": "https://fdaintel.ai/investigator/jane-example"
                  },
                  "stats": {
                    "documents": 48,
                    "sites": 41,
                    "first": "2016-02-09",
                    "last": "2025-03-14",
                    "form_483s": 44,
                    "eirs": 4,
                    "oai_inspections": 9,
                    "classified_inspections": 40,
                    "avg_observations_per_483": 5.8,
                    "avg_inspection_days": 7
                  },
                  "top_cfr_sections": [
                    {
                      "section": "211.192",
                      "heading": "Production record review",
                      "documents": 14,
                      "citations": 17
                    }
                  ],
                  "top_topics": [
                    {
                      "topic": "investigations",
                      "observations": 21
                    }
                  ],
                  "sites_inspected": [
                    {
                      "firm_name": "Example Pharma Ltd.",
                      "firm_id": "3001234567",
                      "fei": "3001234567",
                      "country": "India",
                      "documents": 2,
                      "last": "2025-03-14",
                      "types": [
                        "483"
                      ]
                    }
                  ],
                  "co_investigators": [
                    {
                      "id": "sam-sample",
                      "name": "Sam Sample",
                      "documents": 6
                    }
                  ],
                  "documents": {
                    "total": 48,
                    "offset": 0,
                    "limit": 25,
                    "returned": 1,
                    "next_offset": 1,
                    "results": [
                      {
                        "id": "ex4mpl3d0c01",
                        "doc_type": "483",
                        "label": null,
                        "title": "Form 483 · Example Pharma Ltd. · 2025-03-14",
                        "firm_name": "Example Pharma Ltd.",
                        "firm_name_on_document": "Example Pharma Ltd.",
                        "firm_id": "3001234567",
                        "fei": "3001234567",
                        "street": "1 Example Road",
                        "city": "Hyderabad",
                        "state": "Telangana",
                        "zip": "500001",
                        "country": "India",
                        "document_date": "2025-03-14",
                        "issue_date": "2025-03-14",
                        "inspection_start": "2025-03-03",
                        "inspection_end": "2025-03-14",
                        "date_estimated": false,
                        "center_program": "Drugs (CDER)",
                        "establishment_type": "Manufacturer",
                        "page_count": 9,
                        "observation_count": 6,
                        "investigator_names": "Jane Example",
                        "summary": "Laboratory records were incomplete and out-of-specification results were not investigated.",
                        "marcs_cms": null,
                        "available": true,
                        "has_text": true,
                        "price_cents": 9900,
                        "url": "https://fdaintel.ai/d/ex4mpl3d0c01",
                        "owned": false
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/intel/v1/cfr": {
      "get": {
        "operationId": "search_cfr",
        "summary": "Search regulations (21 CFR)",
        "description": "Find 21 CFR sections by citation (211.192, part 820) or words in the heading/text, with how often each is cited in 483s/EIRs and warning letters.\n\nAlso callable as /api/intel/v1/call/search_cfr.\n\nSame as the MCP tool `search_cfr`.",
        "tags": [
          "Regulations and catalog"
        ],
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "description": "Citation or words.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Results per page (default 25, max 100).",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "description": "Skip this many results (use next_offset from the previous page).",
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateRemaining"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "total": 1,
                  "offset": 0,
                  "limit": 25,
                  "returned": 1,
                  "next_offset": null,
                  "results": [
                    {
                      "citation": "211.192",
                      "heading": "Production record review",
                      "part": 211,
                      "part_heading": "Current Good Manufacturing Practice for Finished Pharmaceuticals",
                      "subpart": "J",
                      "subpart_heading": "Records and Reports",
                      "status": "current",
                      "summary": "Requires the quality control unit to review and approve production and control records before release.",
                      "documents_483_eir": 1200,
                      "observation_citations": 1500,
                      "warning_letters": 300
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/intel/v1/cfr/{citation}": {
      "get": {
        "operationId": "get_cfr_section",
        "summary": "Regulation detail",
        "description": "One 21 CFR section: heading, full text, summary, firms cited most, sections cited alongside, observation topics, and the documents citing it (paged).\n\nAlso callable as /api/intel/v1/call/get_cfr_section.\n\nSame as the MCP tool `get_cfr_section`.",
        "tags": [
          "Regulations and catalog"
        ],
        "parameters": [
          {
            "name": "citation",
            "in": "path",
            "required": true,
            "description": "e.g. 211.192 or 21 CFR 820.100.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Documents per page (default 50, max 200).",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "description": "Skip this many results (use next_offset from the previous page).",
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateRemaining"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "section": {
                    "citation": "211.192",
                    "heading": "Production record review",
                    "part": 211,
                    "subpart": "J",
                    "status": "current",
                    "summary": "Requires the quality control unit to review and approve production and control records before release.",
                    "body": "All drug product production and control records … shall be reviewed and approved by the quality control unit …"
                  },
                  "top_firms": [
                    {
                      "firm_name": "Example Pharma Ltd.",
                      "firm_id": "3001234567",
                      "fei": "3001234567",
                      "documents": 3
                    }
                  ],
                  "cited_alongside": [
                    {
                      "section": "211.22",
                      "heading": "Responsibilities of quality control unit",
                      "documents": 400
                    }
                  ],
                  "top_topics": [
                    {
                      "topic": "investigations",
                      "observations": 900
                    }
                  ],
                  "documents": {
                    "total": 1200,
                    "offset": 0,
                    "limit": 10,
                    "returned": 1,
                    "next_offset": 1,
                    "results": [
                      {
                        "id": "ex4mpl3d0c01",
                        "doc_type": "483",
                        "label": null,
                        "title": "Form 483 · Example Pharma Ltd. · 2025-03-14",
                        "firm_name": "Example Pharma Ltd.",
                        "firm_name_on_document": "Example Pharma Ltd.",
                        "firm_id": "3001234567",
                        "fei": "3001234567",
                        "street": "1 Example Road",
                        "city": "Hyderabad",
                        "state": "Telangana",
                        "zip": "500001",
                        "country": "India",
                        "document_date": "2025-03-14",
                        "issue_date": "2025-03-14",
                        "inspection_start": "2025-03-03",
                        "inspection_end": "2025-03-14",
                        "date_estimated": false,
                        "center_program": "Drugs (CDER)",
                        "establishment_type": "Manufacturer",
                        "page_count": 9,
                        "observation_count": 6,
                        "investigator_names": "Jane Example",
                        "summary": "Laboratory records were incomplete and out-of-specification results were not investigated.",
                        "marcs_cms": null,
                        "available": true,
                        "has_text": true,
                        "price_cents": 9900,
                        "url": "https://fdaintel.ai/d/ex4mpl3d0c01",
                        "owned": false
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/intel/v1/facets": {
      "get": {
        "operationId": "list_facets",
        "summary": "Filter values and counts",
        "description": "Every filter value with its document count: document types, centers, establishment types, countries, states, product types, sectors, agencies, classifications, system areas, topics, years, warning-letter offices.\n\nAlso callable as /api/intel/v1/call/list_facets.\n\nSame as the MCP tool `list_facets`.",
        "tags": [
          "Regulations and catalog"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateRemaining"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "scope": "visible documents",
                  "doc_type": [
                    {
                      "value": "483",
                      "n": 6000
                    },
                    {
                      "value": "warning_letter",
                      "n": 9000
                    }
                  ],
                  "country": [
                    {
                      "value": "India",
                      "n": 700
                    }
                  ],
                  "topic": [
                    {
                      "value": "data_integrity",
                      "n": 1800
                    }
                  ],
                  "classification": [
                    {
                      "value": "OAI",
                      "n": 1200
                    }
                  ],
                  "year": [
                    {
                      "value": 2025,
                      "n": 1200
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/intel/v1/stats": {
      "get": {
        "operationId": "catalog_stats",
        "summary": "Catalog statistics",
        "description": "Approximate size of the FDA Intel catalog: documents by type, observations, warning letters, firms, investigators and the date range.\n\nAlso callable as /api/intel/v1/call/catalog_stats.\n\nSame as the MCP tool `catalog_stats`.",
        "tags": [
          "Regulations and catalog"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateRemaining"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "approximate": true,
                  "documents": "20,000+",
                  "observations": "30,000+",
                  "warning_letters": "10,000+",
                  "firms": "9,000+",
                  "investigators": "2,000+",
                  "earliest_document": "1996-01-01",
                  "latest_document": "2025-10-31",
                  "by_type": [
                    {
                      "type": "Form 483",
                      "documents": "6,000+"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/intel/v1/call/find_facility": {
      "get": {
        "operationId": "find_facility",
        "summary": "Find a facility",
        "description": "Find FDA-regulated facilities by name (every word must match) or FEI, across FDA inspections and drug / device establishment registrations. Returns FEI, name, place, last inspection date and how many inspections. Follow with facility_signal.\n\nSame as the MCP tool `find_facility`.",
        "tags": [
          "FDA public data"
        ],
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "description": "Facility or firm name, e.g. 'Aurobindo Unit VII'.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fei",
            "in": "query",
            "required": false,
            "description": "FDA Establishment Identifier (FEI) of the facility, digits only.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "description": "Country filter, e.g. India.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Max results (default 20, max 50).",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateRemaining"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "returned": 1,
                  "results": [
                    {
                      "fei": "3001234567",
                      "name": "Example Pharma Ltd.",
                      "city": "Hyderabad",
                      "state": "Telangana",
                      "country": "India",
                      "last_inspection": "2025-03-14",
                      "inspections": 4,
                      "found_in": [
                        "inspected",
                        "drug_registration"
                      ]
                    }
                  ],
                  "note": "Use facility_signal with an FEI for its current standing."
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/intel/v1/call/facility_signal": {
      "get": {
        "operationId": "facility_signal",
        "summary": "Facility signal",
        "description": "A facility's current FDA standing by FEI, with a one-paragraph summary: last inspection and outcome (NAI/VAI/OAI), inspections in 5 years, warning letters and whether a close-out was posted, import alert status (red / yellow / green list), recent recalls, import refusals in 12 months, compliance actions, drug / device registration, and FDA Intel documents on file for the FEI.\n\nSame as the MCP tool `facility_signal`.",
        "tags": [
          "FDA public data"
        ],
        "parameters": [
          {
            "name": "fei",
            "in": "query",
            "required": true,
            "description": "FDA Establishment Identifier (FEI) of the facility, digits only.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateRemaining"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "fei": "3001234567",
                  "facility": {
                    "name": "Example Pharma Ltd.",
                    "street": "1 Example Road",
                    "city": "Hyderabad",
                    "state": "Telangana",
                    "country": "India"
                  },
                  "signal": "Last FDA inspection ended 2025-03-14 (OAI), Drug Quality Assurance. 3 inspections in 5 years (1 OAI, 2 VAI, 0 NAI). 1 warning letter on record (latest 2025-09-30), 1 without a posted close-out. Listed on import alert 66-40 (red list).",
                  "last_inspection": {
                    "inspection_id": 100001,
                    "end_date": "2025-03-14",
                    "classification": "OAI",
                    "project_area": "Drug Quality Assurance",
                    "product_type": "Drugs",
                    "citations": 6
                  },
                  "inspections_last_5_years": {
                    "inspections_5y": 3,
                    "oai_5y": 1,
                    "vai_5y": 2,
                    "nai_5y": 0
                  },
                  "warning_letters": [
                    {
                      "date": "2025-09-30",
                      "marcs_cms": "700001",
                      "subject": "CGMP/Finished Pharmaceuticals/Adulterated",
                      "in_letter_index": true,
                      "response_posted": false,
                      "closeout_posted": null
                    }
                  ],
                  "import_alerts": [
                    {
                      "alert_no": "66-40",
                      "list": "red",
                      "listed_on": "2025-11-02"
                    }
                  ],
                  "recent_recalls": [],
                  "import_refusals": {
                    "last_12_months": 2,
                    "latest": "2025-12-01"
                  },
                  "note": "From FDA public data (inspections, compliance actions, import alerts, recalls, registrations). Use inspection_history for every inspection and its citations.",
                  "fda_intel_documents": {
                    "total": 5,
                    "recent": [
                      {
                        "id": "ex4mpl3d0c01",
                        "document": {
                          "type": "Form 483",
                          "date": "2025-03-14",
                          "observations": 6,
                          "pages": 9,
                          "price_usd": 99,
                          "link": "https://fdaintel.ai/d/ex4mpl3d0c01",
                          "owned": false,
                          "available_to_buy": true
                        },
                        "firm_name": "Example Pharma Ltd."
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/intel/v1/call/inspection_history": {
      "get": {
        "operationId": "inspection_history",
        "summary": "Inspection history with citations",
        "description": "Every FDA inspection of a facility (FEI), newest first: date, classification, project area, product type, and the 21 CFR citations FDA published for it with FDA's citation text.\n\nSame as the MCP tool `inspection_history`.",
        "tags": [
          "FDA public data"
        ],
        "parameters": [
          {
            "name": "fei",
            "in": "query",
            "required": true,
            "description": "FDA Establishment Identifier (FEI) of the facility, digits only.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include_citations",
            "in": "query",
            "required": false,
            "description": "Include citations (default true).",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Results per page (default 25, max 100).",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "description": "Skip this many results (use next_offset from the previous page).",
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateRemaining"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "fei": "3001234567",
                  "total": 4,
                  "offset": 0,
                  "limit": 10,
                  "returned": 1,
                  "next_offset": 1,
                  "results": [
                    {
                      "inspection_id": 100001,
                      "end_date": "2025-03-14",
                      "fiscal_year": 2025,
                      "classification": "OAI",
                      "project_area": "Drug Quality Assurance",
                      "product_type": "Drugs",
                      "name": "Example Pharma Ltd.",
                      "city": "Hyderabad",
                      "state": null,
                      "country": "India",
                      "citations": [
                        {
                          "cfr": "21 CFR 211.192",
                          "short_desc": "Investigations of discrepancies, failures",
                          "long_desc": "There was a failure to thoroughly review any unexplained discrepancy …"
                        }
                      ]
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/intel/v1/call/search_inspections": {
      "get": {
        "operationId": "search_inspections",
        "summary": "Search FDA inspections",
        "description": "Search FDA inspections across all firms by name, FEI, classification (NAI/VAI/OAI), project area, product type, country, state or date range. Newest first.\n\nSame as the MCP tool `search_inspections`.",
        "tags": [
          "FDA public data"
        ],
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "description": "Firm name words.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fei",
            "in": "query",
            "required": false,
            "description": "FDA Establishment Identifier (FEI) of the facility, digits only.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "classification",
            "in": "query",
            "required": false,
            "description": "NAI, VAI or OAI.",
            "schema": {
              "type": "string",
              "enum": [
                "NAI",
                "VAI",
                "OAI"
              ]
            }
          },
          {
            "name": "project_area",
            "in": "query",
            "required": false,
            "description": "Project area contains, e.g. 'Drug Quality Assurance'.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "product_type",
            "in": "query",
            "required": false,
            "description": "Product type contains, e.g. Drugs, Devices.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "description": "Country.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "state",
            "in": "query",
            "required": false,
            "description": "US state code.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "date_from",
            "in": "query",
            "required": false,
            "description": "Earliest date, inclusive: 2023, 2023-06 or 2023-06-15.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "date_to",
            "in": "query",
            "required": false,
            "description": "Latest date, inclusive: 2024, 2024-03 or 2024-03-31.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Results per page (default 25, max 100).",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "description": "Skip this many results (use next_offset from the previous page).",
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateRemaining"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "total": 60,
                  "offset": 0,
                  "limit": 25,
                  "returned": 1,
                  "next_offset": 1,
                  "results": [
                    {
                      "fei": "3001234567",
                      "name": "Example Pharma Ltd.",
                      "city": "Hyderabad",
                      "state": null,
                      "country": "India",
                      "inspection_id": 100001,
                      "end_date": "2025-03-14",
                      "classification": "OAI",
                      "project_area": "Drug Quality Assurance",
                      "product_type": "Drugs",
                      "posted_citations": true
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/intel/v1/call/search_recalls": {
      "get": {
        "operationId": "search_recalls",
        "summary": "Search recalls",
        "description": "FDA recall enforcement reports (drugs, devices, food): by recalling firm, product or reason words, FEI, center, class (I, II, III), status, recall number or date range. Newest first.\n\nSame as the MCP tool `search_recalls`.",
        "tags": [
          "FDA public data"
        ],
        "parameters": [
          {
            "name": "firm",
            "in": "query",
            "required": false,
            "description": "Recalling firm name words.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "description": "Words in the product description or reason, e.g. 'sterility assurance'.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fei",
            "in": "query",
            "required": false,
            "description": "FDA Establishment Identifier (FEI) of the facility, digits only.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "center",
            "in": "query",
            "required": false,
            "description": "drug, device or food.",
            "schema": {
              "type": "string",
              "enum": [
                "drug",
                "device",
                "food"
              ]
            }
          },
          {
            "name": "classification",
            "in": "query",
            "required": false,
            "description": "Class I, Class II or Class III.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Ongoing, Completed or Terminated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "recall_number",
            "in": "query",
            "required": false,
            "description": "e.g. D-0123-2024.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "date_from",
            "in": "query",
            "required": false,
            "description": "Earliest date, inclusive: 2023, 2023-06 or 2023-06-15.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "date_to",
            "in": "query",
            "required": false,
            "description": "Latest date, inclusive: 2024, 2024-03 or 2024-03-31.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Results per page (default 25, max 100).",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "description": "Skip this many results (use next_offset from the previous page).",
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateRemaining"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "total": 1,
                  "offset": 0,
                  "limit": 25,
                  "returned": 1,
                  "next_offset": null,
                  "results": [
                    {
                      "recall_number": "D-0001-2025",
                      "event_id": "90001",
                      "center": "drug",
                      "classification": "Class II",
                      "status": "Ongoing",
                      "firm": "Example Pharma Ltd.",
                      "country": "India",
                      "initiated": "2025-01-20",
                      "classified": "2025-02-11",
                      "terminated": null,
                      "voluntary_mandated": "Voluntary: Firm initiated",
                      "product": "Example tablets, 10 mg, 30-count bottles",
                      "reason": "Failed dissolution specifications",
                      "distribution_pattern": "Nationwide",
                      "application_numbers": [
                        "ANDA000001"
                      ]
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/intel/v1/call/search_import_alerts": {
      "get": {
        "operationId": "search_import_alerts",
        "summary": "Import alerts",
        "description": "FDA import alerts. With alert_no: the alert and the firms on its red / yellow / green lists. With firm, FEI, country or list: matching listed firms. With only q (or nothing): the alerts themselves by title or number.\n\nSame as the MCP tool `search_import_alerts`.",
        "tags": [
          "FDA public data"
        ],
        "parameters": [
          {
            "name": "alert_no",
            "in": "query",
            "required": false,
            "description": "e.g. 66-40.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "firm",
            "in": "query",
            "required": false,
            "description": "Firm name words.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fei",
            "in": "query",
            "required": false,
            "description": "FDA Establishment Identifier (FEI) of the facility, digits only.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "description": "Country.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "list",
            "in": "query",
            "required": false,
            "description": "red (detention without examination), yellow or green (exempted).",
            "schema": {
              "type": "string",
              "enum": [
                "red",
                "yellow",
                "green"
              ]
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "description": "Words in an alert title.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Results per page (default 25, max 100).",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "description": "Skip this many results (use next_offset from the previous page).",
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateRemaining"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "total": 1,
                  "offset": 0,
                  "limit": 25,
                  "returned": 1,
                  "next_offset": null,
                  "results": [
                    {
                      "alert_no": "66-40",
                      "alert_title": "Detention without physical examination of drugs from firms which have not met drug GMPs",
                      "list": "red",
                      "firm_name": "Example Pharma Ltd.",
                      "city": "Hyderabad",
                      "country": "India",
                      "fei": "3001234567",
                      "listed_on": "2025-11-02",
                      "products": "All drug products"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/intel/v1/call/warning_letter_status": {
      "get": {
        "operationId": "warning_letter_status",
        "summary": "Warning-letter status",
        "description": "FDA's warning-letter index: company, issue and posting dates, issuing office, subject, and whether a response and a close-out letter were posted. Filter by company, MARCS-CMS number, office, subject words, closed_out or date range.\n\nSame as the MCP tool `warning_letter_status`.",
        "tags": [
          "FDA public data"
        ],
        "parameters": [
          {
            "name": "company",
            "in": "query",
            "required": false,
            "description": "Company name words.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "marcs_cms",
            "in": "query",
            "required": false,
            "description": "MARCS-CMS number.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "issuing_office",
            "in": "query",
            "required": false,
            "description": "Issuing office contains.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "subject",
            "in": "query",
            "required": false,
            "description": "Subject contains, e.g. CGMP.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "closed_out",
            "in": "query",
            "required": false,
            "description": "Only letters with (true) or without (false) a posted close-out.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "date_from",
            "in": "query",
            "required": false,
            "description": "Earliest date, inclusive: 2023, 2023-06 or 2023-06-15.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "date_to",
            "in": "query",
            "required": false,
            "description": "Latest date, inclusive: 2024, 2024-03 or 2024-03-31.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Results per page (default 25, max 100).",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "description": "Skip this many results (use next_offset from the previous page).",
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateRemaining"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "total": 1,
                  "offset": 0,
                  "limit": 25,
                  "returned": 1,
                  "next_offset": null,
                  "results": [
                    {
                      "marcs_cms": "700001",
                      "company": "Example Pharma Ltd.",
                      "issued": "2025-09-30",
                      "posted": "2025-10-14",
                      "issuing_office": "Center for Drug Evaluation and Research (CDER)",
                      "subject": "CGMP/Finished Pharmaceuticals/Adulterated",
                      "response_posted": null,
                      "closeout_posted": null,
                      "fda_intel_documents": [
                        {
                          "id": "ex4mpl3d0c02",
                          "document": {
                            "type": "Warning letter",
                            "date": "2025-09-30",
                            "observations": 3,
                            "pages": 6,
                            "price_usd": 99,
                            "link": "https://fdaintel.ai/d/ex4mpl3d0c02",
                            "owned": false,
                            "available_to_buy": true
                          }
                        }
                      ]
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/intel/v1/call/drug_shortages": {
      "get": {
        "operationId": "drug_shortages",
        "summary": "Drug shortages",
        "description": "FDA drug shortage list: generic name, company, presentation, status (Current, To Be Discontinued, Resolved), availability, reason and dates.\n\nSame as the MCP tool `drug_shortages`.",
        "tags": [
          "FDA public data"
        ],
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "description": "Drug name words, e.g. 'cisplatin'.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "company",
            "in": "query",
            "required": false,
            "description": "Company name words.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Current, To Be Discontinued or Resolved.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Results per page (default 25, max 100).",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "description": "Skip this many results (use next_offset from the previous page).",
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateRemaining"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "total": 1,
                  "offset": 0,
                  "limit": 25,
                  "returned": 1,
                  "next_offset": null,
                  "results": [
                    {
                      "generic_name": "Cisplatin Injection",
                      "company": "Example Generics Inc.",
                      "presentation": "50 mg/50 mL vial",
                      "package_ndc": "00000-0001-01",
                      "dosage_form": "Injection",
                      "status": "Current",
                      "availability": "Limited supply",
                      "shortage_reason": "Demand increase",
                      "therapeutic_categories": [
                        "Oncology"
                      ],
                      "first_posted": "2025-04-01",
                      "updated": "2025-10-20",
                      "discontinued": null
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/intel/v1/call/search_registrations": {
      "get": {
        "operationId": "search_registrations",
        "summary": "Establishment registrations",
        "description": "FDA establishment registrations. kind=drug: registered drug establishments (FEI, DUNS, operations, registration expiry). kind=device: registered device establishments (registration number, FEI, establishment types, product codes).\n\nSame as the MCP tool `search_registrations`.",
        "tags": [
          "FDA public data"
        ],
        "parameters": [
          {
            "name": "kind",
            "in": "query",
            "required": false,
            "description": "drug (default) or device.",
            "schema": {
              "type": "string",
              "enum": [
                "drug",
                "device"
              ]
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "description": "Establishment or owner name words.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fei",
            "in": "query",
            "required": false,
            "description": "FDA Establishment Identifier (FEI) of the facility, digits only.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "description": "Country (drug) or 2-letter ISO code (device).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "product_code",
            "in": "query",
            "required": false,
            "description": "Device product code, e.g. FRN (device only).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Results per page (default 25, max 100).",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "description": "Skip this many results (use next_offset from the previous page).",
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateRemaining"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "kind": "drug",
                  "total": 1,
                  "offset": 0,
                  "limit": 25,
                  "returned": 1,
                  "next_offset": null,
                  "results": [
                    {
                      "fei": "3001234567",
                      "duns": "000000001",
                      "firm_name": "Example Pharma Ltd.",
                      "address": "1 Example Road, Hyderabad",
                      "country": "India",
                      "registration_expires": "2026-12-31",
                      "operations": [
                        "API manufacture",
                        "Analysis"
                      ],
                      "registrant_name": "Example Pharma Ltd.",
                      "excluded": false
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/intel/v1/call/lookup_510k": {
      "get": {
        "operationId": "lookup_510k",
        "summary": "510(k) clearances",
        "description": "Device 510(k) clearances by K number, device / applicant words, applicant, product code or decision date range, with the device class and regulation number.\n\nSame as the MCP tool `lookup_510k`.",
        "tags": [
          "FDA public data"
        ],
        "parameters": [
          {
            "name": "k_number",
            "in": "query",
            "required": false,
            "description": "e.g. K213456.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "description": "Device or applicant words.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "applicant",
            "in": "query",
            "required": false,
            "description": "Applicant name words.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "product_code",
            "in": "query",
            "required": false,
            "description": "Product code, e.g. DQY.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "date_from",
            "in": "query",
            "required": false,
            "description": "Earliest date, inclusive: 2023, 2023-06 or 2023-06-15.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "date_to",
            "in": "query",
            "required": false,
            "description": "Latest date, inclusive: 2024, 2024-03 or 2024-03-31.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Results per page (default 25, max 100).",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "description": "Skip this many results (use next_offset from the previous page).",
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateRemaining"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "total": 1,
                  "offset": 0,
                  "limit": 25,
                  "returned": 1,
                  "next_offset": null,
                  "results": [
                    {
                      "k_number": "K000001",
                      "applicant": "Example Devices Inc.",
                      "device_name": "Example infusion pump",
                      "product_code": "FRN",
                      "device_class": "2",
                      "regulation_number": "880.5725",
                      "received": "2024-11-02",
                      "decided": "2025-04-18",
                      "decision_description": "Substantially Equivalent",
                      "clearance_type": "Traditional",
                      "advisory_committee": "General Hospital",
                      "city": "Boston",
                      "state": "MA",
                      "country": "US"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/intel/v1/call/lookup_pma": {
      "get": {
        "operationId": "lookup_pma",
        "summary": "PMA approvals",
        "description": "Device premarket approvals (PMA) by PMA number, trade / generic name or applicant words, or product code. First approvals only by default; include_supplements=true adds supplements.\n\nSame as the MCP tool `lookup_pma`.",
        "tags": [
          "FDA public data"
        ],
        "parameters": [
          {
            "name": "pma_number",
            "in": "query",
            "required": false,
            "description": "e.g. P200012.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "description": "Trade name, generic name or applicant words.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "product_code",
            "in": "query",
            "required": false,
            "description": "Product code.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include_supplements",
            "in": "query",
            "required": false,
            "description": "Include PMA supplements (default false).",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Results per page (default 25, max 100).",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "description": "Skip this many results (use next_offset from the previous page).",
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateRemaining"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "total": 1,
                  "offset": 0,
                  "limit": 25,
                  "returned": 1,
                  "next_offset": null,
                  "results": [
                    {
                      "pma_number": "P000001",
                      "supplement": null,
                      "applicant": "Example Devices Inc.",
                      "trade_name": "Example Stent System",
                      "generic_name": "Coronary drug-eluting stent",
                      "product_code": "NIQ",
                      "received": "2023-06-01",
                      "decided": "2024-08-15",
                      "decision_code": "APPR",
                      "supplement_type": null,
                      "supplement_reason": null,
                      "advisory_committee": "Cardiovascular"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/intel/v1/call/lookup_ndc": {
      "get": {
        "operationId": "lookup_ndc",
        "summary": "NDC directory",
        "description": "Drug products in the NDC directory by NDC, brand / generic name words, labeler or application number: dosage form, route, marketing category and dates, active ingredients.\n\nSame as the MCP tool `lookup_ndc`.",
        "tags": [
          "FDA public data"
        ],
        "parameters": [
          {
            "name": "ndc",
            "in": "query",
            "required": false,
            "description": "Product NDC, e.g. 0002-1433.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "description": "Brand or generic name words.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "labeler",
            "in": "query",
            "required": false,
            "description": "Labeler name words.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "application_number",
            "in": "query",
            "required": false,
            "description": "e.g. NDA021436.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Results per page (default 25, max 100).",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "description": "Skip this many results (use next_offset from the previous page).",
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateRemaining"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "total": 1,
                  "offset": 0,
                  "limit": 25,
                  "returned": 1,
                  "next_offset": null,
                  "results": [
                    {
                      "product_ndc": "00000-0001",
                      "brand_name": "Examplomab",
                      "generic_name": "examplomab",
                      "labeler": "Example Biologics Inc.",
                      "dosage_form": "INJECTION, SOLUTION",
                      "routes": [
                        "INTRAVENOUS"
                      ],
                      "product_type": "HUMAN PRESCRIPTION DRUG",
                      "marketing_category": "BLA",
                      "application_number": "BLA000001",
                      "marketing_start": "2023-05-01",
                      "marketing_end": null,
                      "active_ingredients": [
                        {
                          "name": "EXAMPLOMAB",
                          "strength": "100 mg/10mL"
                        }
                      ],
                      "pharm_class": []
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/intel/v1/call/lookup_drug_application": {
      "get": {
        "operationId": "lookup_drug_application",
        "summary": "Drug applications (Drugs@FDA)",
        "description": "Approved drug applications (NDA, ANDA, BLA) by application number, brand / ingredient words or sponsor: first approval, last submission, products and (by number) the submission history.\n\nSame as the MCP tool `lookup_drug_application`.",
        "tags": [
          "FDA public data"
        ],
        "parameters": [
          {
            "name": "application_number",
            "in": "query",
            "required": false,
            "description": "e.g. NDA021436 or ANDA076543.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "description": "Brand name or active ingredient.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sponsor",
            "in": "query",
            "required": false,
            "description": "Sponsor name words.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Results per page (default 25, max 100).",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "description": "Skip this many results (use next_offset from the previous page).",
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateRemaining"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "total": 1,
                  "offset": 0,
                  "limit": 25,
                  "returned": 1,
                  "next_offset": null,
                  "results": [
                    {
                      "application_number": "ANDA000001",
                      "sponsor": "Example Generics Inc.",
                      "first_approval": "2019-07-02",
                      "last_submission": "2025-02-14",
                      "brand_names": [
                        "EXAMPLE TABLETS"
                      ],
                      "active_ingredients": [
                        "EXAMPLAZOLE"
                      ],
                      "marketing_statuses": [
                        "Prescription"
                      ],
                      "products": [
                        {
                          "product_number": "001",
                          "dosage_form": "TABLET",
                          "strength": "10MG"
                        }
                      ],
                      "submissions": [
                        {
                          "type": "ORIG",
                          "number": "1",
                          "status": "AP",
                          "date": "2019-07-02"
                        }
                      ]
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/api/intel/v1/call/check_debarment": {
      "get": {
        "operationId": "check_debarment",
        "summary": "Debarment check",
        "description": "Check a person or firm name against FDA's debarment list and the clinical investigator disqualification list (name match only).\n\nSame as the MCP tool `check_debarment`.",
        "tags": [
          "FDA public data"
        ],
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "description": "Person or firm name.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateRemaining"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "debarments": [],
                  "clinical_investigator_disqualifications": [],
                  "note": "No match on the FDA debarment list or the clinical investigator disqualification list."
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "apiKey": {
        "type": "http",
        "scheme": "bearer",
        "description": "A personal API key (fdi_ak_…) from your account page, sent as Authorization: Bearer <key>."
      },
      "oauth2": {
        "type": "oauth2",
        "description": "OAuth 2.1 authorization code with PKCE (S256). Clients can register themselves (RFC 7591).",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://fdaintel.ai/oauth/authorize",
            "tokenUrl": "https://fdaintel.ai/oauth/token",
            "refreshUrl": "https://fdaintel.ai/oauth/token",
            "scopes": {
              "intel:read": "Read FDA Intel data"
            }
          }
        }
      }
    },
    "headers": {
      "RateLimit": {
        "description": "The limit that applies right now (daily cap or monthly allowance).",
        "schema": {
          "type": "integer"
        }
      },
      "RateRemaining": {
        "description": "Requests left under that limit.",
        "schema": {
          "type": "integer"
        }
      },
      "RateReset": {
        "description": "Seconds until that limit resets.",
        "schema": {
          "type": "integer"
        }
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "string"
          },
          "error_description": {
            "type": "string"
          }
        }
      }
    },
    "responses": {
      "E400": {
        "description": "Invalid request",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": "invalid_request",
              "error_description": "Give a facility name (q) or an FEI number (fei)."
            }
          }
        }
      },
      "E401": {
        "description": "Missing or invalid credential",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": "unauthorized",
              "error_description": "Sign in to FDA Intel to use this API."
            }
          }
        }
      },
      "E403": {
        "description": "No active plan",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": "subscription_required",
              "error_description": "This FDA Intel account has no active Standard or Premium plan."
            }
          }
        }
      },
      "E404": {
        "description": "Not found",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": "not_found",
              "error_description": "No document with id ex4mpl3d0c01."
            }
          }
        }
      },
      "E429": {
        "description": "Limit reached",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": "limit_reached",
              "error_description": "Today's limit is reached: 1,000 requests a day on the Standard plan. It resets at midnight UTC."
            }
          }
        }
      }
    }
  }
}