{
  "openapi": "3.0.1",
  "info": {
    "title": "FDA Recalls API & CPSC Recalls Scraper - NHTSA Car Recalls",
    "description": "127,501 recall records from five US feeds in one 53-field schema. openFDA skip stops at 25,000; this pages by cursor and reads the whole archive. Medical device recalls, drug recalls, food recalls, CPSC consumer product recalls and NHTSA vehicle recalls, with hazard labels.",
    "version": "0.1",
    "x-build-id": "HRyEbmD1qat7fnQJU"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/snow_leo_data~product-recalls-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-snow_leo_data-product-recalls-scraper",
        "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/snow_leo_data~product-recalls-scraper/runs": {
      "post": {
        "operationId": "runs-sync-snow_leo_data-product-recalls-scraper",
        "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/snow_leo_data~product-recalls-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-snow_leo_data-product-recalls-scraper",
        "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": {
          "sources": {
            "title": "Agency feeds",
            "type": "array",
            "description": "Pick one or more. Every feed is a separate government API - competitors sell them as separate Actors.",
            "items": {
              "type": "string",
              "enum": [
                "fda_food",
                "fda_drug",
                "fda_device",
                "cpsc",
                "nhtsa"
              ],
              "enumTitles": [
                "FDA food enforcement (29,386 records)",
                "FDA drug enforcement (17,938 records)",
                "FDA medical device enforcement (39,885 records)",
                "CPSC consumer products (10,002 records)",
                "NHTSA vehicles and equipment (30,290 records)"
              ]
            },
            "default": [
              "fda_food",
              "fda_drug",
              "fda_device",
              "cpsc",
              "nhtsa"
            ]
          },
          "dateFrom": {
            "title": "Recalled on or after",
            "type": "string",
            "description": "YYYY-MM-DD. Pushed into the API query itself, so older records are never downloaded. Leave empty for the whole archive.",
            "default": ""
          },
          "dateTo": {
            "title": "Recalled on or before",
            "type": "string",
            "description": "YYYY-MM-DD. A reversed window is swapped silently.",
            "default": ""
          },
          "maxItems": {
            "title": "Maximum rows in total",
            "minimum": 0,
            "type": "integer",
            "description": "Hard stop for the whole run. 0 means no limit. With no date window, no keywords and no limit the run stops at 200 rows, so an accidental Start never bills for the whole archive.",
            "default": 0
          },
          "maxItemsPerSource": {
            "title": "Maximum rows per agency feed",
            "minimum": 0,
            "type": "integer",
            "description": "Quota for each feed. Without it the largest feed eats the whole limit and a five-agency run looks like a single-agency scrape.",
            "default": 0
          },
          "keywords": {
            "title": "Any of these words",
            "type": "array",
            "description": "Matched on whole words across title, description, reason, hazard, company, brand, model, retailer and UPC. `lead` will not match `leadership`.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "None of these words",
            "type": "array",
            "description": "Same whole-word matching, in reverse.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "company": {
            "title": "Company contains",
            "type": "string",
            "description": "Recalling firm, manufacturer or retailer, matched as a substring.",
            "default": ""
          },
          "classification": {
            "title": "FDA classification",
            "type": "array",
            "description": "Class I is the most serious: reasonable probability of serious injury or death. FDA feeds only - CPSC and NHTSA do not publish a class.",
            "items": {
              "type": "string",
              "enum": [
                "Class I",
                "Class II",
                "Class III"
              ],
              "enumTitles": [
                "Class I - serious injury or death",
                "Class II - temporary or reversible harm",
                "Class III - unlikely to cause harm"
              ]
            },
            "default": []
          },
          "status": {
            "title": "Status",
            "type": "array",
            "description": "FDA publishes Ongoing, Completed or Terminated. CPSC rows carry Announced, NHTSA rows carry Open.",
            "items": {
              "type": "string",
              "enum": [
                "Ongoing",
                "Completed",
                "Terminated",
                "Announced",
                "Open"
              ],
              "enumTitles": [
                "Ongoing (FDA)",
                "Completed (FDA)",
                "Terminated (FDA)",
                "Announced (CPSC)",
                "Open (NHTSA)"
              ]
            },
            "default": []
          },
          "categories": {
            "title": "Product category",
            "type": "array",
            "description": "Derived by this Actor from the product text, not published by the agencies. Food, drug, medical device and vehicle come straight from the feed the row arrived in.",
            "items": {
              "type": "string",
              "enum": [
                "food",
                "drug",
                "medical_device",
                "vehicle",
                "children_products",
                "toys",
                "electronics",
                "appliances",
                "furniture",
                "clothing",
                "sports_recreation",
                "tools",
                "cosmetics",
                "household",
                "other"
              ],
              "enumTitles": [
                "Food",
                "Drug",
                "Medical device",
                "Vehicle",
                "Children's products",
                "Toys",
                "Electronics",
                "Appliances",
                "Furniture",
                "Clothing",
                "Sports and recreation",
                "Tools",
                "Cosmetics",
                "Household",
                "Other"
              ]
            },
            "default": []
          },
          "hazardTags": {
            "title": "Hazard type",
            "type": "array",
            "description": "Derived by this Actor from hazard, defect and consequence text with whole-word rules. A row keeps every tag that matches.",
            "items": {
              "type": "string",
              "enum": [
                "choking",
                "strangulation",
                "suffocation",
                "entrapment",
                "fire",
                "burn",
                "electrical",
                "laceration",
                "chemical",
                "fall",
                "poisoning",
                "drowning",
                "impact",
                "crash",
                "allergen",
                "contamination",
                "mislabeling",
                "sterility",
                "battery"
              ],
              "enumTitles": [
                "Choking",
                "Strangulation",
                "Suffocation",
                "Entrapment",
                "Fire",
                "Burn or scald",
                "Electrical shock",
                "Laceration",
                "Chemical exposure",
                "Fall or tip-over",
                "Poisoning",
                "Drowning",
                "Impact or crush",
                "Crash",
                "Undeclared allergen",
                "Contamination",
                "Mislabelling",
                "Sterility",
                "Battery"
              ]
            },
            "default": []
          },
          "minSeverity": {
            "title": "Minimum severity score",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "0-100, computed by fixed rules from the agency fields: FDA class, NHTSA do-not-drive and park-outside flags, injuries and deaths mentioned, status and units affected. 75 and above is labelled Critical.",
            "default": 0
          },
          "state": {
            "title": "US state",
            "type": "string",
            "description": "Two-letter codes, comma separated. Matches the recalling firm's state or any state named in the FDA distribution pattern.",
            "default": ""
          },
          "onlyWithInjuries": {
            "title": "Only recalls with injuries reported",
            "type": "boolean",
            "description": "CPSC injury reports plus any row whose text mentions deaths. `None reported.` counts as no injuries.",
            "default": false
          },
          "onlyDoNotDrive": {
            "title": "Only NHTSA do-not-drive recalls",
            "type": "boolean",
            "description": "The rare campaigns where NHTSA tells owners to stop driving the vehicle.",
            "default": false
          },
          "onlyNew": {
            "title": "Only what changed since the last run",
            "type": "boolean",
            "description": "Remembers what it already delivered in a named key-value store and skips it next time. Each row is marked NEW or UPDATED in `change_type`.",
            "default": false
          },
          "emitUnchanged": {
            "title": "Also return unchanged recalls",
            "type": "boolean",
            "description": "Only meaningful together with the previous option. Off by default: you should not pay twice for the same row.",
            "default": false
          },
          "compactOutput": {
            "title": "Compact rows",
            "type": "boolean",
            "description": "17 key fields instead of 53. Useful for AI agents and for cheap diffing.",
            "default": false
          },
          "excludeEmptyFields": {
            "title": "Drop empty fields",
            "type": "boolean",
            "description": "Leaves out keys the agency did not publish for that row instead of returning them empty.",
            "default": false
          },
          "includeSourceRecord": {
            "title": "Attach the original agency record",
            "type": "boolean",
            "description": "Adds `source_record` with the untouched JSON exactly as the agency returned it, so nothing this Actor normalises is lost.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}