{
  "openapi": "3.0.1",
  "info": {
    "title": "Product Recall Catalog Monitor",
    "description": "Catalog-specific product recall screening for CPSC and EU Safety Gate sources.",
    "version": "0.0",
    "x-build-id": "qA7CpNqUO05xepi18"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/corbostudio~product-recall-catalog-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-corbostudio-product-recall-catalog-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/corbostudio~product-recall-catalog-monitor/runs": {
      "post": {
        "operationId": "runs-sync-corbostudio-product-recall-catalog-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/corbostudio~product-recall-catalog-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-corbostudio-product-recall-catalog-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",
        "required": [
          "catalogInputMode"
        ],
        "properties": {
          "catalogInputMode": {
            "title": "Catalog input mode",
            "enum": [
              "public_csv_url",
              "csv_text",
              "json_text",
              "apify_dataset"
            ],
            "type": "string",
            "description": "Select exactly one way to provide the product catalog.",
            "default": "csv_text"
          },
          "catalogUrl": {
            "title": "Public CSV URL",
            "type": "string",
            "description": "Publicly accessible CSV URL used when Catalog input mode is Public CSV URL.",
            "default": ""
          },
          "catalogCsvText": {
            "title": "Catalog CSV text",
            "type": "string",
            "description": "CSV catalog text used when Catalog input mode is Pasted CSV text.",
            "default": ""
          },
          "catalogJsonText": {
            "title": "Catalog JSON text",
            "type": "string",
            "description": "JSON list of catalog objects used when Catalog input mode is Pasted JSON text.",
            "default": ""
          },
          "apifyDatasetId": {
            "title": "Apify Dataset ID",
            "type": "string",
            "description": "Dataset ID used when Catalog input mode is Apify Dataset ID.",
            "default": ""
          },
          "fieldMapping": {
            "title": "Field mapping",
            "type": "object",
            "description": "Map catalog columns into canonical catalog item fields.",
            "properties": {
              "sku": {
                "type": "string",
                "title": "SKU column",
                "description": "Column containing the catalog SKU."
              },
              "productName": {
                "type": "string",
                "title": "Product name column",
                "description": "Column containing the required product name."
              },
              "brand": {
                "type": "string",
                "title": "Brand column",
                "description": "Column containing the product brand."
              },
              "model": {
                "type": "string",
                "title": "Model column",
                "description": "Column containing the model number or model name."
              },
              "gtin": {
                "type": "string",
                "title": "GTIN column",
                "description": "Column containing GTIN values."
              },
              "ean": {
                "type": "string",
                "title": "EAN column",
                "description": "Column containing EAN values."
              },
              "upc": {
                "type": "string",
                "title": "UPC column",
                "description": "Column containing UPC values."
              },
              "category": {
                "type": "string",
                "title": "Category column",
                "description": "Column containing the product category."
              },
              "description": {
                "type": "string",
                "title": "Description column",
                "description": "Column containing product description text."
              },
              "market": {
                "type": "string",
                "title": "Market column",
                "description": "Column containing the market or country market."
              },
              "supplier": {
                "type": "string",
                "title": "Supplier column",
                "description": "Column containing the supplier name."
              },
              "manufacturer": {
                "type": "string",
                "title": "Manufacturer column",
                "description": "Column containing the manufacturer name."
              },
              "lotNumber": {
                "type": "string",
                "title": "Lot column",
                "description": "Column containing lot numbers."
              },
              "batchNumber": {
                "type": "string",
                "title": "Batch column",
                "description": "Column containing batch numbers."
              },
              "batchLot": {
                "type": "string",
                "title": "Batch/lot column",
                "description": "Column containing combined batch or lot values."
              },
              "productUrl": {
                "type": "string",
                "title": "Product URL column",
                "description": "Column containing product page URLs."
              }
            },
            "default": {
              "sku": "sku",
              "productName": "title",
              "brand": "brand",
              "model": "model",
              "gtin": "barcode",
              "ean": "",
              "upc": "",
              "category": "category",
              "description": "description",
              "market": "market",
              "supplier": "supplier",
              "manufacturer": "manufacturer",
              "lotNumber": "lot",
              "batchNumber": "batch",
              "batchLot": "",
              "productUrl": "productUrl"
            }
          },
          "sources": {
            "title": "Sources",
            "uniqueItems": true,
            "type": "array",
            "description": "Official recall and safety alert sources to scan in this run.",
            "items": {
              "type": "string",
              "enum": [
                "cpsc",
                "eu_safety_gate"
              ],
              "enumTitles": [
                "CPSC",
                "EU Safety Gate"
              ]
            },
            "default": [
              "cpsc",
              "eu_safety_gate"
            ]
          },
          "dateMode": {
            "title": "Date mode",
            "enum": [
              "last_days",
              "custom_range"
            ],
            "type": "string",
            "description": "Choose whether to scan the last N days or an explicit source date range.",
            "default": "last_days"
          },
          "lastDays": {
            "title": "Last days",
            "minimum": 1,
            "type": "integer",
            "description": "Number of days before the run date to include when Date mode is Last days.",
            "default": 90
          },
          "fromDate": {
            "title": "From date",
            "type": "string",
            "description": "Inclusive source start date used when Date mode is Custom range.",
            "default": ""
          },
          "toDate": {
            "title": "To date",
            "type": "string",
            "description": "Inclusive source end date used when Date mode is Custom range.",
            "default": ""
          },
          "matchingMode": {
            "title": "Matching mode",
            "enum": [
              "strict",
              "balanced",
              "broad",
              "debug"
            ],
            "type": "string",
            "description": "Controls candidate thresholds: strict is conservative, balanced is the default, broad can return more low-confidence matches when requested, and debug includes discarded candidates for troubleshooting.",
            "default": "balanced"
          },
          "minConfidence": {
            "title": "Minimum confidence",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Minimum Confidence Score included in the dataset unless low-confidence matches are explicitly included.",
            "default": 65
          },
          "includeLowConfidenceMatches": {
            "title": "Include low-confidence matches",
            "type": "boolean",
            "description": "Include low-confidence Match Results in the dataset and report.",
            "default": false
          },
          "includeRawSourceRecords": {
            "title": "Include raw source records",
            "type": "boolean",
            "description": "Write normalized Recall Notices with their raw source fields to RAW_SOURCE_RECORDS.json for debugging and audit review. Raw records are not added to the Match Results dataset.",
            "default": false
          },
          "incrementalMode": {
            "title": "Incremental mode",
            "type": "boolean",
            "description": "Use a named Key-Value Store to classify current Match Results as new or previously seen across scheduled runs.",
            "default": false
          },
          "stateStoreName": {
            "title": "State store name",
            "type": "string",
            "description": "Named Key-Value Store used for Incremental Monitoring State when Incremental mode is enabled.",
            "default": ""
          },
          "maxCatalogRows": {
            "title": "Max catalog rows",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of catalog rows to validate in this run. Extra rows are skipped with a catalog-quality warning.",
            "default": 10000
          },
          "maxSourceRecords": {
            "title": "Max source records",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum normalized Recall Notices to use per source after dedupe and deterministic date ordering.",
            "default": 5000
          },
          "reportFormat": {
            "title": "Report format",
            "enum": [
              "markdown"
            ],
            "type": "string",
            "description": "Human-readable report format to generate. Markdown is the beta-supported format.",
            "default": "markdown"
          },
          "debugMode": {
            "title": "Debug mode",
            "type": "boolean",
            "description": "Include additional diagnostic artifacts such as matching statistics. To return discarded Match Results in the dataset, set Matching mode to Debug.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}