{
  "openapi": "3.0.1",
  "info": {
    "title": "Product Recall Monitor - CPSC, FDA & NHTSA",
    "description": "Monitor US product, food, drug, device & vehicle recalls from CPSC, openFDA and NHTSA in one run. Filter by brand, UPC and date; deduped, normalized output.",
    "version": "0.1",
    "x-build-id": "BHQc3VTl474IWoHct"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/dabomb1177~recall-monitor-cpsc-fda-nhtsa/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-dabomb1177-recall-monitor-cpsc-fda-nhtsa",
        "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/dabomb1177~recall-monitor-cpsc-fda-nhtsa/runs": {
      "post": {
        "operationId": "runs-sync-dabomb1177-recall-monitor-cpsc-fda-nhtsa",
        "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/dabomb1177~recall-monitor-cpsc-fda-nhtsa/run-sync": {
      "post": {
        "operationId": "run-sync-dabomb1177-recall-monitor-cpsc-fda-nhtsa",
        "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 to query",
            "type": "array",
            "description": "Which government recall sources to pull from. Allowed values: CPSC (consumer products), FDA (food/drug/device via openFDA), NHTSA (vehicles). NHTSA also requires the Vehicles field below.",
            "default": [
              "CPSC",
              "FDA",
              "NHTSA"
            ],
            "items": {
              "type": "string"
            }
          },
          "brands": {
            "title": "Brand / company names",
            "type": "array",
            "description": "Filter recalls to these brands or companies using fuzzy matching (handles 'Inc.', 'LLC', punctuation and minor spelling differences). Matches against company, product and title fields. Leave empty to return every recall in the date window. Applies to CPSC and FDA.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "upcs": {
            "title": "UPC / product codes",
            "type": "array",
            "description": "Filter to recalls whose product codes contain any of these UPC/EAN numbers (11–14 digits). Applies to CPSC and FDA. Leave empty to skip UPC filtering.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "vehicles": {
            "title": "Vehicles (for NHTSA)",
            "type": "array",
            "description": "NHTSA is keyed by vehicle. Provide objects like {\"make\":\"Honda\",\"modelYear\":2020} or {\"make\":\"Honda\",\"model\":\"Accord\",\"modelYear\":2020}. If \"model\" is omitted, every model with recalls for that make/year is checked. Ignored unless NHTSA is in Agencies.",
            "default": []
          },
          "fdaCategories": {
            "title": "FDA categories",
            "type": "array",
            "description": "Which openFDA enforcement datasets to query. Allowed values: food, drug, device.",
            "default": [
              "food",
              "drug",
              "device"
            ],
            "items": {
              "type": "string"
            }
          },
          "sinceDate": {
            "title": "Since date (delta filter)",
            "type": "string",
            "description": "Only return recalls reported on or after this date (YYYY-MM-DD). Set this to the timestamp of your last run to get just the new recalls. Overrides 'Lookback days'."
          },
          "untilDate": {
            "title": "Until date",
            "type": "string",
            "description": "Only return recalls reported on or before this date (YYYY-MM-DD). Leave empty for 'up to now'."
          },
          "lookbackDays": {
            "title": "Lookback days",
            "minimum": 1,
            "maximum": 3650,
            "type": "integer",
            "description": "If no 'Since date' is set, look back this many days from today.",
            "default": 90
          },
          "dedupe": {
            "title": "Deduplicate notices",
            "type": "boolean",
            "description": "Collapse duplicate notices (same recall id, shared UPC, or same company+date) into one record, noting the other agencies in 'alsoReportedBy'.",
            "default": true
          },
          "matchThresholdPercent": {
            "title": "Fuzzy match strictness (%)",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "How similar a brand name must be to count as a match (0–100). Higher = stricter. 82 is a good default.",
            "default": 82
          },
          "maxItems": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum number of recall records to return (newest first).",
            "default": 200
          },
          "maxFdaScanPerCategory": {
            "title": "Max FDA records scanned per category",
            "minimum": 100,
            "maximum": 25000,
            "type": "integer",
            "description": "Safety cap on how many openFDA enforcement reports are scanned per category before brand filtering. Raise for rare brands over long windows.",
            "default": 1000
          },
          "maxNhtsaModelsPerQuery": {
            "title": "Max NHTSA models per vehicle query",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "When a vehicle entry omits 'model', cap how many models (that have recalls) are checked for that make/year.",
            "default": 20
          },
          "fdaApiKey": {
            "title": "openFDA API key (optional)",
            "type": "string",
            "description": "Optional openFDA API key for higher rate limits. Not required for typical runs."
          },
          "includeRawRecord": {
            "title": "Include raw agency record",
            "type": "boolean",
            "description": "Attach each source agency's original unmodified record under a 'raw' field.",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}