{
  "openapi": "3.0.1",
  "info": {
    "title": "Product Recall Radar - FDA, CPSC & USDA Recalls API",
    "description": "Know within the hour when a product you sell, stock, or insure is recalled. It monitors all US federal authorities (FDA, CPSC, USDA) and delivers unified records with a single severity scale, catalogue barcode matching, built-in change detection, and verified source delivery.",
    "version": "0.1",
    "x-build-id": "MN7Uqn8NETSTfjCz1"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/alessandrosir~product-recall-radar/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-alessandrosir-product-recall-radar",
        "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/alessandrosir~product-recall-radar/runs": {
      "post": {
        "operationId": "runs-sync-alessandrosir-product-recall-radar",
        "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/alessandrosir~product-recall-radar/run-sync": {
      "post": {
        "operationId": "run-sync-alessandrosir-product-recall-radar",
        "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": {
          "regions": {
            "title": "Regions",
            "type": "array",
            "description": "Simplest way to choose coverage. Pick a jurisdiction and every generally available source for it is queried. Overrides the advanced Sources list. Currently: US (EU coming).",
            "items": {
              "type": "string",
              "enum": [
                "US"
              ],
              "enumTitles": [
                "United States"
              ]
            },
            "default": [
              "US"
            ]
          },
          "sources": {
            "title": "Sources (advanced)",
            "type": "array",
            "description": "Fine-grained source selection. Ignored when Regions is set. Note: 'fsis' (USDA meat & poultry) requires non-datacenter egress and is therefore not part of the default US region - enable it here only when running on your own infrastructure or through a residential proxy.",
            "items": {
              "type": "string",
              "enum": [
                "openfda_food",
                "openfda_drug",
                "openfda_device",
                "cpsc",
                "fsis"
              ],
              "enumTitles": [
                "openFDA - Food enforcement",
                "openFDA - Drug enforcement",
                "openFDA - Medical device enforcement",
                "CPSC - Consumer products (US)",
                "USDA FSIS - Meat, poultry, egg products"
              ]
            },
            "default": []
          },
          "daysBack": {
            "title": "Days back",
            "minimum": 1,
            "maximum": 3650,
            "type": "integer",
            "description": "How many days of history to fetch. Ignored when incremental mode is on and a previous run exists.",
            "default": 30
          },
          "dateFrom": {
            "title": "From date (overrides Days back)",
            "type": "string",
            "description": "Optional. YYYY-MM-DD. Use for backfills or for reproducing an exact reporting window."
          },
          "dateTo": {
            "title": "To date",
            "type": "string",
            "description": "Optional. YYYY-MM-DD. Leave empty for 'up to today'."
          },
          "incremental": {
            "title": "Incremental mode (only new since last run)",
            "type": "boolean",
            "description": "Return only records that previous runs have not already delivered. Turn this ON for scheduled monitoring - it is what makes each run an alert stream rather than a repeated dump. Left OFF by default so a one-off run always returns the full window.",
            "default": false
          },
          "resetState": {
            "title": "Reset incremental memory",
            "type": "boolean",
            "description": "Clears the record of what was already delivered, so the next run returns everything in the window again. Use once after changing filters, then switch off.",
            "default": false
          },
          "keywords": {
            "title": "Keyword filter",
            "type": "array",
            "description": "Optional. Only return recalls whose text matches at least one of these terms (case-insensitive). Example: your brand names or product categories.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "classifications": {
            "title": "Severity classification filter",
            "type": "array",
            "description": "Optional. Class I is the most serious. Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "Class I",
                "Class II",
                "Class III"
              ],
              "enumTitles": [
                "Class I (most serious)",
                "Class II",
                "Class III"
              ]
            },
            "default": []
          },
          "severities": {
            "title": "Severity filter",
            "type": "array",
            "description": "Optional. Normalized severity across all sources: high, medium, low, or unknown (CPSC publishes no severity). Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "high",
                "medium",
                "low",
                "unknown"
              ],
              "enumTitles": [
                "High",
                "Medium",
                "Low",
                "Unknown (no severity published)"
              ]
            },
            "default": []
          },
          "onlyActive": {
            "title": "Only open recalls",
            "type": "boolean",
            "description": "Exclude recalls the agency has marked terminated, completed or closed. Recommended for live monitoring.",
            "default": false
          },
          "productCodes": {
            "title": "Your product codes (UPC / EAN / GTIN)",
            "type": "array",
            "description": "Optional but powerful. Paste the barcodes from your own catalogue and the Actor returns only recalls that touch those products. Matching ignores spaces, hyphens and leading zeros.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "openFdaApiKey": {
            "title": "openFDA API key (optional)",
            "type": "string",
            "description": "Free key from open.fda.gov. Without it the shared rate limit is much lower."
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Safety cap on the number of records returned per run.",
            "default": 1000
          },
          "includeRaw": {
            "title": "Include raw source payload",
            "type": "boolean",
            "description": "Adds the original untouched record under the 'raw' field. Useful for debugging, heavier output.",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}