{
  "openapi": "3.0.1",
  "info": {
    "title": "FDA Food Recall Monitor & Watchlist Alerts",
    "description": "Monitor official FDA food recalls against product, supplier, brand, classification, state, and distribution watchlists. Pay only for new matches or material source corrections, not every raw record.",
    "version": "0.1",
    "x-build-id": "ffgYOe3u9dPKhEIb9"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/frankycheese~fda-recall-match-delta/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-frankycheese-fda-recall-match-delta",
        "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/frankycheese~fda-recall-match-delta/runs": {
      "post": {
        "operationId": "runs-sync-frankycheese-fda-recall-match-delta",
        "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/frankycheese~fda-recall-match-delta/run-sync": {
      "post": {
        "operationId": "run-sync-frankycheese-fda-recall-match-delta",
        "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": [
          "watchlistId"
        ],
        "properties": {
          "watchlistId": {
            "title": "Watchlist ID",
            "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{2,63}$",
            "type": "string",
            "description": "Stable 3-64 character ID for this watchlist.",
            "default": "my-food-watchlist"
          },
          "keywords": {
            "title": "Product or hazard keywords",
            "maxItems": 50,
            "type": "array",
            "description": "Literal phrases matched against product, reason, and lot/code text.",
            "items": {
              "type": "string"
            },
            "default": [
              "undeclared allergen"
            ]
          },
          "firms": {
            "title": "Recalling firms",
            "maxItems": 50,
            "type": "array",
            "description": "Normalized exact or phrase matches against the recalling firm.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "brands": {
            "title": "Brands",
            "maxItems": 50,
            "type": "array",
            "description": "Literal phrases matched in the FDA product description.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "states": {
            "title": "US distribution states",
            "maxItems": 50,
            "type": "array",
            "description": "Two-letter US abbreviations matched against firm state and distribution text.",
            "items": {
              "type": "string",
              "pattern": "^[A-Za-z]{2}$"
            },
            "default": []
          },
          "distributionTerms": {
            "title": "Distribution terms",
            "maxItems": 50,
            "type": "array",
            "description": "Phrases such as nationwide, online, or a channel name.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "classifications": {
            "title": "FDA classifications",
            "maxItems": 3,
            "type": "array",
            "description": "Optional exact filter. Examples: Class I, Class II, Class III.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "lookbackDays": {
            "title": "Lookback days",
            "minimum": 1,
            "maximum": 90,
            "type": "integer",
            "description": "Rolling report-date window. FDA says enforcement data is generally updated weekly.",
            "default": 14
          },
          "baselineMode": {
            "title": "First-run behavior",
            "enum": [
              "emit_matches",
              "silent"
            ],
            "type": "string",
            "description": "Emit current matches for immediate value, or silently establish a baseline.",
            "default": "emit_matches"
          },
          "maxEvents": {
            "title": "Maximum paid events",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Hard cap on paid signals delivered in one run.",
            "default": 100
          },
          "maxTotalChargeUsd": {
            "title": "Maximum event charge (USD)",
            "minimum": 0.2,
            "maximum": 100,
            "type": "number",
            "description": "Hard ceiling derived before any charge. New match $0.20; source correction $0.05.",
            "default": 20
          },
          "maxSourceRecords": {
            "title": "Maximum FDA records fetched",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Bound the official API response to at most 1,000 records.",
            "default": 1000
          },
          "stateStoreName": {
            "title": "Named state store",
            "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{2,62}$",
            "minLength": 3,
            "maxLength": 63,
            "type": "string",
            "description": "Reuse this name on scheduled runs for replay suppression.",
            "default": "fda-recall-match-delta-state"
          },
          "resetState": {
            "title": "Reset state",
            "type": "boolean",
            "description": "Deliberately discard this watchlist configuration's baseline.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}