# searchOrangeBook

**Identifier:** `openfda_searchOrangeBook`

**Provider:** [OpenFDA](https://kirha.com/providers/openfda.md)

Search the FDA Orange Book (approved small-molecule drug products with therapeutic equivalence evaluations) by trade name, ingredient, applicant or patent number, and screen NDAs by when their last listed patent or exclusivity expires (loss-of-exclusivity screens). Returns one row per NDA/ANDA application with patent and exclusivity summary; use getOrangeBookPatents with an applicationNumber for the full patent, exclusivity and generic-entry detail. Biologics are not in the Orange Book: use searchPurpleBook.

## Run it with the CLI

```bash
kirha tools run openfda_searchOrangeBook \
  --input '{}'
```

`--input` takes a JSON object that matches the input schema. Pass `--input -` to read it from stdin.

## Call it over HTTP

```bash
curl https://api.kirha.com/tools/v1/execute \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: **********' \
  --data '{
  "tool_name": "openfda_searchOrangeBook",
  "input": {}
}'
```

Replace the stars with an API key from https://app.kirha.com/api-keys.

## Input schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "properties": {
    "applicationType": {
      "description": "NDA = brand/505(b)(2), ANDA = generic",
      "enum": [
        "NDA",
        "ANDA"
      ],
      "type": "string"
    },
    "limit": {
      "default": 10,
      "maximum": 50,
      "minimum": 1,
      "type": "integer"
    },
    "marketingStatus": {
      "enum": [
        "rx",
        "otc",
        "discontinued"
      ],
      "type": "string"
    },
    "protectionEndsAfter": {
      "description": "YYYY-MM-DD. Keep applications whose last patent/exclusivity expiry is on or after this date",
      "format": "date",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
      "type": "string"
    },
    "protectionEndsBefore": {
      "description": "YYYY-MM-DD",
      "format": "date",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
      "type": "string"
    },
    "query": {
      "default": "",
      "description": "Trade name, ingredient, applicant or patent number, e.g. Ozempic, apixaban, 8129343",
      "type": "string"
    },
    "referenceListedDrugOnly": {
      "default": false,
      "type": "boolean"
    },
    "sortBy": {
      "default": "relevance",
      "enum": [
        "relevance",
        "protection_end_asc",
        "protection_end_desc",
        "approval_date_desc",
        "approval_date_asc"
      ],
      "type": "string"
    }
  },
  "type": "object"
}
```

## Output schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "applicationNumbers": {
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "applications": {
      "items": {
        "additionalProperties": false,
        "properties": {
          "applicant": {
            "type": "string"
          },
          "applicationNumber": {
            "description": "e.g. NDA209637; same key as openfda-mcp searchDrugApprovals",
            "type": "string"
          },
          "applicationType": {
            "type": "string"
          },
          "dosageFormRoutes": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "exclusivityCodes": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "firstApprovalDate": {
            "description": "YYYY-MM-DD; absent when approved before 1982",
            "type": "string"
          },
          "ingredient": {
            "type": "string"
          },
          "lastExclusivityExpiry": {
            "type": "string"
          },
          "lastPatentExpiry": {
            "type": "string"
          },
          "marketingStatuses": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "patentCount": {
            "type": "number"
          },
          "productCount": {
            "type": "number"
          },
          "protectionEndDate": {
            "description": "Latest listed patent or exclusivity expiry",
            "type": "string"
          },
          "referenceListedDrug": {
            "type": "boolean"
          },
          "teCodes": {
            "description": "Therapeutic equivalence codes, e.g. AB",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "tradeNames": {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "applicationNumber",
          "applicationType",
          "tradeNames",
          "ingredient",
          "applicant",
          "dosageFormRoutes",
          "marketingStatuses",
          "referenceListedDrug",
          "productCount",
          "patentCount"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "context": {
      "type": "string"
    }
  },
  "required": [
    "context",
    "applications",
    "applicationNumbers"
  ],
  "type": "object"
}
```

## Related tools

Other OpenFDA tools that this tool refers to, or that refer to it.

- [`getOrangeBookPatents`](https://kirha.com/providers/openfda/getOrangeBookPatents.md)
- [`searchPurpleBook`](https://kirha.com/providers/openfda/searchPurpleBook.md)
- [`searchDrugApprovals`](https://kirha.com/providers/openfda/searchDrugApprovals.md)

-----

[All OpenFDA tools](https://kirha.com/providers/openfda.md) · [< Back to tools list](https://kirha.com/tools.md)