{
  "openapi": "3.0.1",
  "info": {
    "title": "USDA FSIS Recalls Scraper",
    "description": "Scrape USDA Food Safety and Inspection Service (FSIS) recall data - meat, poultry, and egg product recalls and public health alerts. Search by keyword, establishment, state, or classification; filter by recall type, reason, processing category, and date range.",
    "version": "1.0",
    "x-build-id": "UegSxnzkKzI2z8qdJ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/crawlerbros~usda-fsis-recalls-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-crawlerbros-usda-fsis-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/crawlerbros~usda-fsis-recalls-scraper/runs": {
      "post": {
        "operationId": "runs-sync-crawlerbros-usda-fsis-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/crawlerbros~usda-fsis-recalls-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-crawlerbros-usda-fsis-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": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "recent",
              "search",
              "byEstablishment",
              "byState",
              "byClassification"
            ],
            "type": "string",
            "description": "How to look up recalls.",
            "default": "recent"
          },
          "keyword": {
            "title": "Keyword",
            "type": "string",
            "description": "Search term matched against the recall title, summary, product description, and establishment name. Used in `search` mode.",
            "default": "chicken"
          },
          "establishmentName": {
            "title": "Establishment / Company Name",
            "type": "string",
            "description": "Filter recalls by the recalling establishment or company name (partial match). Required for `byEstablishment` mode."
          },
          "language": {
            "title": "Language",
            "enum": [
              "English",
              "Spanish",
              "Any"
            ],
            "type": "string",
            "description": "FSIS publishes a separate full record for the Spanish-language translation of many recalls, sharing the same recall number as the English original. Choose which language version(s) to include.",
            "default": "English"
          },
          "states": {
            "title": "States",
            "type": "array",
            "description": "Filter recalls distributed to these US states/territories, or nationwide/regional distributions. Required for `byState` mode; optional filter in other modes.",
            "items": {
              "type": "string",
              "enum": [
                "Alabama",
                "Alaska",
                "American Samoa",
                "Arizona",
                "Arkansas",
                "California",
                "Colorado",
                "Connecticut",
                "Delaware",
                "District of Columbia",
                "Florida",
                "Georgia",
                "Guam",
                "Hawaii",
                "Idaho",
                "Illinois",
                "Indiana",
                "Iowa",
                "Kansas",
                "Kentucky",
                "Louisiana",
                "Maine",
                "Maryland",
                "Massachusetts",
                "Michigan",
                "Midwest",
                "Minnesota",
                "Mississippi",
                "Missouri",
                "Montana",
                "Nationwide",
                "Nebraska",
                "Nevada",
                "New Hampshire",
                "New Jersey",
                "New Mexico",
                "New York",
                "North Carolina",
                "North Dakota",
                "Ohio",
                "Oklahoma",
                "Oregon",
                "Pennsylvania",
                "Puerto Rico",
                "Rhode Island",
                "South Carolina",
                "South Dakota",
                "Tennessee",
                "Texas",
                "Utah",
                "Vermont",
                "Virginia",
                "Washington",
                "West Virginia",
                "Wisconsin",
                "Wyoming"
              ],
              "enumTitles": [
                "Alabama",
                "Alaska",
                "American Samoa",
                "Arizona",
                "Arkansas",
                "California",
                "Colorado",
                "Connecticut",
                "Delaware",
                "District of Columbia",
                "Florida",
                "Georgia",
                "Guam",
                "Hawaii",
                "Idaho",
                "Illinois",
                "Indiana",
                "Iowa",
                "Kansas",
                "Kentucky",
                "Louisiana",
                "Maine",
                "Maryland",
                "Massachusetts",
                "Michigan",
                "Midwest (multi-state region)",
                "Minnesota",
                "Mississippi",
                "Missouri",
                "Montana",
                "Nationwide",
                "Nebraska",
                "Nevada",
                "New Hampshire",
                "New Jersey",
                "New Mexico",
                "New York",
                "North Carolina",
                "North Dakota",
                "Ohio",
                "Oklahoma",
                "Oregon",
                "Pennsylvania",
                "Puerto Rico",
                "Rhode Island",
                "South Carolina",
                "South Dakota",
                "Tennessee",
                "Texas",
                "Utah",
                "Vermont",
                "Virginia",
                "Washington",
                "West Virginia",
                "Wisconsin",
                "Wyoming"
              ]
            },
            "default": []
          },
          "classification": {
            "title": "Recall Classification",
            "enum": [
              "Class I",
              "Class II",
              "Class III",
              "Public Health Alert"
            ],
            "type": "string",
            "description": "Class I = health hazard (high risk). Class II = may cause adverse health consequences. Class III = unlikely to cause harm. Required for `byClassification` mode; optional filter otherwise."
          },
          "recallType": {
            "title": "Recall Type",
            "enum": [
              "Active Recall",
              "Closed Recall",
              "Public Health Alert"
            ],
            "type": "string",
            "description": "Filter by recall status/type."
          },
          "recallReasons": {
            "title": "Recall Reasons",
            "type": "array",
            "description": "Filter by one or more reasons for recall.",
            "items": {
              "type": "string",
              "enum": [
                "Import Violation",
                "Insanitary Conditions",
                "Misbranding",
                "Mislabeling",
                "Processing Defect",
                "Produced Without Benefit of Inspection",
                "Product Contamination",
                "Unfit for Human Consumption",
                "Unreported Allergens"
              ],
              "enumTitles": [
                "Import Violation",
                "Insanitary Conditions",
                "Misbranding",
                "Mislabeling",
                "Processing Defect",
                "Produced Without Benefit of Inspection",
                "Product Contamination",
                "Unfit for Human Consumption",
                "Unreported Allergens"
              ]
            },
            "default": []
          },
          "processingCategories": {
            "title": "Processing Categories",
            "type": "array",
            "description": "Filter by product processing category.",
            "items": {
              "type": "string",
              "enum": [
                "Eggs/Egg Products",
                "Fully Cooked - Not Shelf Stable",
                "Heat Treated - Not Fully Cooked - Not Shelf Stable",
                "Heat Treated - Shelf Stable",
                "Not Heat Treated - Shelf Stable",
                "Products with Secondary Inhibitors - Not Shelf Stable",
                "Raw - Intact",
                "Raw - Non Intact",
                "Thermally Processed - Commercially Sterile",
                "Unknown"
              ],
              "enumTitles": [
                "Eggs/Egg Products",
                "Fully Cooked - Not Shelf Stable",
                "Heat Treated - Not Fully Cooked - Not Shelf Stable",
                "Heat Treated - Shelf Stable",
                "Not Heat Treated - Shelf Stable",
                "Products with Secondary Inhibitors - Not Shelf Stable",
                "Raw - Intact",
                "Raw - Non Intact",
                "Thermally Processed - Commercially Sterile",
                "Unknown"
              ]
            },
            "default": []
          },
          "dateFrom": {
            "title": "Recall Date From (YYYY-MM-DD)",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Only include recalls announced on or after this date. Format: YYYY-MM-DD."
          },
          "dateTo": {
            "title": "Recall Date To (YYYY-MM-DD)",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Only include recalls announced on or before this date. Format: YYYY-MM-DD."
          },
          "activeOnly": {
            "title": "Active recalls only",
            "type": "boolean",
            "description": "Only include recalls currently marked active (not yet closed/archived).",
            "default": false
          },
          "outbreakRelatedOnly": {
            "title": "Outbreak-related only",
            "type": "boolean",
            "description": "Only include recalls FSIS has linked to a foodborne illness outbreak investigation.",
            "default": false
          },
          "hasSpanishOnly": {
            "title": "Has Spanish-language version only",
            "type": "boolean",
            "description": "Only include recalls that have a Spanish-language notice available.",
            "default": false
          },
          "maxItems": {
            "title": "Max Items",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Maximum number of recall records to return.",
            "default": 50
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Optional proxy configuration. FSIS is protected by Akamai bot management that blocks plain HTTP clients regardless of IP, so this actor uses browser TLS impersonation rather than relying on proxy for access; proxy is offered only for extra resilience and is not required.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}