{
  "openapi": "3.0.1",
  "info": {
    "title": "FDA Orange Book Scraper",
    "description": "Scrape FDA's Orange Book - Approved Drug Products with Therapeutic Equivalence Evaluations. Search by drug name, active ingredient, applicant, or application number; browse by approval date; look up patents and marketing exclusivities. Sourced from FDA's official monthly bulk data files.",
    "version": "1.0",
    "x-build-id": "PXtebvdJN99mB7Lde"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/crawlerbros~fda-orange-book-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-crawlerbros-fda-orange-book-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/crawlerbros~fda-orange-book-scraper/runs": {
      "post": {
        "operationId": "runs-sync-crawlerbros-fda-orange-book-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/crawlerbros~fda-orange-book-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-crawlerbros-fda-orange-book-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "byApplicationNumbers",
              "byApprovalDateRange",
              "patentExclusivityLookup",
              "findEquivalents"
            ],
            "type": "string",
            "description": "What to fetch.",
            "default": "search"
          },
          "searchQuery": {
            "title": "Search query (mode=search)",
            "type": "string",
            "description": "Free-text query matched against ingredient, trade name, applicant, and application number.",
            "default": "ibuprofen"
          },
          "activeIngredient": {
            "title": "Active ingredient contains",
            "type": "string",
            "description": "Case-insensitive substring match against the active ingredient name(s). Combines with other filters."
          },
          "tradeName": {
            "title": "Trade name contains",
            "type": "string",
            "description": "Case-insensitive substring match against the brand/trade name."
          },
          "applicantName": {
            "title": "Applicant contains",
            "type": "string",
            "description": "Case-insensitive substring match against the applicant (manufacturer) name."
          },
          "applicationNumberQuery": {
            "title": "Application number contains",
            "type": "string",
            "description": "Substring/suffix match against the application number, e.g. `020610`, `NDA020610`."
          },
          "applicationNumbers": {
            "title": "Application numbers (mode=byApplicationNumbers / findEquivalents)",
            "type": "array",
            "description": "Exact application numbers to look up, e.g. `NDA020610`, `ANDA018613`, or bare `020610`. mode=byApplicationNumbers accepts multiple; mode=findEquivalents uses exactly one as the reference product.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "applicationType": {
            "title": "Application type",
            "enum": [
              "",
              "NDA",
              "ANDA"
            ],
            "type": "string",
            "description": "Filter to NDA (brand/new drug) or ANDA (generic) applications only.",
            "default": ""
          },
          "drugType": {
            "title": "Drug type",
            "enum": [
              "",
              "RX",
              "OTC",
              "DISCN"
            ],
            "type": "string",
            "description": "Filter to prescription, over-the-counter, or discontinued products.",
            "default": ""
          },
          "teCode": {
            "title": "Therapeutic equivalence (TE) code",
            "enum": [
              "",
              "AA",
              "AB",
              "AB1",
              "AB2",
              "AB3",
              "AB4",
              "AN",
              "AO",
              "AP",
              "AP1",
              "AP2",
              "AP3",
              "AT",
              "AT1",
              "AT2",
              "AT3",
              "BC",
              "BD",
              "BP",
              "BS",
              "BX"
            ],
            "type": "string",
            "description": "Filter to products carrying this exact TE code.",
            "default": ""
          },
          "referenceListedDrugOnly": {
            "title": "Reference Listed Drug (RLD) only",
            "type": "boolean",
            "description": "Only emit products marked as the Reference Listed Drug for their group.",
            "default": false
          },
          "referenceStandardOnly": {
            "title": "Reference Standard (RS) only",
            "type": "boolean",
            "description": "Only emit products marked as the Reference Standard for bioequivalence testing.",
            "default": false
          },
          "dosageFormQuery": {
            "title": "Dosage form contains",
            "type": "string",
            "description": "Case-insensitive substring match against the dosage form (e.g. `TABLET`, `INJECTABLE`, `CREAM`). There are 117+ distinct dosage forms and many appear only combined with a route (e.g. `TABLET, EXTENDED RELEASE`), so this is a free-text contains-match rather than an exact dropdown."
          },
          "routeQuery": {
            "title": "Route of administration contains",
            "type": "string",
            "description": "Case-insensitive substring match against the route of administration (e.g. `ORAL`, `TOPICAL`, `INTRAVENOUS`). FDA lists 79+ route strings, many as multi-route combinations (e.g. `INTRAMUSCULAR, INTRAVENOUS`), so this is a contains-match rather than an exact dropdown."
          },
          "strengthQuery": {
            "title": "Strength contains",
            "type": "string",
            "description": "Case-insensitive substring match against the labeled strength (e.g. `200MG`, `10MG/ML`)."
          },
          "hasPatentsOnly": {
            "title": "Only products with patents",
            "type": "boolean",
            "description": "Only emit products that have at least one listed patent.",
            "default": false
          },
          "hasExclusivityOnly": {
            "title": "Only products with exclusivity",
            "type": "boolean",
            "description": "Only emit products that have at least one active marketing exclusivity.",
            "default": false
          },
          "excludeReferenceProduct": {
            "title": "Exclude reference product (mode=findEquivalents)",
            "type": "boolean",
            "description": "When true, omit the reference product itself from the results — only its equivalents (other applicants' matching products) are emitted.",
            "default": false
          },
          "sortBy": {
            "title": "Sort results by",
            "enum": [
              "default",
              "approvalDateDesc",
              "approvalDateAsc",
              "ingredientAsc",
              "applicantAsc",
              "tradeNameAsc",
              "expirationDateAsc",
              "expirationDateDesc"
            ],
            "type": "string",
            "description": "Sort order for emitted records. Approval-date and name sorts apply to product modes (search / byApplicationNumbers / byApprovalDateRange / findEquivalents); expiration-date sorts apply to mode=patentExclusivityLookup.",
            "default": "default"
          },
          "approvalDateFrom": {
            "title": "Approval date from (mode=byApprovalDateRange)",
            "type": "string",
            "description": "ISO date `YYYY-MM-DD`. Drop products approved before this date. Required (with/without `approvalDateTo`) for mode=byApprovalDateRange; optional filter on other modes."
          },
          "approvalDateTo": {
            "title": "Approval date to (mode=byApprovalDateRange)",
            "type": "string",
            "description": "ISO date `YYYY-MM-DD`. Drop products approved after this date."
          },
          "recordKind": {
            "title": "Record kind (mode=patentExclusivityLookup)",
            "enum": [
              "both",
              "patents",
              "exclusivities"
            ],
            "type": "string",
            "description": "Which entity type to emit.",
            "default": "both"
          },
          "patentNumberQuery": {
            "title": "Patent number contains (mode=patentExclusivityLookup)",
            "type": "string",
            "description": "Substring match against the US patent number."
          },
          "exclusivityCodeQuery": {
            "title": "Exclusivity code contains (mode=patentExclusivityLookup)",
            "type": "string",
            "description": "Substring match against the exclusivity code, e.g. `NCE`, `ODE`, `PED`."
          },
          "includeDelisted": {
            "title": "Include delisted patents",
            "type": "boolean",
            "description": "Whether to include patents FDA has flagged as delisted from the Orange Book (mode=patentExclusivityLookup).",
            "default": true
          },
          "expirationDateFrom": {
            "title": "Expiration date from (mode=patentExclusivityLookup)",
            "type": "string",
            "description": "ISO date `YYYY-MM-DD`. Drop patents/exclusivities expiring before this date."
          },
          "expirationDateTo": {
            "title": "Expiration date to (mode=patentExclusivityLookup)",
            "type": "string",
            "description": "ISO date `YYYY-MM-DD`. Drop patents/exclusivities expiring after this date."
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Hard cap on emitted records.",
            "default": 100
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional. FDA rarely blocks datacenter IPs; the actor tries a direct connection first and only engages this free Apify datacenter proxy as a fallback if the direct download is blocked.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}