{
  "openapi": "3.0.1",
  "info": {
    "title": "Multi-Retailer MAP & Price-Violation Monitor",
    "description": "Monitor product prices across Target, Walmart, Best Buy and Newegg, then flag MAP (minimum advertised price) violations and unauthorized resellers. Cross-retailer SKU matching by UPC/MPN, graded violation severity, daily monitor mode. For brands and MAP enforcement.",
    "version": "0.1",
    "x-build-id": "JqNb9qguXPjfgodRM"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/seibs.co~map-price-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-seibs.co-map-price-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/seibs.co~map-price-monitor/runs": {
      "post": {
        "operationId": "runs-sync-seibs.co-map-price-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/seibs.co~map-price-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-seibs.co-map-price-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": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "price_scan",
              "cross_retailer_match",
              "map_monitor",
              "seller_audit"
            ],
            "type": "string",
            "description": "price_scan = normalized public price rows per product. cross_retailer_match = collapse each product into one cross-retailer view (price spread, lowest offer). map_monitor = + MAP-violation detection with graded severity (flagship). seller_audit = group offers by seller and flag unauthorized resellers.",
            "default": "map_monitor"
          },
          "products": {
            "title": "Products to monitor",
            "maxItems": 100,
            "type": "array",
            "description": "Your brand's products. Each item: { \"label\": \"Sony WH-1000XM5\", \"upc\": \"027242923058\", \"mpn\": \"WH1000XM5/B\", \"brand\": \"Sony\", \"model\": \"WH-1000XM5\", \"query\": \"Sony WH-1000XM5\", \"map_price\": 399.99, \"authorized_sellers\": [\"Best Buy\", \"Crutchfield\"] }. Supply UPC or MPN for exact cross-retailer matching; map_price for authoritative violation flags. Hard cap of 100."
          },
          "search_terms": {
            "title": "Search terms (simple)",
            "maxItems": 100,
            "type": "array",
            "description": "Quick alternative to 'products' when you only have product names. Each string becomes a product searched by name across the selected retailers. Hard cap of 100.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "retailers": {
            "title": "Retailers",
            "maxItems": 15,
            "uniqueItems": true,
            "type": "array",
            "description": "Which retailers to query. Fully-parsed: target, bestbuy, newegg, walmart. Catalog-registered (parser pending, documented): homedepot, lowes, costco, bhphoto, wayfair, macys, microcenter. Leave empty for the default set (target, bestbuy, newegg, walmart), or pass ['ALL'].",
            "items": {
              "type": "string",
              "enum": [
                "target",
                "bestbuy",
                "newegg",
                "walmart",
                "homedepot",
                "lowes",
                "costco",
                "bhphoto",
                "wayfair",
                "macys",
                "microcenter",
                "ALL"
              ]
            },
            "default": [
              "target",
              "bestbuy",
              "newegg",
              "walmart"
            ]
          },
          "default_map_price": {
            "title": "Default MAP price",
            "minimum": 0,
            "type": "integer",
            "description": "A fallback MAP threshold (USD) applied to every product that has no map_price of its own. Used in map_monitor / seller_audit modes. Leave blank to rely on per-product map_price or inference."
          },
          "infer_map": {
            "title": "Infer MAP when not supplied",
            "type": "boolean",
            "description": "When no map_price (per-product or default) is given, infer an ADVISORY MAP proxy from observed cross-retailer prices (manufacturer list/MSRP anchor). Inferred thresholds are clearly labelled and are not the brand's contractual MAP. Off by default.",
            "default": false
          },
          "authorized_sellers": {
            "title": "Authorized sellers (global)",
            "maxItems": 300,
            "type": "array",
            "description": "Run-wide list of seller names authorized to sell your brand (e.g. ['Best Buy', 'Crutchfield', 'B&H']). Any third-party seller not on this list is flagged unauthorized in seller_audit / map_monitor. Per-product authorized_sellers override this. Hard cap of 300.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "only_violations": {
            "title": "Emit only violating listings (map_monitor)",
            "type": "boolean",
            "description": "In map_monitor mode, push only the listings that violate MAP (plus the rollups + summary), instead of every matched listing. Off by default.",
            "default": false
          },
          "max_results_per_retailer": {
            "title": "Max results per retailer per product",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Hard cap on listings considered per retailer per product (before matching filters them to your SKU). Default 24.",
            "default": 24
          },
          "name_match_threshold": {
            "title": "Fuzzy name-match threshold",
            "type": "string",
            "description": "Acceptance threshold (0-1) for fuzzy name matching when no UPC/MPN is available. Default 0.82. Raise to reduce false matches, lower to catch more variants.",
            "default": "0.82"
          },
          "target_api_key": {
            "title": "Target web key (optional override)",
            "type": "string",
            "description": "Override the public anonymous Target RedSky web key if the shipped default rotates. Leave blank to use the default. This is the same anonymous key target.com's own logged-out frontend uses.",
            "default": ""
          },
          "use_apify_proxy": {
            "title": "Use Apify Proxy",
            "type": "boolean",
            "description": "Route retailer requests through Apify Proxy. DATACENTER for the cheap httpx pass, RESIDENTIAL for the curl_cffi / browser escalation legs.",
            "default": true
          },
          "apify_proxy_groups": {
            "title": "Datacenter proxy groups (override)",
            "type": "array",
            "description": "Override the DATACENTER proxy groups for the httpx tier. The escalation tiers always use RESIDENTIAL when browser fallback is on.",
            "default": [
              "DATACENTER"
            ],
            "items": {
              "type": "string"
            }
          },
          "use_browser_fallback": {
            "title": "Enable anti-bot escalation (curl_cffi + browser)",
            "type": "boolean",
            "description": "On a block, escalate httpx -> curl_cffi TLS impersonation (residential) -> patchright browser (residential). Required for Walmart and the WAF-fronted retailers. Off = httpx only (fewer retailers succeed).",
            "default": true
          },
          "browser_cdp_url": {
            "title": "Browser CDP URL (optional)",
            "type": "string",
            "description": "Connect the browser tier to a warm anti-detect browser over CDP (inherits its session + IP) to clear managed bot walls. Leave blank to launch a fresh patchright browser.",
            "default": ""
          },
          "concurrency": {
            "title": "Max concurrent requests",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "Parallel retailer requests. Kept low (default 4) to stay polite. Max 8.",
            "default": 4
          },
          "monitor_webhook_url": {
            "title": "Monitor webhook URL (Slack)",
            "type": "string",
            "description": "Optional. On a scheduled (monitor-mode) run, POST the new-violations digest to this Slack incoming-webhook URL.",
            "default": ""
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}