{
  "openapi": "3.0.1",
  "info": {
    "title": "openFDA Drug, Device & Biologics Recall Scraper (USA)",
    "description": "Scrape FDA drug, medical device and biologics recalls and enforcement reports from the official openFDA API. Extract recall number, hazard class, product, reason, recalling firm, location, dates, product codes and 510(k) numbers. Export JSON, CSV or Excel.",
    "version": "0.1",
    "x-build-id": "ASqjvpmKaGFMb98qn"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapers_lat~fda-drug-device-recalls-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapers_lat-fda-drug-device-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/scrapers_lat~fda-drug-device-recalls-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapers_lat-fda-drug-device-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/scrapers_lat~fda-drug-device-recalls-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapers_lat-fda-drug-device-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": {
          "maxRecalls": {
            "title": "Max Recalls",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Maximum number of recall records to collect. Optional. openFDA paginates with skip up to 25000, so for very large pulls narrow the filters or date range."
          },
          "productType": {
            "title": "Product Type",
            "enum": [
              "",
              "Drugs",
              "Devices",
              "Biologics"
            ],
            "type": "string",
            "description": "Which FDA recall category to pull. 'All' combines drug and device enforcement reports. Drugs, Biologics come from the drug enforcement endpoint; Devices from the device enforcement endpoint.",
            "default": ""
          },
          "deviceRecallDatabase": {
            "title": "Use detailed device recall database",
            "type": "boolean",
            "description": "Pull from the richer FDA device recall database instead of enforcement reports. Adds product code, 510(k) numbers, root cause and firm action. Overrides Product Type (device-only).",
            "default": false
          },
          "searchQuery": {
            "title": "Search Query",
            "type": "string",
            "description": "A simple keyword (matched to the recall reason, e.g. contamination, mislabeling, sterility, malfunction), or a raw openFDA search expression containing a field, e.g. product_description:insulin or recalling_firm:Pfizer. Leave empty to pull the most recent recalls."
          },
          "classification": {
            "title": "Classification",
            "enum": [
              "",
              "Class I",
              "Class II",
              "Class III"
            ],
            "type": "string",
            "description": "Recall hazard class. Class I is the most serious (reasonable probability of serious health consequences or death). Applies to enforcement reports.",
            "default": ""
          },
          "status": {
            "title": "Status",
            "enum": [
              "",
              "Ongoing",
              "Completed",
              "Terminated",
              "Pending",
              "Open"
            ],
            "type": "string",
            "description": "Recall status.",
            "default": ""
          },
          "state": {
            "title": "State",
            "enum": [
              "",
              "AL",
              "AK",
              "AZ",
              "AR",
              "CA",
              "CO",
              "CT",
              "DE",
              "DC",
              "FL",
              "GA",
              "HI",
              "ID",
              "IL",
              "IN",
              "IA",
              "KS",
              "KY",
              "LA",
              "ME",
              "MD",
              "MA",
              "MI",
              "MN",
              "MS",
              "MO",
              "MT",
              "NE",
              "NV",
              "NH",
              "NJ",
              "NM",
              "NY",
              "NC",
              "ND",
              "OH",
              "OK",
              "OR",
              "PA",
              "RI",
              "SC",
              "SD",
              "TN",
              "TX",
              "UT",
              "VT",
              "VA",
              "WA",
              "WV",
              "WI",
              "WY",
              "PR"
            ],
            "type": "string",
            "description": "Two-letter US state code of the recalling firm, e.g. CA, NY, NJ.",
            "default": ""
          },
          "recallingFirm": {
            "title": "Recalling Firm",
            "type": "string",
            "description": "Filter by the recalling firm or manufacturer name, e.g. Pfizer, Medtronic, Baxter. Matches firms whose name contains this phrase."
          },
          "productDescription": {
            "title": "Product Keyword",
            "type": "string",
            "description": "Filter by a word or phrase in the product description, e.g. insulin, catheter, pacemaker, vaccine, syringe."
          },
          "productCode": {
            "title": "Device Product Code",
            "type": "string",
            "description": "Filter by the FDA device product code, e.g. LWS, DXN. Only applies to the detailed device recall database."
          },
          "city": {
            "title": "City",
            "type": "string",
            "description": "Filter by the city of the recalling firm, e.g. Minneapolis, Boston."
          },
          "country": {
            "title": "Country",
            "type": "string",
            "description": "Filter by the recalling firm country, e.g. United States, Germany. Applies to enforcement reports."
          },
          "voluntaryMandated": {
            "title": "Voluntary or Mandated",
            "enum": [
              "",
              "Voluntary",
              "Mandated"
            ],
            "type": "string",
            "description": "Whether the recall was firm-initiated (voluntary) or ordered by the FDA (mandated). Applies to enforcement reports.",
            "default": ""
          },
          "dateFrom": {
            "title": "Date From",
            "type": "string",
            "description": "Only include recalls with a date on or after this date (YYYY-MM-DD). Applies to the Date Field selected below."
          },
          "dateTo": {
            "title": "Date To",
            "type": "string",
            "description": "Only include recalls with a date on or before this date (YYYY-MM-DD). Applies to the Date Field selected below."
          },
          "dateField": {
            "title": "Date Field",
            "enum": [
              "report_date",
              "recall_initiation_date",
              "center_classification_date",
              "termination_date"
            ],
            "type": "string",
            "description": "Which recall date the Date From / Date To range applies to.",
            "default": "report_date"
          },
          "sortOrder": {
            "title": "Sort Order",
            "enum": [
              "",
              "Newest first",
              "Oldest first"
            ],
            "type": "string",
            "description": "Order results by the selected Date Field. Leave as default to use the openFDA relevance order.",
            "default": ""
          },
          "recallNumber": {
            "title": "Recall Number",
            "type": "string",
            "description": "Look up one exact FDA recall number, e.g. D-321-2016 (drug), Z-2372-2023 (device)."
          },
          "eventId": {
            "title": "Event ID",
            "type": "string",
            "description": "Pull every recall that belongs to one FDA recall event, e.g. 92660. A single event often groups many related product recalls. Applies to enforcement reports."
          },
          "withAiSummary": {
            "title": "AI summary",
            "type": "boolean",
            "description": "Add an AI-generated plain-English summary of each recall (paid add-on).",
            "default": false
          },
          "withAiSeverity": {
            "title": "AI severity assessment",
            "type": "boolean",
            "description": "Rate each recall's health risk low/medium/high/critical with a 0-100 score (paid add-on).",
            "default": 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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}