{
  "openapi": "3.0.1",
  "info": {
    "title": "FDA Drug Labels Scraper - openFDA, NDC & Approvals",
    "description": "Search FDA drug labels by brand, generic name, NDC, UPC, manufacturer or application number. Export flat SPL sections, warnings, ingredients and Drugs@FDA approval dates with NDC and GTIN join keys, for pharmacovigilance, formulary and compliance teams.",
    "version": "0.1",
    "x-build-id": "ZnGL9MF4WyaCZBS5e"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/s-r~fda-drug-labels/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-s-r-fda-drug-labels",
        "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/s-r~fda-drug-labels/runs": {
      "post": {
        "operationId": "runs-sync-s-r-fda-drug-labels",
        "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/s-r~fda-drug-labels/run-sync": {
      "post": {
        "operationId": "run-sync-s-r-fda-drug-labels",
        "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",
        "properties": {
          "drug_name": {
            "title": "Drug name",
            "maxLength": 120,
            "type": "string",
            "description": "Search brand, generic name and substance name (OR). Different input filters are combined with AND."
          },
          "brand_name": {
            "title": "Brand name",
            "maxLength": 120,
            "type": "string",
            "description": "Brand name phrase; a single word ending in * searches a prefix."
          },
          "generic_name": {
            "title": "Generic name",
            "maxLength": 120,
            "type": "string",
            "description": "Generic name phrase; a single word ending in * searches a prefix."
          },
          "manufacturer": {
            "title": "Manufacturer",
            "maxLength": 120,
            "type": "string",
            "description": "Labeler/manufacturer phrase, not the Drugs@FDA sponsor."
          },
          "ndc": {
            "title": "Ndc",
            "type": "array",
            "description": "Product or package NDCs, hyphenated or 10/11 digits. Ambiguous digit strings search all valid segmentations. OR within this list.",
            "items": {
              "type": "string"
            }
          },
          "upc": {
            "title": "Upc",
            "type": "array",
            "description": "12- or 13-digit UPC/GTINs, searched as 13 digits with a leading zero if needed. OR within this list.",
            "items": {
              "type": "string"
            }
          },
          "application_number": {
            "title": "Application number",
            "type": "array",
            "description": "NDA, ANDA or BLA plus six digits, or six digits to search all three prefixes. OR within this list.",
            "items": {
              "type": "string"
            }
          },
          "product_type": {
            "title": "Product type",
            "enum": [
              "any",
              "prescription",
              "otc"
            ],
            "type": "string",
            "description": "Limit to human prescription or OTC labels, or search any type.",
            "default": "any"
          },
          "effective_date_from": {
            "title": "Effective date from",
            "type": "string",
            "description": "Inclusive label effective date boundary (YYYY-MM-DD), not the original approval date."
          },
          "effective_date_to": {
            "title": "Effective date to",
            "type": "string",
            "description": "Inclusive label effective date boundary (YYYY-MM-DD), not the original approval date."
          },
          "include_approval": {
            "title": "Include approval",
            "type": "boolean",
            "description": "Join Drugs@FDA by application number for sponsor, original definitive approval date and products. A failed join preserves labels with a warning.",
            "default": true
          },
          "include_tables": {
            "title": "Include tables",
            "type": "boolean",
            "description": "Include available SPL *_table fields as arrays of original HTML strings.",
            "default": false
          },
          "max_section_chars": {
            "title": "Max section chars",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum Unicode characters per text section. Zero keeps full sections; HTML tables are unaffected.",
            "default": 0
          },
          "max_items": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum distinct label sets over the complete search, including all cursor pages. Non-paying Apify users receive at most 10 rows.",
            "default": 50
          },
          "cursor": {
            "title": "Cursor",
            "maxLength": 600000,
            "type": "string",
            "description": "Opaque next_cursor from the preceding response. Resend all original filters and options unchanged."
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}