{
  "openapi": "3.0.1",
  "info": {
    "title": "Cross-Retail Product Matcher",
    "description": "Match Amazon and Walmart products using identifiers, models, specifications, titles, variants, brands, and images.",
    "version": "0.0",
    "x-build-id": "ssPOSryuaVRAcR9qf"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/lead.gen.labs~cross-retail-product-matcher/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-lead.gen.labs-cross-retail-product-matcher",
        "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/lead.gen.labs~cross-retail-product-matcher/runs": {
      "post": {
        "operationId": "runs-sync-lead.gen.labs-cross-retail-product-matcher",
        "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/lead.gen.labs~cross-retail-product-matcher/run-sync": {
      "post": {
        "operationId": "run-sync-lead.gen.labs-cross-retail-product-matcher",
        "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": "Matching workflow",
            "enum": [
              "PAIR",
              "CATALOG"
            ],
            "type": "string",
            "description": "Compare one source with one candidate, or match each source-catalog product against a candidate catalog.",
            "default": "PAIR"
          },
          "products": {
            "title": "Products to compare",
            "minItems": 2,
            "maxItems": 2,
            "type": "array",
            "description": "The first entry is the source and the second is the candidate.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "sourceProducts": {
            "title": "Source catalog",
            "type": "array",
            "description": "Products that need a best-match decision in catalog mode.",
            "default": [],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "sourceCatalog": {
            "title": "Structured source records (API)",
            "type": "array",
            "description": "Optional structured product objects for API and advanced users who already have catalog data.",
            "default": []
          },
          "candidateProducts": {
            "title": "Candidate catalog",
            "type": "array",
            "description": "Products that each source product should be matched against.",
            "default": [],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "candidateCatalog": {
            "title": "Structured candidate records (API)",
            "type": "array",
            "description": "Optional structured candidate objects for API and advanced catalog workflows.",
            "default": []
          },
          "matchLevel": {
            "title": "Required match level",
            "enum": [
              "EXACT_VARIANT",
              "BASE_PRODUCT"
            ],
            "type": "string",
            "description": "Choose whether variant differences remain separate or roll up to the same base product.",
            "default": "EXACT_VARIANT"
          },
          "exactMatchThreshold": {
            "title": "Exact-match confidence",
            "minimum": 0.7,
            "maximum": 1,
            "type": "number",
            "description": "Minimum confidence for an automatic exact match.",
            "default": 0.9
          },
          "reviewThreshold": {
            "title": "Possible-match confidence",
            "minimum": 0.3,
            "maximum": 0.95,
            "type": "number",
            "description": "Scores from this value up to the exact threshold are marked for review.",
            "default": 0.7
          },
          "oneToOne": {
            "title": "Use each candidate only once",
            "type": "boolean",
            "description": "Recommended when both catalogs contain one row per physical product.",
            "default": false
          },
          "maxCandidatesPerProduct": {
            "title": "Candidates compared per source",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Fully score only the highest-ranked candidates for each source product.",
            "default": 25
          },
          "maxProducts": {
            "title": "Maximum total products",
            "minimum": 2,
            "maximum": 10000,
            "type": "integer",
            "description": "Reject inputs whose combined source and candidate count exceeds this safety limit.",
            "default": 1000
          },
          "maxConcurrency": {
            "title": "Concurrent product requests",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Higher values can finish faster but may increase retailer blocking.",
            "default": 3
          },
          "maxRequestRetries": {
            "title": "Request retries",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Retry direct or browser requests before recording an extraction failure.",
            "default": 2
          },
          "requestTimeoutSeconds": {
            "title": "Request timeout",
            "minimum": 10,
            "maximum": 120,
            "type": "integer",
            "description": "Maximum duration of one direct retailer request.",
            "default": 40
          },
          "cacheMaxAgeHours": {
            "title": "Product cache lifetime",
            "minimum": 1,
            "maximum": 720,
            "type": "integer",
            "description": "Reuse recent extractions to reduce runtime and retailer requests.",
            "default": 24
          },
          "cacheStoreName": {
            "title": "Cache name",
            "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]{0,99}$",
            "type": "string",
            "description": "Stable private store used to reuse product extraction across runs.",
            "default": "cross-retail-matcher-cache"
          },
          "locale": {
            "title": "Store locale",
            "type": "string",
            "description": "Locale used for retailer request and browser language settings.",
            "default": "en-US"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}