{
  "openapi": "3.0.1",
  "info": {
    "title": "Product Recall Feed — FDA, NHTSA & CPSC Recalls API",
    "description": "US recalls from FDA, NHTSA and CPSC, plus opt-in Canada, UK and EU Safety Gate, as one normalized JSON record with jurisdiction and hazard categories. Filter by date, keyword, firm or vehicle; get only new recalls since the last run by webhook. Pay per recall record.",
    "version": "0.2",
    "x-build-id": "zTeQKvDGNx7WpR2ut"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/owlabee~product-recall-feed/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-owlabee-product-recall-feed",
        "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/owlabee~product-recall-feed/runs": {
      "post": {
        "operationId": "runs-sync-owlabee-product-recall-feed",
        "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/owlabee~product-recall-feed/run-sync": {
      "post": {
        "operationId": "run-sync-owlabee-product-recall-feed",
        "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": {
          "agencies": {
            "title": "Agencies",
            "uniqueItems": true,
            "type": "array",
            "description": "Recall feeds to query. The default five are the US federal feeds: FDA drug, device and food enforcement reports (openFDA), NHTSA vehicle and equipment recall campaigns, and CPSC consumer product recalls; the prefilled value queries all five and is the cheap example used by Apify's daily automated test. The other feeds run only when you pick them here or choose their jurisdiction below: the openFDA device recall database (root cause and corrective action), FDA recall press releases (RSS), Health Canada (all Canadian recalls incl. CFIA food and Transport Canada), UK OPSS product safety, UK MHRA drug and device alerts, UK FSA food alerts, and the EU Safety Gate.",
            "items": {
              "type": "string",
              "enum": [
                "fda-drug",
                "fda-device",
                "fda-food",
                "nhtsa",
                "cpsc",
                "fda-device-recall",
                "fda-rss",
                "health-canada",
                "uk-opss",
                "uk-mhra",
                "uk-fsa",
                "eu-safety-gate"
              ],
              "enumTitles": [
                "FDA drugs",
                "FDA medical devices",
                "FDA food & cosmetics",
                "NHTSA vehicles & equipment",
                "CPSC consumer products",
                "FDA device recall database (root cause)",
                "FDA recall press releases (RSS)",
                "Health Canada (incl. CFIA, Transport Canada)",
                "UK OPSS product safety",
                "UK MHRA drug & device alerts",
                "UK FSA food alerts",
                "EU Safety Gate (EU/EEA)"
              ]
            },
            "default": [
              "fda-drug",
              "fda-device",
              "fda-food",
              "nhtsa",
              "cpsc"
            ]
          },
          "jurisdictions": {
            "title": "Jurisdictions (optional)",
            "uniqueItems": true,
            "type": "array",
            "description": "Add every feed of a jurisdiction: US (the five default feeds plus the FDA device recall database and FDA press releases), CA (Health Canada), GB (OPSS, MHRA, FSA) or EU (Safety Gate). Combined with Agencies; leave Agencies empty to query only the chosen jurisdictions.",
            "items": {
              "type": "string",
              "enum": [
                "US",
                "CA",
                "GB",
                "EU"
              ],
              "enumTitles": [
                "United States",
                "Canada",
                "United Kingdom",
                "European Union / EEA"
              ]
            }
          },
          "daysBack": {
            "title": "Recalls from the last N days",
            "minimum": 1,
            "maximum": 3650,
            "type": "integer",
            "description": "Date window ending today (or on Date to). Ignored when Date from is set. FDA publishes enforcement reports weekly, so keep at least 14 days for FDA.",
            "default": 30
          },
          "dateFrom": {
            "title": "Date from (optional)",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2})?$",
            "type": "string",
            "description": "Start of the window, YYYY-MM-DD (inclusive). Overrides Recalls from the last N days."
          },
          "dateTo": {
            "title": "Date to (optional)",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2})?$",
            "type": "string",
            "description": "End of the window, YYYY-MM-DD (inclusive). Default today."
          },
          "keyword": {
            "title": "Keyword (optional)",
            "type": "string",
            "description": "Keep recalls whose product, description or hazard mentions this text, e.g. \"salmonella\", \"airbag\", \"lithium battery\". Searched by the FDA, NHTSA and GOV.UK APIs, matched locally for the other feeds."
          },
          "firm": {
            "title": "Firm or manufacturer (optional)",
            "type": "string",
            "description": "Keep recalls whose recalling firm, manufacturer, importer or distributor contains this text, e.g. \"Ford\" or \"Teva\"."
          },
          "productType": {
            "title": "Product type (optional)",
            "type": "string",
            "description": "NHTSA: recall type or component (\"Tire\", \"Child Seat\", \"Air Bags\"). CPSC: product category (\"Coffee Makers\", \"Bicycles\"). Other non-FDA feeds: the agency's own category (Health Canada \"Toys and games\", Safety Gate \"Cosmetics\"). Ignored for FDA (each FDA feed is already one product type)."
          },
          "state": {
            "title": "Firm state (optional, FDA only)",
            "pattern": "^([A-Za-z]{2})?$",
            "type": "string",
            "description": "Two-letter US state of the recalling firm, e.g. \"CA\". Applies to the FDA enforcement and device recall feeds; the other agencies do not publish it."
          },
          "fdaClassifications": {
            "title": "FDA classifications (optional)",
            "uniqueItems": true,
            "type": "array",
            "description": "Keep only these FDA recall classes (FDA enforcement feeds). Class I is the most serious (reasonable probability of serious harm or death). The FDA device recall database and press releases publish no class and ignore this filter.",
            "items": {
              "type": "string",
              "enum": [
                "Class I",
                "Class II",
                "Class III"
              ]
            }
          },
          "vehicles": {
            "title": "Vehicles (optional, NHTSA)",
            "type": "array",
            "description": "Look up every recall for specific vehicles, one per line as \"make, model, year\" (e.g. \"Honda, Accord, 2020\"). Each lookup returns all recalls on that vehicle, whatever the date window and filters.",
            "items": {
              "type": "string"
            }
          },
          "maxResultsPerSource": {
            "title": "Max recalls per source",
            "minimum": 1,
            "maximum": 25000,
            "type": "integer",
            "description": "Upper bound on recalls written per agency feed, newest first (in changes mode: new recalls). Use it together with the run's maximum cost to control spend.",
            "default": 200
          },
          "maxSecondsPerSource": {
            "title": "Time budget per source",
            "minimum": 30,
            "maximum": 1800,
            "type": "integer",
            "description": "Wall time one agency feed may take (Health Canada's 15.9 MB daily file typically downloads and parses in a few seconds). A source is also abandoned, with a charged error item, after 60 seconds without a successful response.",
            "default": 300
          },
          "onlyNewSinceLastRun": {
            "title": "Only new recalls since last run",
            "type": "boolean",
            "description": "Changes mode for monitoring: emit only recalls not seen in earlier runs (flagged isNew). The first run is a baseline that emits and charges every recall in the window. Schedule it daily with a webhook for alerts.",
            "default": false
          },
          "stateStoreName": {
            "title": "State store name",
            "type": "string",
            "description": "Named key-value store that remembers which recalls were already seen (per agency feed, up to 50,000 each). Use one store per schedule when different filters run side by side.",
            "default": "product-recall-feed-state"
          },
          "notifyOnlyOnNew": {
            "title": "Webhook only when there are recalls",
            "type": "boolean",
            "description": "Skip the webhook call when the run emitted no recalls (the usual quiet day in changes mode).",
            "default": true
          },
          "includeRaw": {
            "title": "Include raw agency fields",
            "type": "boolean",
            "description": "Attach every field the agency published as a nested raw object (FDA openfda codes, CPSC images and UPCs, NHTSA flags, Safety Gate fields).",
            "default": false
          },
          "fdaApiKey": {
            "title": "openFDA API key (optional)",
            "type": "string",
            "description": "Free key from open.fda.gov; only raises openFDA's rate limits (240 requests per minute and 1,000 per day per IP without one)."
          },
          "webhookUrl": {
            "title": "Webhook URL (optional)",
            "pattern": "^(https?://.+)?$",
            "type": "string",
            "description": "POST target for a JSON alert at the end of the run: the run summary with counts per agency and severity plus the emitted recalls (max 1,000). Failures are logged, never fatal."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}