{
  "openapi": "3.0.1",
  "info": {
    "title": "⚠️ Product Recall Monitor - FDA & CPSC Safety Alerts",
    "description": "⚡ Get alerted the day a product you sell, stock or compete with is recalled. ✅ Official US feeds: FDA food, drug and device enforcement plus CPSC consumer products. ✅ Filter by brand, keyword or FDA class. Each recall is announced exactly once.",
    "version": "1.0",
    "x-build-id": "a6zJRf9B1aeZEw7DC"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/that_red_bird~product-recall-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-that_red_bird-product-recall-monitor",
        "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/that_red_bird~product-recall-monitor/runs": {
      "post": {
        "operationId": "runs-sync-that_red_bird-product-recall-monitor",
        "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/that_red_bird~product-recall-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-that_red_bird-product-recall-monitor",
        "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": [
          "sources"
        ],
        "properties": {
          "sources": {
            "title": "Recall sources",
            "type": "array",
            "description": "Which official feeds to watch: food, drug, device (all US FDA) and cpsc (US Consumer Product Safety Commission).",
            "default": [
              "food",
              "drug",
              "device",
              "cpsc"
            ],
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "Only recalls matching",
            "type": "array",
            "description": "Case-insensitive match on product description, reason, hazard and product names — e.g. peanut, lithium, listeria.",
            "items": {
              "type": "string"
            }
          },
          "companies": {
            "title": "Only these companies",
            "type": "array",
            "description": "Partial, case-insensitive match on the recalling firm or manufacturer.",
            "items": {
              "type": "string"
            }
          },
          "classifications": {
            "title": "FDA classifications",
            "type": "array",
            "description": "Filter FDA recalls by class, e.g. \"Class I\" (most serious), \"Class II\", \"Class III\".",
            "items": {
              "type": "string"
            }
          },
          "since": {
            "title": "Only recalls after",
            "type": "string",
            "description": "ISO date, e.g. 2026-01-01. Strongly recommended on the first run to keep the baseline small."
          },
          "limitPerSource": {
            "title": "Max recalls fetched per source",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Upper bound per feed per run.",
            "default": 100
          },
          "onlyNew": {
            "title": "Only report recalls never seen before",
            "type": "boolean",
            "description": "Keeps a ledger of announced recall ids so nothing is reported twice. The first run records a baseline silently instead of announcing history.",
            "default": true
          },
          "resetBaseline": {
            "title": "Reset baseline",
            "type": "boolean",
            "description": "Clear the seen-recall ledger and start fresh.",
            "default": false
          },
          "baselineSampleSize": {
            "title": "Baseline sample size",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "On the first run (no ledger yet), how many of the currently-matching recalls to include as a labelled sample (isBaseline: true) alongside the summary row, so the dataset is never empty.",
            "default": 10
          },
          "maxItems": {
            "title": "Max output rows",
            "minimum": 0,
            "type": "integer",
            "description": "Hard cap on dataset rows per run. 0 = no cap.",
            "default": 0
          },
          "fdaApiKey": {
            "title": "openFDA API key (optional)",
            "type": "string",
            "description": "Raises openFDA rate limits. Not required for normal use."
          },
          "webhookUrl": {
            "title": "Webhook URL",
            "type": "string",
            "description": "POSTed when new recalls are found. Slack/Discord/Zapier compatible."
          },
          "stateStoreName": {
            "title": "State store name",
            "type": "string",
            "description": "Named key-value store holding the seen-recall ledger.",
            "default": "product-recall-monitor-state"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}