{
  "openapi": "3.0.1",
  "info": {
    "title": "SiteVerdict — Product Feed Validator (Google & Meta)",
    "description": "Find the products Google Merchant Center or Meta will reject before you upload. Validates XML/CSV/TSV/Google Sheets feeds: required fields, GTIN checksums, price/availability formats, policy-risk words, sampled image and landing-page price checks. Monitoring + alerts.",
    "version": "1.1",
    "x-build-id": "6ptMxYhUWz8jdPfsQ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/siteverdict~siteverdict-product-feed-validator/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-siteverdict-siteverdict-product-feed-validator",
        "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/siteverdict~siteverdict-product-feed-validator/runs": {
      "post": {
        "operationId": "runs-sync-siteverdict-siteverdict-product-feed-validator",
        "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/siteverdict~siteverdict-product-feed-validator/run-sync": {
      "post": {
        "operationId": "run-sync-siteverdict-siteverdict-product-feed-validator",
        "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",
        "properties": {
          "feedUrls": {
            "title": "Feed URLs",
            "type": "array",
            "description": "Public links to your product feeds: Google Merchant Center / Meta catalog XML (RSS 2.0 or Atom), CSV, TSV or a Google Sheets link (share as 'Anyone with the link' or publish to web). Gzipped feeds are fine. Max 20 per run. Query strings are redacted in the output because feed links often carry tokens.",
            "items": {
              "type": "string"
            }
          },
          "feedText": {
            "title": "...or paste the feed",
            "type": "string",
            "description": "Optional. Paste the XML or CSV/TSV content directly (max 10 MB of text)."
          },
          "sampleMode": {
            "title": "Sample mode (offline demo, free)",
            "type": "boolean",
            "description": "Validate a bundled demo feed with canned landing pages and images. No website is contacted and nothing is charged. Turn off to check your own feeds.",
            "default": false
          },
          "target": {
            "title": "Rules to apply",
            "enum": [
              "google",
              "meta"
            ],
            "type": "string",
            "description": "Google Merchant Center (Google Shopping, free listings, Performance Max) or Meta catalog (Facebook/Instagram Shops, Advantage+ catalog ads).",
            "default": "google"
          },
          "targetCountry": {
            "title": "Target country (2-letter code)",
            "type": "string",
            "description": "Optional, e.g. GB, US, DE. Used to warn when prices are not in that country's currency."
          },
          "policyCheck": {
            "title": "Flag policy-risk keywords",
            "type": "boolean",
            "description": "Warn about words often linked to restricted products (weapons, CBD/drugs, vaping, replicas, health claims, prescription drugs, adult, gambling). Keyword heuristics to review, not a policy decision.",
            "default": true
          },
          "maxItems": {
            "title": "Max products per feed",
            "minimum": 1,
            "maximum": 200000,
            "type": "integer",
            "description": "Stop after this many products in each feed. Each validated product is billed as one 'product-validated' event.",
            "default": 50000
          },
          "imageSample": {
            "title": "Images to check (sample)",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "How many image_link URLs to fetch (spread evenly across the feed) to confirm they load, are real images and are at least 100x100 px. Only the first 64 KB of each image is downloaded. robots.txt is respected. 0 = off.",
            "default": 10
          },
          "landingSample": {
            "title": "Landing pages to price-check (sample)",
            "minimum": 0,
            "maximum": 50,
            "type": "integer",
            "description": "How many product pages (link) to fetch to compare the page's schema.org/Open Graph price and availability with the feed (sale_price wins when present). Billed per judged page ('landing-page-checked'); pages blocked by robots.txt or errors are free. 0 = off.",
            "default": 5
          },
          "timeoutSecs": {
            "title": "Per-request timeout (seconds)",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "Timeout for each image or landing page request (the feed download itself gets at least 60 s).",
            "default": 30
          },
          "itemOutput": {
            "title": "Per-product rows in the dataset",
            "enum": [
              "problems",
              "all",
              "none"
            ],
            "type": "string",
            "description": "Besides one summary row per feed: add a row per product with problems (default), per every product, or none. Capped at 5,000 rows per feed; the full list is always in the ISSUES CSV.",
            "default": "problems"
          },
          "monitor": {
            "title": "Monitoring mode",
            "type": "boolean",
            "description": "Remember each feed's results (named key-value store 'siteverdict-feed-monitor') and report what got worse or better since the last run. Schedule the Actor daily to catch broken feeds early.",
            "default": false
          },
          "monitorKey": {
            "title": "Monitor name",
            "type": "string",
            "description": "Optional label to keep separate histories (e.g. per client)."
          },
          "alertWebhookUrl": {
            "title": "Alert webhook URL (Slack or any HTTPS endpoint)",
            "type": "string",
            "description": "Optional. A Slack incoming webhook or any HTTPS URL that accepts JSON. Stored encrypted; never logged."
          },
          "alertFormat": {
            "title": "Alert format",
            "enum": [
              "slack",
              "json"
            ],
            "type": "string",
            "description": "Slack message or plain JSON.",
            "default": "slack"
          },
          "alertOnlyIfWorse": {
            "title": "Alert only when the feed gets worse",
            "type": "boolean",
            "description": "With monitoring on: alert only when errors increase or a new issue type appears. Without monitoring: alert when any product has errors.",
            "default": true
          },
          "aiProvider": {
            "title": "AI fix plan (optional, uses YOUR key)",
            "enum": [
              "none",
              "anthropic",
              "openai"
            ],
            "type": "string",
            "description": "Turn the findings into a prioritised fix plan and suggested product titles using your own Anthropic or OpenAI key. Off by default. Only issue counts and messages, plus up to 10 example product ids and titles, are sent.",
            "default": "none"
          },
          "aiApiKey": {
            "title": "AI API key",
            "type": "string",
            "description": "Your Anthropic or OpenAI API key. Stored encrypted by Apify, sent only to the provider's API, never logged or output."
          },
          "aiModel": {
            "title": "AI model (optional)",
            "type": "string",
            "description": "Defaults to a mid-priced model: claude-sonnet-5-5 (Anthropic) or gpt-4.1-mini (OpenAI). You pay the provider directly; pick any model your key can use."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}