{
  "openapi": "3.0.1",
  "info": {
    "title": "openFDA Scraper: Recalls, Drug Labels & Adverse Events",
    "description": "Pull FDA drug, device and food recalls, prescription and OTC drug labels, FAERS adverse event reports and the full NDC drug directory from the FDA's official openFDA API. Filter by product, company, state, recall class and date. No key, no login, no scraping.",
    "version": "0.0",
    "x-build-id": "xzgb0isAZt0MLwMoH"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/winterlock~openfda-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-winterlock-openfda-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/winterlock~openfda-scraper/runs": {
      "post": {
        "operationId": "runs-sync-winterlock-openfda-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/winterlock~openfda-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-winterlock-openfda-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": "What to collect",
            "enum": [
              "drugRecalls",
              "deviceRecalls",
              "foodRecalls",
              "drugLabels",
              "drugEvents",
              "ndcDirectory"
            ],
            "type": "string",
            "description": "Which openFDA dataset to pull from. Each one has its own fields, and the filters below adapt to your choice.",
            "default": "drugRecalls"
          },
          "productSearch": {
            "title": "Product or drug name",
            "type": "string",
            "description": "Matches the product description on a recall, the brand name on a label or in the NDC directory, or the reported drug on an adverse event."
          },
          "firm": {
            "title": "Company",
            "type": "string",
            "description": "The recalling firm on a recall, the labeler in the NDC directory, or the manufacturer on a label. Adverse event reports have no searchable company name."
          },
          "dateFrom": {
            "title": "Date from",
            "type": "string",
            "description": "Earliest date, as 2025-01-31. Applies to the report date on a recall, the effective date on a label, the receive date on an adverse event, or the marketing start date in the NDC directory."
          },
          "dateTo": {
            "title": "Date to",
            "type": "string",
            "description": "Latest date, as 2025-12-31."
          },
          "state": {
            "title": "State (recalls only)",
            "type": "string",
            "description": "Two-letter state code of the recalling firm, for example CA. Ignored for labels, adverse events and the NDC directory."
          },
          "classification": {
            "title": "Recall class",
            "enum": [
              "any",
              "Class I",
              "Class II",
              "Class III"
            ],
            "type": "string",
            "description": "Class I is the most serious: a reasonable probability of serious harm or death. Class III is least serious.",
            "default": "any"
          },
          "recallStatus": {
            "title": "Recall status",
            "enum": [
              "any",
              "Ongoing",
              "Completed",
              "Terminated",
              "Pending"
            ],
            "type": "string",
            "description": "Where the recall stands in the FDA's process.",
            "default": "any"
          },
          "reaction": {
            "title": "Reaction (adverse events only)",
            "type": "string",
            "description": "A MedDRA reaction term as reported, for example nausea or hepatic failure."
          },
          "seriousOnly": {
            "title": "Serious reports only",
            "type": "boolean",
            "description": "Keep only reports the sender flagged as serious (death, hospitalisation, disability, birth defect or life-threatening).",
            "default": false
          },
          "searchQuery": {
            "title": "Raw openFDA query",
            "type": "string",
            "description": "Advanced. A raw query clause, ANDed with everything above, for example openfda.pharm_class_epc:\"nonsteroidal anti-inflammatory drug\". Uses openFDA's own Lucene syntax."
          },
          "sort": {
            "title": "Sort order",
            "type": "string",
            "description": "For example report_date:asc. Leave empty to sort newest first by the dataset's own date field."
          },
          "apiKey": {
            "title": "openFDA API key (optional)",
            "type": "string",
            "description": "Not required. A free key from open.fda.gov raises the daily limit from 1,000 to 120,000 requests. Leave empty to run without one."
          },
          "maxResults": {
            "title": "Max records",
            "minimum": 1,
            "maximum": 26000,
            "type": "integer",
            "description": "openFDA serves up to 1,000 per page and will not page past 26,000 hits for a single query.",
            "default": 100
          },
          "maxItems": {
            "title": "Max items in total",
            "minimum": 1,
            "type": "integer",
            "description": "Stop the run after saving this many items. Leave empty for no limit."
          },
          "maxConcurrency": {
            "title": "Max parallel requests",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "Pages are fetched in order, so this is a ceiling rather than a target. openFDA allows 240 requests per minute.",
            "default": 3
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Not needed. The openFDA API is open to datacenter traffic.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}