{
  "openapi": "3.0.1",
  "info": {
    "title": "FDA Food Recall Monitor",
    "description": "Search, export, and monitor official openFDA Food Enforcement recalls. Filter by product, firm, class, status, location, or date, and track new or updated recalls.",
    "version": "0.0",
    "x-build-id": "6Cp4U7xlKR2zVpBV0"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/maximedupre~fda-food-recalls-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-maximedupre-fda-food-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/maximedupre~fda-food-recalls-scraper/runs": {
      "post": {
        "operationId": "runs-sync-maximedupre-fda-food-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/maximedupre~fda-food-recalls-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-maximedupre-fda-food-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",
        "required": [
          "target"
        ],
        "properties": {
          "target": {
            "title": "Target",
            "enum": [
              "search",
              "recallNumber",
              "eventId",
              "completeFeed",
              "changes"
            ],
            "type": "string",
            "description": "Choose the FDA Food Enforcement records this run should return. Options in sections for other Targets are ignored."
          },
          "query": {
            "title": "Product or reason keywords",
            "type": "string",
            "description": "Find recalls whose product description or recall reason contains these words."
          },
          "recallNumber": {
            "title": "FDA recall number",
            "minLength": 1,
            "type": "string",
            "description": "Return the enforcement action with this exact FDA recall number, for example F-1234-2025."
          },
          "eventId": {
            "title": "FDA event identifier",
            "pattern": "^[0-9]+$",
            "type": "string",
            "description": "Return recalls belonging to this exact FDA event identifier, for example 98765."
          },
          "monitorKey": {
            "title": "Monitoring key",
            "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{0,99}$",
            "type": "string",
            "description": "Stable name for this change feed's history. Reuse it in scheduled runs to emit only new or changed recalls; use a different key for each independently monitored search."
          },
          "recallingFirm": {
            "title": "Recalling firm",
            "type": "string",
            "description": "Keep records for this recalling firm."
          },
          "classifications": {
            "title": "Classifications",
            "uniqueItems": true,
            "type": "array",
            "description": "Keep recalls in one or more FDA health-hazard classes.",
            "items": {
              "type": "string",
              "enum": [
                "Class I",
                "Class II",
                "Class III"
              ],
              "enumTitles": [
                "Class I",
                "Class II",
                "Class III"
              ]
            }
          },
          "statuses": {
            "title": "Statuses",
            "uniqueItems": true,
            "type": "array",
            "description": "Keep recalls in one or more FDA recall statuses.",
            "items": {
              "type": "string",
              "enum": [
                "Ongoing",
                "Completed",
                "Terminated",
                "Pending"
              ],
              "enumTitles": [
                "Ongoing",
                "Completed",
                "Terminated",
                "Pending"
              ]
            }
          },
          "states": {
            "title": "States",
            "uniqueItems": true,
            "type": "array",
            "description": "Keep recalls whose recalling-firm address matches any listed US state or territory abbreviation, for example CA or PR.",
            "items": {
              "type": "string",
              "pattern": "^[A-Za-z]{2}$"
            }
          },
          "countries": {
            "title": "Countries",
            "uniqueItems": true,
            "type": "array",
            "description": "Keep recalls whose recalling-firm address matches any listed country name, for example United States or Canada.",
            "items": {
              "type": "string",
              "minLength": 2
            }
          },
          "reportDateFrom": {
            "title": "Reported from",
            "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$",
            "type": "string",
            "description": "Keep recalls reported on or after this calendar date (YYYY-MM-DD)."
          },
          "reportDateTo": {
            "title": "Reported through",
            "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$",
            "type": "string",
            "description": "Keep recalls reported on or before this calendar date (YYYY-MM-DD)."
          },
          "initiationDateFrom": {
            "title": "Initiated from",
            "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$",
            "type": "string",
            "description": "Keep recalls initiated on or after this calendar date (YYYY-MM-DD)."
          },
          "initiationDateTo": {
            "title": "Initiated through",
            "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$",
            "type": "string",
            "description": "Keep recalls initiated on or before this calendar date (YYYY-MM-DD)."
          },
          "advancedSearch": {
            "title": "Advanced openFDA expression",
            "type": "string",
            "description": "Add an openFDA Food Enforcement search expression when the structured filters are insufficient, for example `distribution_pattern:\"Nationwide\"`. It is combined with the fields above."
          },
          "sort": {
            "title": "Order",
            "enum": [
              "reportDateDesc",
              "reportDateAsc",
              "initiationDateDesc",
              "initiationDateAsc",
              "classificationDateDesc",
              "classificationDateAsc"
            ],
            "type": "string",
            "description": "Choose the source date and direction used to order records. Recall changes are classified before this display order is applied."
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum number of matching records to save for search, complete-feed, or changes runs. Increase it for larger exports, up to 100,000."
          },
          "openFdaApiKey": {
            "title": "openFDA API key",
            "type": "string",
            "description": "Optional customer-supplied openFDA key for higher source rate limits. Public recall data does not require a key."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}