{
  "openapi": "3.0.1",
  "info": {
    "title": "Minimum Advertised Price Monitor - Evidence Rows",
    "description": "Flag advertised prices below MAP across retailers with per-row evidence URLs, checked timestamps and seller identity.",
    "version": "0.1",
    "x-build-id": "ZEnaz5o2AfTrrlpEi"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/steadyworks~minimum-advertised-price-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-steadyworks-minimum-advertised-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/steadyworks~minimum-advertised-price-monitor/runs": {
      "post": {
        "operationId": "runs-sync-steadyworks-minimum-advertised-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/steadyworks~minimum-advertised-price-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-steadyworks-minimum-advertised-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": [
          "targets",
          "storeName"
        ],
        "properties": {
          "targets": {
            "title": "MAP price monitor targets",
            "minItems": 1,
            "maxItems": 200,
            "type": "array",
            "description": "Products to check: each advertised price is compared against its minimum advertised price under your unilateral policy. Structured-data shops (Shopify, WooCommerce, BigCommerce, custom) only, up to 200 per run.",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "url",
                "mapPrice"
              ],
              "properties": {
                "url": {
                  "title": "Product URL",
                  "description": "Public HTTPS retailer product page to check. Structured-data shops (Shopify, WooCommerce, BigCommerce, custom); marketplace/big-box bot walls yield no price.",
                  "type": "string",
                  "pattern": "^https://",
                  "minLength": 1,
                  "maxLength": 2048,
                  "errorMessage": {
                    "pattern": "URL must start with https:// — public retailer product page only (max 2048 chars)."
                  }
                },
                "mapPrice": {
                  "title": "MAP price",
                  "description": "Minimum advertised price for this product.",
                  "type": "number",
                  "minimum": 0.01,
                  "maximum": 1000000
                },
                "sku": {
                  "title": "SKU",
                  "description": "Product identifier, case-sensitive: reuse identically every run (Boots and boots are different products). Lowercase recommended.",
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 256,
                  "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{0,255}$",
                  "errorMessage": {
                    "pattern": "SKU must start with a letter or digit, then letters/digits/._- only, 1-256 chars; reuse identically every run (case-sensitive)."
                  }
                },
                "currency": {
                  "title": "Currency",
                  "description": "Three-letter currency code.",
                  "type": "string",
                  "pattern": "^[A-Z]{3}$",
                  "default": "USD",
                  "errorMessage": {
                    "pattern": "Currency must be a 3-letter uppercase code, e.g. USD."
                  }
                }
              }
            }
          },
          "authorizedSellers": {
            "title": "Authorized sellers",
            "maxItems": 50,
            "type": "array",
            "description": "Retailer hostnames excluded from advertised price violation and recovery rows (case-insensitive; exact-match — list subdomains explicitly, e.g. shop.example.com; trailing dots ignored). Snapshots still bill; verify-before-enforce applies.",
            "items": {
              "type": "string",
              "maxLength": 253
            }
          },
          "alertMode": {
            "title": "Alert mode",
            "enum": [
              "violations-only",
              "violations-and-recoveries"
            ],
            "type": "string",
            "description": "Choose violations-only (default) or include recoveries alongside advertised price violations. verify-before-enforce applies.",
            "default": "violations-only"
          },
          "maxSpendUsd": {
            "title": "Price monitoring spend cap per run (USD)",
            "minimum": 0.05,
            "maximum": 50,
            "type": "number",
            "description": "Spend protection for each run: the run stops before billing past this cap, so a violation spike can never surprise you. Set it high to let large spikes through, low for tighter control. A stopped run still reports counts plus spendUsd; raise the cap and rerun to collect the full evidence rows. Per run only - schedules multiply it, so cap multi-run spend with console max-cost and schedule quotas. Honest edges: walled/failed pages bill $0; billed charges stand (no void API). A sustained price drop re-trips the cap every run until raised. Run 1 shows at most 4 preview rows (billed on paid, $0 on trial).",
            "default": 2
          },
          "capMode": {
            "title": "Run size mode",
            "enum": [
              "capped",
              "complete-input"
            ],
            "type": "string",
            "description": "capped (default) bills up to your maxSpendUsd cap, then lands counts-only SUCCEEDED. complete-input processes your entire input in one run: the worst-case cost is quoted from your input before anything bills (N targets x $0.0004 snapshots + N x $0.10 violations + N x $0.02 recoveries, never above $0.08 snapshots / $20.00 violations / $4.00 recoveries per run for 200 targets). One click, no billing field. A buyer-set platform max total charge still lowers any run; scheduled and task runs always use capped; increased-limit runs land counts-only SUCCEEDED. Billed charges stand (no void API); per-run scope, schedules multiply it.",
            "default": "capped"
          },
          "storeName": {
            "title": "Price monitor store name",
            "pattern": "^[a-z0-9][a-z0-9-]{1,62}$",
            "type": "string",
            "description": "Stable portfolio key; same store name plus same targets reuses the advertised price baseline. Run 1 shows up to 4 current rows + lockedCount (billed on paid, $0 on trial); runs 2+ show changes."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}