{
  "openapi": "3.0.1",
  "info": {
    "title": "US Recalls Scraper",
    "description": "US Recalls Scraper is a Python tool designed to extract public product safety recall data across major U.S. government agencies (FDA, CPSC, USDA, NHTSA). It exports hazard details, affected products, and dates into structured CSV or JSON formats for compliance and safety research.",
    "version": "0.0",
    "x-build-id": "B4quM5jqDP2MYfsyx"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/zerobreak~US-Recalls-Scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-zerobreak-US-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/zerobreak~US-Recalls-Scraper/runs": {
      "post": {
        "operationId": "runs-sync-zerobreak-US-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/zerobreak~US-Recalls-Scraper/run-sync": {
      "post": {
        "operationId": "run-sync-zerobreak-US-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",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Source",
            "enum": [
              "all",
              "fda",
              "cpsc",
              "vehicle",
              "vin"
            ],
            "type": "string",
            "description": "Which public source to query. All runs FDA and CPSC for the date range. Vehicle and VIN modes use NHTSA and vPIC.",
            "default": "all"
          },
          "fdaCategories": {
            "title": "FDA categories",
            "type": "array",
            "description": "openFDA enforcement datasets to search in FDA and All modes. Food, drug, and device are separate APIs.",
            "items": {
              "type": "string",
              "enum": [
                "food",
                "drug",
                "device"
              ]
            },
            "default": [
              "food",
              "drug",
              "device"
            ]
          },
          "keyword": {
            "title": "Keyword",
            "type": "string",
            "description": "Matched in FDA product_description/reason_for_recall and CPSC title/description (CPSC filtered client-side)."
          },
          "recallingFirm": {
            "title": "Company / recalling firm",
            "type": "string",
            "description": "FDA recalling firm name. Sent to openFDA as a quoted recalling_firm search. Leave empty to skip."
          },
          "fdaClassification": {
            "title": "FDA classification",
            "enum": [
              "any",
              "Class I",
              "Class II",
              "Class III"
            ],
            "type": "string",
            "description": "FDA recall class. Class I is the most serious. Any leaves the classification filter off.",
            "default": "any"
          },
          "dateFrom": {
            "title": "Report date from",
            "type": "string",
            "description": "Default: 30 days ago. FDA filters report_date. CPSC uses this as RecallDateStart and drops newer rows past dateTo locally."
          },
          "dateTo": {
            "title": "Report date to",
            "type": "string",
            "description": "Last report date to include. Defaults to today (UTC). FDA includes this day. CPSC rows after this date are dropped locally."
          },
          "vehicles": {
            "title": "Vehicles",
            "type": "array",
            "description": "List of {\"make\":\"honda\",\"model\":\"accord\",\"modelYear\":2020}. Used in Vehicle mode."
          },
          "campaignNumbers": {
            "title": "NHTSA campaign numbers",
            "type": "array",
            "description": "NHTSA campaign numbers, one per line, such as 20V314000. Used in Vehicle mode. One campaign can return several make/model/year rows.",
            "items": {
              "type": "string"
            }
          },
          "vins": {
            "title": "VINs",
            "type": "array",
            "description": "17-character vehicle identification numbers, one per line. Used in VIN mode. Each VIN is decoded with NHTSA vPIC.",
            "items": {
              "type": "string"
            }
          },
          "vinCheckRecalls": {
            "title": "Also list recalls for each VIN's make/model/year",
            "type": "boolean",
            "description": "After a VIN decodes, look up NHTSA recalls for that make, model, and model year.",
            "default": true
          },
          "maxItems": {
            "title": "Max results (total)",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Free version cap: 5,000 per run. Counts recall rows and VIN decode rows. Error rows are extra.",
            "default": 200
          },
          "includeRaw": {
            "title": "Include raw source record",
            "type": "boolean",
            "description": "Store the source API object on each recall row in raw. Leave off to keep the dataset small.",
            "default": false
          },
          "openFdaApiKey": {
            "title": "openFDA API key (optional)",
            "type": "string",
            "description": "Raises openFDA limits; free at open.fda.gov. Without a key the run stays at or under 1,000 openFDA requests and waits at least 0.3 seconds between them."
          },
          "timeoutSecs": {
            "title": "Timeout (seconds)",
            "minimum": 30,
            "maximum": 3600,
            "type": "integer",
            "description": "Stop the run after this many seconds and keep rows already collected. Default 300. Maximum 3600.",
            "default": 300
          },
          "requestTimeoutSecs": {
            "title": "Request timeout (seconds)",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "Per-request timeout for openFDA, NHTSA, and vPIC. CPSC uses at least 90 seconds because that API is slow.",
            "default": 30
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional proxy for requests. Default is no proxy. These government APIs are public. Turn on Apify Proxy only if a source blocks the run IP.",
            "default": {
              "useApifyProxy": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}