{
  "openapi": "3.0.1",
  "info": {
    "title": "CPSC Recall Match for Product Catalogs (UPC, Brand, Model)",
    "description": "Screen your SKU list against official U.S. CPSC recall notices. Exact UPC/GTIN matches, brand+model candidates for review, and the evidence behind every match: recall number, date, hazard, remedy and cpsc.gov link.",
    "version": "1.0",
    "x-build-id": "79TVCGqK7qfjDgGmu"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/howmuchworks~cpsc-recall-match/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-howmuchworks-cpsc-recall-match",
        "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/howmuchworks~cpsc-recall-match/runs": {
      "post": {
        "operationId": "runs-sync-howmuchworks-cpsc-recall-match",
        "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/howmuchworks~cpsc-recall-match/run-sync": {
      "post": {
        "operationId": "run-sync-howmuchworks-cpsc-recall-match",
        "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": {
          "products": {
            "title": "Products (JSON array)",
            "type": "array",
            "description": "One object per product, for example {\"sku\": \"HT-2002\", \"upc\": \"\", \"brand\": \"DREO\", \"model\": \"DR-HSH015\", \"name\": \"Ceramic space heater\", \"dateCode\": \"2025/09\"}. Column names are matched loosely (upc, gtin, ean, barcode all work). The three sample rows are ignored (not screened, not charged) when you also fill 'Products (pasted CSV)' or 'Products (CSV URL)'."
          },
          "csvText": {
            "title": "Products (pasted CSV)",
            "type": "string",
            "description": "Paste a CSV with a header row. Comma, semicolon, tab or pipe separated. Example header: sku,upc,brand,model,name,date_code"
          },
          "csvUrl": {
            "title": "Products (CSV URL)",
            "type": "string",
            "description": "Public http(s) link to a CSV file (for example a Google Sheets 'publish to web' CSV link). Up to 15 MB. Links to private or local network addresses are refused."
          },
          "lookbackYears": {
            "title": "Recall window: years back",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Screen against recalls announced in this many years up to today. Ignored when 'Window start date' is set. Each year is about 12 small API calls.",
            "default": 3
          },
          "dateFrom": {
            "title": "Window start date",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2})?$",
            "type": "string",
            "description": "Optional. First recall date to include, YYYY-MM-DD. Overrides 'years back'."
          },
          "dateTo": {
            "title": "Window end date",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2})?$",
            "type": "string",
            "description": "Optional. Last recall date to include, YYYY-MM-DD. Defaults to today."
          },
          "matchStrictness": {
            "title": "Match strictness",
            "enum": [
              "strict",
              "balanced",
              "broad"
            ],
            "type": "string",
            "description": "strict: exact needs a GTIN/UPC equality; brand+model hits go to review; rows need a GTIN/UPC or a model number. balanced (default): GTIN/UPC, or brand plus exact model number, can be an exact match; brand+product-words and model-only hits go to review. broad: also lists weaker brand-only and fuzzy-model candidates for review. In every mode a match on a notice that limits the recall to certain serial numbers, lots or date codes stays needs-review unless your date code is verified inside the notice's manufacturing range.",
            "default": "balanced"
          },
          "maxMatchesPerRow": {
            "title": "Max matches listed per row",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Best candidates kept per product (all candidates are counted in matchCount).",
            "default": 5
          },
          "maxRows": {
            "title": "Max rows per run",
            "minimum": 1,
            "maximum": 25000,
            "type": "integer",
            "description": "Rows after this limit are skipped and not charged. Hard limit 25,000.",
            "default": 5000
          },
          "passthroughColumns": {
            "title": "Extra columns to copy to the results",
            "type": "array",
            "description": "Optional. Names of extra input columns (for example price or supplier) to copy into each result's 'extra' field. Other columns are not copied, so customer or personal data in your file does not reach the dataset. Up to 20.",
            "default": [],
            "items": {
              "type": "string"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}