{
  "openapi": "3.0.1",
  "info": {
    "title": "FDA Recall Database API: Food, Drug and Device",
    "description": "Gets FDA recalls from openFDA, 10 recalls by default, with UPC codes when listed. Each has recall number, class, status, firm, product, reason and dates. Filters food, drug or medical device enforcement reports by class, date, firm, keyword or two-letter state. No address fields. No key.",
    "version": "0.1",
    "x-build-id": "w8gHEIaReveLIb17e"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/plain-build~openfda-recalls-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-plain-build-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/plain-build~openfda-recalls-scraper/runs": {
      "post": {
        "operationId": "runs-sync-plain-build-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/plain-build~openfda-recalls-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-plain-build-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": {
          "product_type": {
            "title": "Product type",
            "enum": [
              "all",
              "food",
              "drug",
              "device"
            ],
            "type": "string",
            "description": "all, food, drug or device. all reads the three and gives the newest of each in turn.",
            "default": "all"
          },
          "classification": {
            "title": "Recall class",
            "enum": [
              "all",
              "class_i",
              "class_ii",
              "class_iii"
            ],
            "type": "string",
            "description": "all, class_i (a reasonable chance of serious harm or death), class_ii or class_iii (unlikely to cause harm).",
            "default": "all"
          },
          "status": {
            "title": "Recall status",
            "enum": [
              "all",
              "ongoing",
              "completed",
              "terminated"
            ],
            "type": "string",
            "description": "all, ongoing, completed or terminated, as the enforcement report gives it.",
            "default": "all"
          },
          "report_date_from": {
            "title": "Reported on or after (YYYY-MM-DD)",
            "type": "string",
            "description": "The first day of the FDA enforcement report, as YYYY-MM-DD, for example 2026-01-07. Leave empty for the newest reports with no start date. With Only new recalls on, an empty value reads at least the last 35 days, and a date may be at most 366 days back.",
            "default": ""
          },
          "report_date_to": {
            "title": "Reported on or before (YYYY-MM-DD)",
            "type": "string",
            "description": "The last day of the enforcement report, as YYYY-MM-DD, for example 2026-06-30. Leave empty for no end. Not with Only new recalls, which always reads up to the newest report.",
            "default": ""
          },
          "recalling_firm": {
            "title": "Recalling firm",
            "type": "string",
            "description": "Words of the recalling firm's name, for example Acme Foods; letters, digits, spaces and & . , ' - only, at most 100 characters. Leave empty for every firm.",
            "default": ""
          },
          "keyword": {
            "title": "Keyword in product or reason",
            "type": "string",
            "description": "A word or phrase searched in the product description and the reason for the recall, for example listeria or peanut; letters, digits, spaces and & . , ' - only, at most 100 characters. Leave empty for every product.",
            "default": ""
          },
          "state": {
            "title": "US state of the recalling firm (two letters)",
            "type": "string",
            "description": "Two-letter US state code of the recalling firm, for example CA; the firm's state, not where the product was sold. Leave empty for every state.",
            "default": ""
          },
          "country": {
            "title": "Country of the recalling firm",
            "type": "string",
            "description": "The recalling firm's country as the FDA writes it, for example United States, Canada or India. Leave empty for every country.",
            "default": ""
          },
          "new_since_last_run": {
            "title": "Only new recalls (daily mode)",
            "type": "boolean",
            "description": "Deliver and charge only recalls this Actor has not delivered to you before for the same product type, class, status, firm, keyword, state and country. Without a first report day, a run reads the enforcement reports of the last 35 days at least, newest first; a recall held back by Maximum results or your spending limit comes in a later run. Delivered recalls are remembered in a key-value store named openfda-recalls-scraper-state in your account.",
            "default": false
          },
          "max_items": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "How many recalls to return at most, from 1 to 10,000. The default is 10: raise it to get more; a run stops at this number. You pay per recall delivered.",
            "default": 10
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}