{
  "openapi": "3.0.1",
  "info": {
    "title": "Food Recall & Allergy Alerts: US, UK, Canada, Australia",
    "description": "Official food recall and allergy alert notices from the US FDA, the UK FSA, Canada's CFIA and Australia's FSANZ in one schema, one row per recall.",
    "version": "0.2",
    "x-build-id": "SdRZyObiaTsL73kLV"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/saffo~food-recall-allergy-alerts/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-saffo-food-recall-allergy-alerts",
        "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/saffo~food-recall-allergy-alerts/runs": {
      "post": {
        "operationId": "runs-sync-saffo-food-recall-allergy-alerts",
        "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/saffo~food-recall-allergy-alerts/run-sync": {
      "post": {
        "operationId": "run-sync-saffo-food-recall-allergy-alerts",
        "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": {
          "sources": {
            "title": "Agencies",
            "minItems": 1,
            "type": "array",
            "description": "Agencies to read, at least one. Allowed values: us-fda (US Food and Drug Administration), uk-fsa (UK Food Standards Agency), ca-cfia (Canadian Food Inspection Agency), au-fsanz (Food Standards Australia New Zealand, Australian recalls).",
            "items": {
              "type": "string",
              "enum": [
                "us-fda",
                "uk-fsa",
                "ca-cfia",
                "au-fsanz"
              ],
              "enumTitles": [
                "US Food and Drug Administration (FDA)",
                "UK Food Standards Agency (FSA)",
                "Canadian Food Inspection Agency (CFIA)",
                "Food Standards Australia New Zealand (FSANZ)"
              ]
            },
            "default": [
              "us-fda",
              "uk-fsa",
              "ca-cfia",
              "au-fsanz"
            ]
          },
          "daysBack": {
            "title": "Days back",
            "minimum": 1,
            "maximum": 1825,
            "type": "integer",
            "description": "Look-back window in days (1 to 1825). A notice is kept when its publishedDate, or its updatedDate when the source gives no published date, is on or after today minus daysBack (UTC).",
            "default": 30
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Optional. Keep a notice when any keyword appears (case-insensitive substring) in its title, company, brands, product names, product codes, hazard or summary. Works for brands, products, pathogens and barcodes.",
            "items": {
              "type": "string"
            }
          },
          "allergens": {
            "title": "Allergens",
            "type": "array",
            "description": "Optional. Keep a notice when its allergens list contains any of these values. Allowed values: milk, egg, peanut, tree-nuts, soy, wheat, gluten, sesame, mustard, sulphites, fish, crustaceans, molluscs, celery, lupin.",
            "items": {
              "type": "string",
              "enum": [
                "milk",
                "egg",
                "peanut",
                "tree-nuts",
                "soy",
                "wheat",
                "gluten",
                "sesame",
                "mustard",
                "sulphites",
                "fish",
                "crustaceans",
                "molluscs",
                "celery",
                "lupin"
              ]
            }
          },
          "hazardTypes": {
            "title": "Hazard types",
            "type": "array",
            "description": "Optional. Keep a notice when its hazardType is one of these. Allowed values: allergen, microbiological, foreign-matter, chemical, labelling, quality, other.",
            "items": {
              "type": "string",
              "enum": [
                "allergen",
                "microbiological",
                "foreign-matter",
                "chemical",
                "labelling",
                "quality",
                "other"
              ]
            }
          },
          "onlyNew": {
            "title": "Only new notices",
            "type": "boolean",
            "description": "For scheduled runs: skip notices (by id) that an earlier run with onlyNew already saved; the memory lives in a named key-value store of the user's account, so a notice is never charged twice.",
            "default": false
          },
          "maxItems": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Stop after this many notices in total (1 to 10000), newest first across all selected sources. You pay per notice saved.",
            "default": 200
          },
          "openFdaApiKey": {
            "title": "openFDA API key",
            "type": "string",
            "description": "Optional free openFDA API key of the user, stored as a secret input. Without it openFDA allows about 1,000 requests a day per IP; with it the US source keeps working on busy shared IPs."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}