{
  "openapi": "3.0.1",
  "info": {
    "title": "Merchant Operator: Google Shopping Feed Monitor & Fixer",
    "description": "Monitor your Google Shopping feed, get a health score, an action plan and a corrected feed on every run.",
    "version": "1.0",
    "x-build-id": "E1jsOp4fdEbW11BmD"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/vanborn_labs~merchant-operator/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-vanborn_labs-merchant-operator",
        "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/vanborn_labs~merchant-operator/runs": {
      "post": {
        "operationId": "runs-sync-vanborn_labs-merchant-operator",
        "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/vanborn_labs~merchant-operator/run-sync": {
      "post": {
        "operationId": "run-sync-vanborn_labs-merchant-operator",
        "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": [
          "client_key"
        ],
        "properties": {
          "mode": {
            "title": "What to do",
            "enum": [
              "monitor",
              "history",
              "reset"
            ],
            "type": "string",
            "description": "Run a check, show saved history, or delete history for this store name.",
            "default": "monitor"
          },
          "client_key": {
            "title": "Store name",
            "type": "string",
            "description": "Any short id for this store, like acme-us. Use the same one every run so changes are tracked."
          },
          "feed_url": {
            "title": "Product feed URL",
            "type": "string",
            "description": "Google Merchant feed (CSV, TSV or XML), Shopify or WooCommerce export."
          },
          "store_url": {
            "title": "Shopify store URL",
            "type": "string",
            "description": "Use alone for Shopify stores, or with a feed to check store policies."
          },
          "feed_text": {
            "title": "Or paste the feed",
            "type": "string",
            "description": "Paste a Google Merchant CSV, TSV or XML feed instead of a URL."
          },
          "schedule": {
            "title": "How often you will run it",
            "enum": [
              "manual",
              "hourly",
              "every_6h",
              "daily",
              "weekly"
            ],
            "type": "string",
            "description": "Hint only. This Actor does not run on a timer. daily sets next_check_due_at to 24 hours after this run. To actually run it daily, create an Apify Schedule that starts this Actor.",
            "default": "daily"
          },
          "target_country": {
            "title": "Target country",
            "type": "string",
            "description": "Two-letter country code used for feed checks, default US.",
            "default": "US"
          },
          "currency": {
            "title": "Currency",
            "type": "string",
            "description": "Currency code expected in prices, default USD.",
            "default": "USD"
          },
          "max_products": {
            "title": "Max products",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum products to check in one run, up to 5,000.",
            "default": 2000
          },
          "price_drift_pct": {
            "title": "Price change alert (%)",
            "minimum": 1,
            "maximum": 90,
            "type": "integer",
            "description": "Alert when a product price moves at least this percent since the last run.",
            "default": 15
          },
          "min_severity": {
            "title": "Minimum priority score",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Only issues with this priority score or higher are returned (0 to 100).",
            "default": 40
          },
          "image_check": {
            "title": "Check images",
            "type": "boolean",
            "description": "Check a sample of product images for broken or too-small files.",
            "default": true
          },
          "policy_check": {
            "title": "Check store policies",
            "type": "boolean",
            "description": "Check refund, shipping, privacy and contact pages. Needs a store URL.",
            "default": false
          },
          "fixes": {
            "title": "Write better titles and descriptions",
            "type": "boolean",
            "description": "Write better titles and descriptions for products that need them.",
            "default": true
          },
          "fix_limit": {
            "title": "Max rewrites",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Maximum number of titles and descriptions to rewrite in one run.",
            "default": 20
          },
          "fix_format": {
            "title": "Corrected feed format",
            "enum": [
              "csv",
              "tsv",
              "xml",
              "none"
            ],
            "type": "string",
            "description": "Format of the corrected feed file saved with the run.",
            "default": "csv"
          },
          "corrected_feed_scope": {
            "title": "Corrected feed contents",
            "enum": [
              "all",
              "changed"
            ],
            "type": "string",
            "description": "Include every product, or only rows that changed.",
            "default": "all"
          },
          "webhook_url": {
            "title": "Alert webhook (https)",
            "type": "string",
            "description": "Slack, Discord or your own endpoint."
          },
          "webhook_on": {
            "title": "Send alert when",
            "enum": [
              "issues",
              "critical",
              "always",
              "never"
            ],
            "type": "string",
            "description": "When to send the alert: if any issues, only critical ones, always, or never.",
            "default": "issues"
          },
          "brand_voice": {
            "title": "Brand voice notes",
            "type": "string",
            "description": "Optional notes about tone or words to use in rewritten titles and descriptions."
          },
          "dry_run": {
            "title": "Test run (do not save)",
            "type": "boolean",
            "description": "Run the check without saving history.",
            "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}