{
  "openapi": "3.0.1",
  "info": {
    "title": "openFDA Scraper | FDA Recalls, Drug & Device Records",
    "description": "Get FDA recalls (recall number, hazard class, status, recalling firm, reason) for food, drugs and devices, plus drug labels, adverse events, 510(k) clearances, approvals, NDC and shortages. Filters by class, state, firm, date. No API key.",
    "version": "0.0",
    "x-build-id": "UhroQ2ZbZ6rT3eGyS"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/genial_candlestand~openfda-recalls-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-genial_candlestand-openfda-recalls-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/genial_candlestand~openfda-recalls-scraper/runs": {
      "post": {
        "operationId": "runs-sync-genial_candlestand-openfda-recalls-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/genial_candlestand~openfda-recalls-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-genial_candlestand-openfda-recalls-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",
        "properties": {
          "datasets": {
            "title": "FDA datasets",
            "type": "array",
            "description": "Which FDA datasets to search; several per run, each row is labelled with its dataset. Default: food, drug and device recalls. Recall filters work only with recall datasets; dates work with every dataset except drug shortages.",
            "items": {
              "type": "string",
              "enum": [
                "foodRecalls",
                "drugRecalls",
                "deviceRecalls",
                "deviceRecallDetails",
                "drugLabels",
                "drugAdverseEvents",
                "deviceAdverseEvents",
                "device510k",
                "drugApprovals",
                "drugNdc",
                "drugShortages"
              ],
              "enumTitles": [
                "Food recalls (Enforcement Reports)",
                "Drug recalls (Enforcement Reports)",
                "Medical device recalls (Enforcement Reports)",
                "Device recall details (CDRH database: root cause, action)",
                "Drug labels (SPL: indications, warnings, dosage)",
                "Drug adverse events (FAERS)",
                "Device adverse events (MAUDE)",
                "Device 510(k) clearances",
                "Drug approvals (Drugs@FDA applications)",
                "NDC drug products directory",
                "Drug shortages"
              ]
            },
            "default": [
              "foodRecalls",
              "drugRecalls",
              "deviceRecalls"
            ]
          },
          "queries": {
            "title": "Search terms",
            "type": "array",
            "description": "One search per line, run on every selected dataset (e.g. listeria, metformin, pacemaker). Several words mean OR; put phrases and hyphenated values in double quotes. openFDA field syntax also works, e.g. openfda.brand_name:\"tylenol\". Empty = all records matching the filters, newest first.",
            "items": {
              "type": "string"
            }
          },
          "dateFrom": {
            "title": "From date",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Only records dated on or after this day (YYYY-MM-DD). The date is the recall report date for recalls, the posting date for device recall details, the label effective date, the date FDA received an adverse event, the 510(k) decision date, the NDC marketing start date, or any submission action date for drug approvals. Not available for drug shortages."
          },
          "dateTo": {
            "title": "To date",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Only records dated on or before this day (YYYY-MM-DD), same date per dataset as From date. Must not be earlier than From date. Not available for drug shortages."
          },
          "classifications": {
            "title": "Recall class",
            "type": "array",
            "description": "Only recalls of these FDA hazard classes: Class I = may cause serious harm or death, Class II = temporary or reversible harm, Class III = unlikely to cause harm. Works with food, drug and device recalls (Enforcement Reports) only, not with device recall details or other datasets.",
            "items": {
              "type": "string",
              "enum": [
                "Class I",
                "Class II",
                "Class III"
              ]
            }
          },
          "recallStatus": {
            "title": "Recall status",
            "type": "array",
            "description": "Only recalls in these states: Ongoing (still open), Completed, Terminated (closed by FDA). Works with the four recall datasets only.",
            "items": {
              "type": "string",
              "enum": [
                "Ongoing",
                "Completed",
                "Terminated"
              ]
            }
          },
          "states": {
            "title": "Recalling firm's US state",
            "type": "array",
            "description": "Only recalls by firms located in these US states, two-letter codes (CA, NY, TX). This is where the firm is, not where the product was distributed. Works with the four recall datasets only.",
            "items": {
              "type": "string"
            }
          },
          "recallingFirm": {
            "title": "Recalling firm",
            "type": "string",
            "description": "Only recalls by firms whose name contains this word or phrase, e.g. Pfizer or Kraft Heinz. Works with the four recall datasets only."
          },
          "maxItemsPerQuery": {
            "title": "Max records per dataset and search term",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop each dataset × search term after this many records (newest first). Up to 25,000 per search are reachable directly; beyond that the actor follows the openFDA cursor.",
            "default": 100
          },
          "maxItems": {
            "title": "Max records in total",
            "minimum": 1,
            "type": "integer",
            "description": "Stop the whole run after this many records across all datasets and search terms. Empty = no total limit."
          },
          "pageSize": {
            "title": "Records per request",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "How many records to ask openFDA for in one request (1–100). Device recall datasets always use at most 25, because single device recall records can be megabytes long. Lower it only if requests time out.",
            "default": 100
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "openFDA allows about 1,000 requests a day per IP address without a key; the Apify datacenter proxy spreads requests over many IPs. Turn it off only for small runs.",
            "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}