{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Merchant Center Q&A Writer (question_and_answer feed)",
    "description": "Write the new Google Merchant Center question_and_answer attribute for every product from your feed or product pages. Answers use only facts from your page, Google's rules are checked, and you get a ready TSV/XML supplemental feed. Pay per product.",
    "version": "1.0",
    "x-build-id": "bbHzw5jE2L9hs5hEM"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/donrulezz~merchant-center-qa-writer/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-donrulezz-merchant-center-qa-writer",
        "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/donrulezz~merchant-center-qa-writer/runs": {
      "post": {
        "operationId": "runs-sync-donrulezz-merchant-center-qa-writer",
        "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/donrulezz~merchant-center-qa-writer/run-sync": {
      "post": {
        "operationId": "run-sync-donrulezz-merchant-center-qa-writer",
        "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": {
          "feedUrl": {
            "title": "Product feed (URL or file)",
            "type": "string",
            "description": "Your Merchant Center feed: paste its URL or upload the file. XML (RSS/Atom with g: fields) or TSV/CSV with an 'id' column (a published Google Sheets CSV link works). Ids, titles, descriptions, highlights and product details come from here, so the supplemental feed matches your products exactly."
          },
          "productUrls": {
            "title": "Product page URLs",
            "type": "array",
            "description": "Or/also: product pages, one per line. To set the Merchant Center id yourself, write 'id, URL' (for example 'SKU-123, https://shop.example/p/123'). Without an id the page's SKU (or the URL) is used.",
            "items": {
              "type": "string"
            }
          },
          "pairsPerProduct": {
            "title": "Q&A pairs per product",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "How many question/answer pairs to write (Google allows up to 30). Fewer are returned when the page doesn't have enough facts: answers are never padded or guessed.",
            "default": 6
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "'auto' writes in the product page's language. Or name one, e.g. English, German, Español. Use the language of your feed.",
            "default": "auto"
          },
          "readProductPages": {
            "title": "Read product pages for more facts",
            "type": "boolean",
            "description": "Feed mode: also open each product's link to read specs, on-page FAQs and details that aren't in the feed (recommended: Google asks you not to repeat the title, description, highlights or product details).",
            "default": true
          },
          "avoidRepeatingFeedText": {
            "title": "Drop answers that only repeat the title or description",
            "type": "boolean",
            "description": "Google's best practice: Q&A shouldn't repeat data already in title, description, product_detail or product_highlight.",
            "default": true
          },
          "groupVariants": {
            "title": "One answer set per variant group",
            "type": "boolean",
            "description": "Variants with the same item_group_id share one set of Q&A (written and charged once, output for every variant id).",
            "default": true
          },
          "idSource": {
            "title": "Id for product URLs without an id",
            "enum": [
              "auto",
              "shopify",
              "sku",
              "gtin",
              "mpn",
              "url"
            ],
            "type": "string",
            "description": "Which value becomes the feed id when you give only a URL. It must match the id in your main Merchant Center feed. 'Auto' uses Shopify Google & YouTube app ids on Shopify stores (one row per variant: shopify_US_<product id>_<variant id>) and the page's SKU elsewhere (the URL when there is no SKU).",
            "default": "auto"
          },
          "shopifyCountry": {
            "title": "Shopify target country (for Shopify ids)",
            "type": "string",
            "description": "Two-letter country in your Shopify Merchant Center ids, e.g. US in shopify_US_123_456. Check one product id in Merchant Center.",
            "default": "US"
          },
          "maxProducts": {
            "title": "Max products",
            "minimum": 0,
            "type": "integer",
            "description": "Optional cap on how many products (variant groups) to process; 0 = all. Try 10 first.",
            "default": 0
          },
          "maxConcurrency": {
            "title": "Products in parallel",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "At most 2 pages are loaded at once per website, whatever this number is.",
            "default": 4
          },
          "deepseekApiKey": {
            "title": "Your DeepSeek API key (optional)",
            "type": "string",
            "description": "Optional. With your own key the AI step is paid to DeepSeek directly. Without it, the AI step runs through Apify's OpenRouter actor and the AI usage is billed to your Apify account at OpenRouter's price (a fraction of a cent per product on paid plans; Apify charges 10x on its free plan)."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}