{
  "openapi": "3.0.1",
  "info": {
    "title": "openFDA Food Recall & Enforcement Scraper (USA)",
    "description": "Scrape FDA food recall and enforcement actions from the official openFDA API. Extract recall number, hazard class, product description, reason, recalling firm, city, state and dates across the United States. Export to JSON, CSV or Excel.",
    "version": "0.1",
    "x-build-id": "C3gg0AdCIzW5ejFfu"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapers_lat~openfda-food-recalls-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapers_lat-openfda-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/scrapers_lat~openfda-food-recalls-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapers_lat-openfda-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/scrapers_lat~openfda-food-recalls-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapers_lat-openfda-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",
        "properties": {
          "maxRecalls": {
            "title": "Max Recalls",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Maximum number of food recall records to collect. Optional. openFDA paginates with skip up to 25000, so for very large pulls narrow the filters or date range."
          },
          "searchQuery": {
            "title": "Search Query",
            "type": "string",
            "description": "A simple keyword (matched to the recall reason, for example listeria, salmonella, undeclared allergen), or a raw openFDA search expression containing a field, for example product_description:cheese or recalling_firm:Tyson. Leave empty to pull the most recent food recalls."
          },
          "classification": {
            "title": "Classification",
            "enum": [
              "",
              "Class I",
              "Class II",
              "Class III"
            ],
            "type": "string",
            "description": "Recall hazard class. Class I is the most serious (reasonable probability of serious health consequences or death).",
            "default": ""
          },
          "status": {
            "title": "Status",
            "enum": [
              "",
              "Ongoing",
              "Completed",
              "Terminated",
              "Pending"
            ],
            "type": "string",
            "description": "Recall status.",
            "default": ""
          },
          "state": {
            "title": "State",
            "enum": [
              "",
              "AL",
              "AK",
              "AZ",
              "AR",
              "CA",
              "CO",
              "CT",
              "DE",
              "DC",
              "FL",
              "GA",
              "HI",
              "ID",
              "IL",
              "IN",
              "IA",
              "KS",
              "KY",
              "LA",
              "ME",
              "MD",
              "MA",
              "MI",
              "MN",
              "MS",
              "MO",
              "MT",
              "NE",
              "NV",
              "NH",
              "NJ",
              "NM",
              "NY",
              "NC",
              "ND",
              "OH",
              "OK",
              "OR",
              "PA",
              "RI",
              "SC",
              "SD",
              "TN",
              "TX",
              "UT",
              "VT",
              "VA",
              "WA",
              "WV",
              "WI",
              "WY",
              "PR"
            ],
            "type": "string",
            "description": "Two-letter US state code of the recalling firm, for example CA, NY, TX.",
            "default": ""
          },
          "recallingFirm": {
            "title": "Recalling Firm",
            "type": "string",
            "description": "Filter by the recalling firm or manufacturer name, for example Tyson, Dole, Nestle. Matches firms whose name contains this phrase."
          },
          "productDescription": {
            "title": "Product Keyword",
            "type": "string",
            "description": "Filter by a word or phrase in the product description, for example cheese, spinach, ice cream, peanut butter."
          },
          "city": {
            "title": "City",
            "type": "string",
            "description": "Filter by the city of the recalling firm, for example Los Angeles, Chicago."
          },
          "country": {
            "title": "Country",
            "type": "string",
            "description": "Filter by the recalling firm country, for example United States, Canada, Mexico. Leave empty for all countries."
          },
          "voluntaryMandated": {
            "title": "Voluntary or Mandated",
            "enum": [
              "",
              "Voluntary",
              "Mandated"
            ],
            "type": "string",
            "description": "Whether the recall was firm-initiated (voluntary) or ordered by the FDA (mandated).",
            "default": ""
          },
          "dateFrom": {
            "title": "Date From",
            "type": "string",
            "description": "Only include recalls with a date on or after this date (YYYY-MM-DD). Applies to the Date Field selected below."
          },
          "dateTo": {
            "title": "Date To",
            "type": "string",
            "description": "Only include recalls with a date on or before this date (YYYY-MM-DD). Applies to the Date Field selected below."
          },
          "dateField": {
            "title": "Date Field",
            "enum": [
              "report_date",
              "recall_initiation_date",
              "center_classification_date",
              "termination_date"
            ],
            "type": "string",
            "description": "Which recall date the Date From / Date To range applies to.",
            "default": "report_date"
          },
          "sortOrder": {
            "title": "Sort Order",
            "enum": [
              "",
              "Newest first",
              "Oldest first"
            ],
            "type": "string",
            "description": "Order results by the selected Date Field. Leave as default to use the openFDA relevance order.",
            "default": ""
          },
          "recallNumber": {
            "title": "Recall Number",
            "type": "string",
            "description": "Look up one exact FDA recall number, for example F-0609-2015."
          },
          "eventId": {
            "title": "Event ID",
            "type": "string",
            "description": "Pull every recall that belongs to one FDA recall event, for example 69516. A single event often groups many related product recalls."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}