{
  "openapi": "3.0.1",
  "info": {
    "title": "FDA Recalls Scraper (openFDA) — Food, Drug & Device",
    "description": "US FDA recalls from the official openFDA enforcement reports: food, drugs and medical devices with firm, classification, reason, quantity, distribution, dates and status. Filter by keyword, firm, class, state and date, and flag recalls new or changed since your last run.",
    "version": "0.1",
    "x-build-id": "m2o37wyPEevURthhR"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/northbell~openfda-recalls-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-northbell-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/northbell~openfda-recalls-scraper/runs": {
      "post": {
        "operationId": "runs-sync-northbell-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/northbell~openfda-recalls-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-northbell-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": {
          "productTypes": {
            "title": "Product types",
            "type": "array",
            "description": "Which FDA enforcement reports to search: food, drugs, medical devices. They are read in the order you pick, newest report date first within each. Leave empty for all three.",
            "items": {
              "type": "string",
              "enum": [
                "food",
                "drug",
                "device"
              ],
              "enumTitles": [
                "Food",
                "Drugs",
                "Medical devices"
              ]
            }
          },
          "keywords": {
            "title": "Keywords (optional)",
            "type": "array",
            "description": "Words or phrases to find in the product description or in the reason for the recall. One per line; a recall that matches any line is returned. Keep them short, e.g. \"listeria\", \"undeclared milk\" or \"pacemaker\". Leave empty to skip.",
            "items": {
              "type": "string"
            }
          },
          "recallingFirms": {
            "title": "Recalling firms (optional)",
            "type": "array",
            "description": "Only recalls by these companies, one name per line, as the FDA writes it, e.g. \"Teva\" or \"Stryker\". A name matches whole words in the firm name (not case sensitive), so \"Stryker\" finds \"Stryker Corporation\". Leave empty for all firms.",
            "items": {
              "type": "string"
            }
          },
          "classifications": {
            "title": "Classification (optional)",
            "type": "array",
            "description": "Only recalls the FDA classified as these hazard levels. Leave empty for all three.",
            "items": {
              "type": "string",
              "enum": [
                "Class I",
                "Class II",
                "Class III"
              ],
              "enumTitles": [
                "Class I (could cause serious health problems or death)",
                "Class II (might cause a temporary health problem, or a slight threat)",
                "Class III (unlikely to cause an adverse health reaction)"
              ]
            }
          },
          "statuses": {
            "title": "Status (optional)",
            "type": "array",
            "description": "Only recalls with these statuses as openFDA lists them. Leave empty for all. Note that a search for Ongoing no longer returns a recall once it is Terminated, so leave this empty if you want to see status changes.",
            "items": {
              "type": "string",
              "enum": [
                "Ongoing",
                "Completed",
                "Terminated",
                "Pending"
              ],
              "enumTitles": [
                "Ongoing",
                "Completed",
                "Terminated",
                "Pending"
              ]
            }
          },
          "states": {
            "title": "Firm's state (optional)",
            "type": "array",
            "description": "Only recalls by firms located in these US states, as two-letter codes, one per line: CA, TX, NY. This is where the recalling firm is, not where the product was sold. Leave empty for all.",
            "items": {
              "type": "string"
            }
          },
          "countries": {
            "title": "Firm's country (optional)",
            "type": "array",
            "description": "Only recalls by firms located in these countries, one per line, as the FDA writes them: United States, Canada, India. This is where the recalling firm is, not where the product was sold. Leave empty for all.",
            "items": {
              "type": "string"
            }
          },
          "reportDateSince": {
            "title": "Reported since (optional)",
            "type": "string",
            "description": "Only recalls whose FDA enforcement report date is on or after this day, as YYYY-MM-DD, e.g. 2026-01-01. If you also set \"Reported within the last N days\", the later of the two dates is used. Leave empty for no start date."
          },
          "reportedWithinDays": {
            "title": "Reported within the last N days (optional)",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Only recalls in FDA enforcement reports from the last N days. openFDA is updated weekly, so a value under 7 may return nothing. Leave empty for no limit."
          },
          "output": {
            "title": "What to return",
            "enum": [
              "all",
              "new",
              "new-or-changed"
            ],
            "type": "string",
            "description": "With the last two, recalls you already got in an earlier run of the same search (and whose status has not changed) are skipped and not charged. The first run returns everything, because there is nothing to compare with yet. These modes read every matching recall to compare it, so narrow the search with a date to keep the run short.",
            "default": "all"
          },
          "maxResults": {
            "title": "Maximum recalls",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "How many recall rows to return in total, product types in the order you picked them, newest report date first within a type. You pay per row returned.",
            "default": 200
          },
          "apiKey": {
            "title": "Your openFDA API key (optional)",
            "type": "string",
            "description": "Optional. Your own free key from open.fda.gov/apis/authentication. Without a key openFDA allows 240 requests per minute and 1,000 per day per IP address, and Apify runs share IP addresses; with a key, 240 per minute and 120,000 per day. The key is sent to openFDA in a request header only; the Actor never logs it or writes it to the dataset."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}