{
  "openapi": "3.0.1",
  "info": {
    "title": "Recalls Radar — FDA, CPSC, Canada, UK & EU Safety Gate",
    "description": "Product recalls and safety alerts in one feed: US FDA (food, drugs, devices), CPSC, Health Canada, CFIA, Transport Canada, UK FSA and OPSS, EU Safety Gate. Product, brand, company, hazard, class; alerts; AI summaries.",
    "version": "0.1",
    "x-build-id": "rl0XYH7zbMjXGqXJw"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/tacps126~recalls-radar/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-tacps126-recalls-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/tacps126~recalls-radar/runs": {
      "post": {
        "operationId": "runs-sync-tacps126-recalls-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/tacps126~recalls-radar/run-sync": {
      "post": {
        "operationId": "run-sync-tacps126-recalls-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": {
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Only recalls whose title, product, brand, company or hazard contains one of these (e.g. your brands, suppliers, product types). Empty = all.",
            "items": {
              "type": "string"
            }
          },
          "categories": {
            "title": "Categories",
            "type": "array",
            "description": "Empty = all.",
            "items": {
              "type": "string",
              "enum": [
                "food",
                "drug",
                "device",
                "vehicle",
                "consumer-product",
                "cosmetic"
              ],
              "enumTitles": [
                "Food",
                "Drugs",
                "Medical devices",
                "Vehicles",
                "Consumer products",
                "Cosmetics"
              ]
            }
          },
          "countries": {
            "title": "Publishers",
            "type": "array",
            "description": "Empty = all.",
            "items": {
              "type": "string",
              "enum": [
                "US",
                "CA",
                "GB",
                "EU"
              ],
              "enumTitles": [
                "United States (FDA, CPSC)",
                "Canada (Health Canada, CFIA, Transport Canada)",
                "United Kingdom (FSA, OPSS)",
                "European Union (Safety Gate)"
              ]
            }
          },
          "postedWithinDays": {
            "title": "Within the last N days",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "Recalls published in this window.",
            "default": 30
          },
          "excludeKeywords": {
            "title": "Exclude keywords",
            "type": "array",
            "description": "Leave out recalls containing any of these.",
            "items": {
              "type": "string"
            }
          },
          "sources": {
            "title": "Sources (optional)",
            "type": "array",
            "description": "Pick specific sources instead of publishers and categories.",
            "items": {
              "type": "string",
              "enum": [
                "us-fda-food",
                "us-fda-drug",
                "us-fda-device",
                "us-cpsc",
                "us-nhtsa",
                "ca-recalls",
                "gb-fsa",
                "gb-opss",
                "eu-safety-gate"
              ],
              "enumTitles": [
                "US FDA — food recalls (enforcement reports)",
                "US FDA — drug recalls (enforcement reports)",
                "US FDA — medical device recalls (enforcement reports)",
                "US CPSC — consumer product recalls",
                "US NHTSA — vehicle and equipment recalls",
                "Canada — Health Canada, CFIA and Transport Canada recalls",
                "UK Food Standards Agency — food recalls and allergy alerts",
                "UK OPSS — product safety alerts and recalls",
                "EU Safety Gate — dangerous non-food products"
              ]
            }
          },
          "maxItemsPerSource": {
            "title": "Max per source",
            "minimum": 1,
            "type": "integer",
            "description": "Most recalls kept from each source.",
            "default": 300
          },
          "maxItems": {
            "title": "Max in total",
            "minimum": 1,
            "type": "integer",
            "description": "Most recalls returned (newest first).",
            "default": 500
          },
          "onlyNew": {
            "title": "Only new recalls",
            "type": "boolean",
            "description": "Schedule the Actor (daily or weekly) and each run returns only recalls that earlier runs with the same settings did not deliver.",
            "default": false
          },
          "monitorName": {
            "title": "Monitor name",
            "type": "string",
            "description": "Optional name for the “only new” history, so several monitors can run side by side."
          },
          "tenantId": {
            "title": "Tenant ID",
            "type": "string",
            "description": "Optional label used to keep separate histories for different clients or teams."
          },
          "aiInsights": {
            "title": "AI insights",
            "type": "boolean",
            "description": "Add an `insight` to each recall: what is affected, the risk and what to do, in plain words; with a profile, how relevant it is to you.",
            "default": false
          },
          "aiProfile": {
            "title": "Your profile (for the fit score)",
            "type": "string",
            "description": "What your business sells or makes and where, e.g. \"UK online retailer of baby products and toys, imports from China\"."
          },
          "aiLanguage": {
            "title": "Insight language",
            "type": "string",
            "description": "Insights are written in this language, whatever the source language.",
            "default": "English"
          },
          "maxInsights": {
            "title": "Max insights per run",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Insights are added to the first N recalls (newest first).",
            "default": 25
          },
          "aiProvider": {
            "title": "AI provider",
            "enum": [
              "apify",
              "anthropic",
              "openai",
              "gemini",
              "openrouter",
              "groq",
              "mistral",
              "deepseek",
              "compatible"
            ],
            "type": "string",
            "description": "Which AI does the analysis. Apify needs no key: the model runs through Apify's OpenRouter proxy and is billed to your Apify account. Any other provider uses your own key and bills you there.",
            "default": "apify"
          },
          "aiApiKey": {
            "title": "AI API key",
            "type": "string",
            "description": "Your own key for the provider above (not needed for Apify). Sent only to that provider, never stored."
          },
          "aiModel": {
            "title": "AI model",
            "type": "string",
            "description": "Model name. Apify: an OpenRouter id like anthropic/claude-sonnet-… or google/gemini-… (default: the newest Claude Haiku listed, a light model since it runs once per result). Anthropic: default claude-opus-5-5. Others: required."
          },
          "aiBaseUrl": {
            "title": "API base URL",
            "type": "string",
            "description": "Only for \"Other OpenAI-compatible API\", e.g. http://localhost:11434/v1 for Ollama."
          },
          "debug": {
            "title": "Debug",
            "type": "boolean",
            "description": "Save extra diagnostics with the run (for support requests).",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}