{
  "openapi": "3.0.1",
  "info": {
    "title": "openFDA Medical Device 510(k), Drug & Food Recalls Scraper",
    "description": "Extract official FDA Medical Device 510(k) clearances and Drug, Device & Food Enforcement Recalls from the official openFDA REST API. Filter by dataset, state, recall classification (Class I, II, III), applicant/firm name, and date range. Includes risk severity scores, regulatory contacts, and direc",
    "version": "1.0",
    "x-build-id": "RaiBiQBlS4M7uSLv3"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/apex-b2b-data~openfda-recalls-adverse-events-510k/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-apex-b2b-data-openfda-recalls-adverse-events-510k",
        "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/apex-b2b-data~openfda-recalls-adverse-events-510k/runs": {
      "post": {
        "operationId": "runs-sync-apex-b2b-data-openfda-recalls-adverse-events-510k",
        "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/apex-b2b-data~openfda-recalls-adverse-events-510k/run-sync": {
      "post": {
        "operationId": "run-sync-apex-b2b-data-openfda-recalls-adverse-events-510k",
        "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": {
          "dataset": {
            "title": "FDA Dataset",
            "enum": [
              "device_510k",
              "drug_enforcement",
              "device_enforcement",
              "food_enforcement"
            ],
            "type": "string",
            "description": "Select openFDA registry to query: Medical Device 510(k) clearances, Drug recalls, Device recalls, or Food recalls.",
            "default": "device_510k"
          },
          "searchQuery": {
            "title": "Search Query / Keyword",
            "type": "string",
            "description": "Search by applicant name, recalling firm, device name, or product description (e.g. 'orthopedic', 'Pfizer', 'catheter').",
            "default": ""
          },
          "state": {
            "title": "State Code",
            "type": "string",
            "description": "Filter by 2-letter US state code of applicant or recalling firm (e.g. CA, NY, TX, FL, MA).",
            "default": ""
          },
          "recallClassification": {
            "title": "Recall Severity Classification",
            "enum": [
              "ALL",
              "Class I",
              "Class II",
              "Class III"
            ],
            "type": "string",
            "description": "Filter enforcement recalls by severity: Class I (most critical/life-threatening), Class II (moderate/reversible risk), Class III (minor regulatory violation).",
            "default": "ALL"
          },
          "startDate": {
            "title": "Start Date (YYYY-MM-DD)",
            "type": "string",
            "description": "Filter by decision date (510k) or recall initiation date on or after this date (YYYY-MM-DD).",
            "default": ""
          },
          "endDate": {
            "title": "End Date (YYYY-MM-DD)",
            "type": "string",
            "description": "Filter by decision date (510k) or recall initiation date on or before this date (YYYY-MM-DD).",
            "default": ""
          },
          "sortBy": {
            "title": "Sort By",
            "type": "string",
            "description": "Field and sort direction for results (e.g. decision_date:desc or recall_initiation_date:desc).",
            "default": "decision_date:desc"
          },
          "limit": {
            "title": "Max Records",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum number of FDA records to extract (default: 20).",
            "default": 20
          },
          "apiKey": {
            "title": "openFDA API Key (Optional)",
            "type": "string",
            "description": "Optional openFDA developer API key from open.fda.gov to raise rate limit to 120,000 requests/day.",
            "default": ""
          },
          "monitorMode": {
            "title": "Monitor Mode (Deduplication)",
            "type": "boolean",
            "description": "Enable incremental monitoring to only output new FDA records not seen in previous runs.",
            "default": false
          },
          "monitorStoreName": {
            "title": "Monitor Store Name",
            "type": "string",
            "description": "Named Key-Value Store used to persist seen record IDs between runs.",
            "default": "openfda-seen-records"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}