{
  "openapi": "3.0.1",
  "info": {
    "title": "Product Recall Monitor (CPSC, NHTSA, FDA, EU)",
    "description": "Search consumer product, vehicle, food, drug and device recalls from CPSC, NHTSA, FDA and EU Safety Gate open data, check VINs, and watch brands for new recalls.",
    "version": "0.1",
    "x-build-id": "OE9qowKsPaKtTjbg2"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/jetlaunch~product-recall-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-jetlaunch-product-recall-monitor",
        "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/jetlaunch~product-recall-monitor/runs": {
      "post": {
        "operationId": "runs-sync-jetlaunch-product-recall-monitor",
        "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/jetlaunch~product-recall-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-jetlaunch-product-recall-monitor",
        "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": {
          "mode": {
            "title": "Mode",
            "enum": [
              "recall-search",
              "vin-check",
              "watchlist"
            ],
            "type": "string",
            "description": "recall-search finds recalls by keyword, brand, category and date. vin-check decodes VINs and lists NHTSA recall campaigns for each vehicle. watchlist returns only recalls it has not returned before for your brand or keyword list.",
            "default": "recall-search"
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Recall search: words or phrases to find in the product name, title, hazard or description. A recall matches if it contains any of them. Leave empty to browse by date.",
            "items": {
              "type": "string"
            }
          },
          "brands": {
            "title": "Brands or companies",
            "type": "array",
            "description": "Recall search: brand or company names to look for. If you also give keywords, a recall must match both a keyword and a brand.",
            "items": {
              "type": "string"
            }
          },
          "productCategory": {
            "title": "Product category",
            "type": "string",
            "description": "Optional category text. CPSC: matched against the CPSC product type (for example toys). EU Safety Gate: matched against the alert category (for example Toys). FDA: matched against the product description."
          },
          "agencies": {
            "title": "Agencies",
            "type": "array",
            "description": "Which sources to search. NHTSA has no free-text search, so it also needs a vehicle make and model year or a campaign number (see below).",
            "items": {
              "type": "string",
              "enum": [
                "cpsc",
                "nhtsa",
                "fda",
                "eu_safety_gate"
              ],
              "enumTitles": [
                "CPSC (US consumer products)",
                "NHTSA (US vehicles)",
                "FDA (US food, drugs, devices)",
                "EU Safety Gate (non-food products)"
              ]
            },
            "default": [
              "cpsc",
              "fda",
              "eu_safety_gate"
            ]
          },
          "daysBack": {
            "title": "Days back",
            "minimum": 1,
            "maximum": 3650,
            "type": "integer",
            "description": "Search recalls dated within this many days before the end date. Ignored when Date from is set.",
            "default": 365
          },
          "dateFrom": {
            "title": "Date from",
            "type": "string",
            "description": "Optional start date, YYYY-MM-DD. Overrides Days back."
          },
          "dateTo": {
            "title": "Date to",
            "type": "string",
            "description": "Optional end date, YYYY-MM-DD. Defaults to today (UTC)."
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum number of recalls returned in total, newest first. You are charged per recall returned.",
            "default": 100
          },
          "fdaCenters": {
            "title": "FDA product types",
            "type": "array",
            "description": "Which openFDA enforcement reports to search when FDA is selected.",
            "items": {
              "type": "string",
              "enum": [
                "food",
                "drug",
                "device"
              ],
              "enumTitles": [
                "Food",
                "Drugs",
                "Medical devices"
              ]
            },
            "default": [
              "food",
              "drug",
              "device"
            ]
          },
          "openFdaApiKey": {
            "title": "openFDA API key (optional)",
            "type": "string",
            "description": "Optional. Without a key openFDA allows 240 requests per minute and 1,000 per day per IP address. A free key from open.fda.gov raises the daily limit."
          },
          "vehicleMake": {
            "title": "Vehicle make (NHTSA)",
            "type": "string",
            "description": "For NHTSA recall search: vehicle make, for example Ford."
          },
          "vehicleModel": {
            "title": "Vehicle model (NHTSA)",
            "type": "string",
            "description": "Optional model, for example F-150. If empty, up to 40 models of the make and year are searched."
          },
          "vehicleYear": {
            "title": "Model year (NHTSA)",
            "minimum": 1950,
            "maximum": 2100,
            "type": "integer",
            "description": "Vehicle model year, for example 2022."
          },
          "nhtsaCampaignNumber": {
            "title": "NHTSA campaign number",
            "type": "string",
            "description": "Alternative to make and year: look up one NHTSA campaign, for example 20V682000."
          },
          "vins": {
            "title": "VINs",
            "type": "array",
            "description": "VIN check: up to 200 17-character VINs. Each VIN is decoded with the NHTSA vPIC service and matched to NHTSA recall campaigns for its make, model and model year.",
            "items": {
              "type": "string"
            }
          },
          "watchlistTerms": {
            "title": "Watchlist brands or keywords",
            "type": "array",
            "description": "Watchlist: brand or keyword terms. Each run returns only recalls not returned by an earlier run with the same watchlist name.",
            "items": {
              "type": "string"
            }
          },
          "watchlistVehicles": {
            "title": "Watchlist vehicles (NHTSA)",
            "type": "array",
            "description": "Optional list of vehicles to watch, as JSON objects with make, model and year. Example: [{\"make\":\"Ford\",\"model\":\"F-150\",\"year\":2022}]"
          },
          "watchlistName": {
            "title": "Watchlist name",
            "type": "string",
            "description": "Name of the saved state. Use different names for different watchlists. Letters, digits and hyphens.",
            "default": "default"
          },
          "watchlistLookbackDays": {
            "title": "First run lookback (days)",
            "minimum": 1,
            "maximum": 3650,
            "type": "integer",
            "description": "On the first run of a watchlist, return recalls from this many days back. Later runs return what is new since the previous run.",
            "default": 14
          },
          "resetWatchlist": {
            "title": "Reset watchlist state",
            "type": "boolean",
            "description": "Forget what this watchlist has already returned and start again with the first-run lookback.",
            "default": false
          },
          "stateStoreName": {
            "title": "State store name",
            "type": "string",
            "description": "Name of the key-value store that holds watchlist state. Keep the default unless you manage several accounts of state.",
            "default": "product-recall-monitor-state"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}