{
  "openapi": "3.0.1",
  "info": {
    "title": "Shopify Variant Image Audit - Find Missing Images",
    "description": "Audit your Shopify catalog to find variants with missing or mismatched images and get a fix-ready CSV. One-run audit here; no weekly tracking in this Actor. Read-only — never writes to your store. Max $9.00/run for up to 12 rows — capped, lands clean.",
    "version": "0.2",
    "x-build-id": "dZ7yfSKgzBLnSHEbr"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/steadyworks~shopify-variant-image-audit/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-steadyworks-shopify-variant-image-audit",
        "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~shopify-variant-image-audit/runs": {
      "post": {
        "operationId": "runs-sync-steadyworks-shopify-variant-image-audit",
        "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~shopify-variant-image-audit/run-sync": {
      "post": {
        "operationId": "run-sync-steadyworks-shopify-variant-image-audit",
        "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": [
          "productCsv",
          "livePageUrls",
          "pages"
        ],
        "properties": {
          "productCsv": {
            "title": "Buyer product CSV rows",
            "minItems": 1,
            "maxItems": 200,
            "type": "array",
            "description": "Buyer product-CSV rows, max 200. Required per row: title, sku, option1Name, option1Value. Optional: urlHandle, productImageUrl, variantImageUrl, imagePosition, costPerItem. Header variants are tolerated; missing core columns reject the run before any other work.",
            "items": {
              "type": "object",
              "properties": {
                "title": {
                  "title": "Product title",
                  "description": "Buyer CSV product title.",
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 150,
                  "example": "Demo Tee"
                },
                "sku": {
                  "title": "Variant SKU (exact match key)",
                  "description": "Exact-match key; near-matches never flag.",
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 150,
                  "example": "TEE-RED-S"
                },
                "option1Name": {
                  "title": "Option name",
                  "description": "Buyer CSV option name (e.g. Color).",
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64,
                  "example": "Color"
                },
                "option1Value": {
                  "title": "Option value",
                  "description": "Buyer CSV option value (e.g. Red).",
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 50,
                  "example": "Red"
                },
                "urlHandle": {
                  "title": "URL handle",
                  "description": "Buyer CSV URL handle.",
                  "type": "string",
                  "maxLength": 120,
                  "example": "demo-tee"
                },
                "productImageUrl": {
                  "title": "Product image URL",
                  "description": "Buyer CSV product image URL.",
                  "type": "string",
                  "maxLength": 500,
                  "example": "https://cdn.example/p/tee-product.jpg"
                },
                "variantImageUrl": {
                  "title": "CSV variant image URL (null when the CSV has none)",
                  "description": "CSV-side variant image; null feeds the missing-image class.",
                  "type": "string",
                  "maxLength": 500,
                  "nullable": true,
                  "example": "https://cdn.example/p/tee-red-s-csv.jpg"
                },
                "imagePosition": {
                  "title": "Image position",
                  "description": "Buyer CSV image position.",
                  "type": "number",
                  "nullable": true,
                  "example": 1
                },
                "costPerItem": {
                  "title": "Cost per item",
                  "description": "Buyer CSV cost per item.",
                  "type": "number",
                  "nullable": true,
                  "example": 12.5
                }
              },
              "required": [
                "title",
                "sku",
                "option1Name",
                "option1Value"
              ]
            }
          },
          "livePageUrls": {
            "title": "Buyer-named product page URLs",
            "minItems": 1,
            "maxItems": 5,
            "type": "array",
            "description": "Buyer-named public product page URLs, 1 to 5. Each URL is looked up once in `pages`; a URL absent from `pages` is a typed per-URL miss, never a live fetch.",
            "items": {
              "type": "string",
              "maxLength": 500
            }
          },
          "pages": {
            "title": "Saved product pages",
            "type": "object",
            "description": "Saved product pages the audit compares against (no live fetch): {\"pages\": {\"<url>\": {\"variants\": [{\"sku\": \"...\", \"optionName\": \"...\", \"optionValue\": \"...\", \"imageUrl\": \"... or null\"}]}}}. SKUs compare exact-only; near-matches never flag. A bare {\"<url>\": {\"variants\": [...]}} map is accepted the same way."
          },
          "scopeStore": {
            "title": "Store scope key",
            "minLength": 1,
            "maxLength": 150,
            "type": "string",
            "description": "Stable store key. Same scope plus same inputs hits the same state. Leave empty to use the actor default scope (fail-closed: never shares state across stores)."
          },
          "runId": {
            "title": "Run identifier",
            "minLength": 1,
            "maxLength": 256,
            "type": "string",
            "description": "Single audit run identifier; doubles as the billing idempotency key (retry bills max(0, rows minus already-charged) only). Leave empty to stamp the platform run id (fail-closed: never reuses a foreign billing key)."
          },
          "checkedAt": {
            "title": "Run timestamp",
            "maxLength": 200,
            "type": "string",
            "description": "Run timestamp (ISO date-time). Leave empty to stamp at run time; every emitted row carries it back."
          },
          "freshnessHours": {
            "title": "Evidence freshness window (hours)",
            "minimum": 1,
            "type": "integer",
            "description": "Evidence freshness window in hours (1 to 168, 72 when empty; evidence older than the window grades stale-variant, and schedules plus saved-task runs cap at 24)."
          },
          "capMode": {
            "title": "Billing scope",
            "enum": [
              "capped",
              "complete-input"
            ],
            "type": "string",
            "description": "capped (default): max $9.00 for up to 12 mismatch rows — row 13 and up counts only, never charged. complete-input: processes your whole input up to 200 rows; worst case = your input rows x $0.75/row, never above $150.00. The run quotes your worst case before charging; above $150.00 it fails closed to capped. Schedules and saved-task runs always use capped.",
            "default": "capped"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}