{
  "openapi": "3.0.1",
  "info": {
    "title": "SiteVerdict — Keyword Clustering Tool (SERP, AI, GSC)",
    "description": "Turn keyword lists or a Search Console export into topic clusters (one cluster = one page). Free built-in lexical grouping needs no key. Optional SERP-overlap or embedding grouping with your own Serper/SerpApi or OpenAI key. Intent labels, pillar map, cannibalisation flags, CSV export.",
    "version": "1.1",
    "x-build-id": "gdUKncanB0m9x7g9n"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/siteverdict~siteverdict-keyword-clusterer/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-siteverdict-siteverdict-keyword-clusterer",
        "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-keyword-clusterer/runs": {
      "post": {
        "operationId": "runs-sync-siteverdict-siteverdict-keyword-clusterer",
        "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-keyword-clusterer/run-sync": {
      "post": {
        "operationId": "run-sync-siteverdict-siteverdict-keyword-clusterer",
        "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": {
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "One per line. Optional volume after a comma or tab: 'best running shoes, 4400'. Max 20,000.",
            "items": {
              "type": "string"
            }
          },
          "csvText": {
            "title": "Or paste a CSV",
            "type": "string",
            "description": "Search Console 'Queries' export, Semrush/Ahrefs export or any CSV with a keyword column. Columns are detected automatically."
          },
          "csvUrl": {
            "title": "Or CSV URL",
            "type": "string",
            "description": "Public https:// link to a CSV file (e.g. a published Google Sheet as CSV)."
          },
          "method": {
            "title": "Clustering method",
            "enum": [
              "auto",
              "serp",
              "embeddings",
              "lexical"
            ],
            "type": "string",
            "description": "auto = SERP if a SERP key is given, else embeddings if an OpenAI key is given, else lexical.",
            "default": "auto"
          },
          "serpProvider": {
            "title": "SERP API provider",
            "enum": [
              "serper",
              "serpapi"
            ],
            "type": "string",
            "description": "Your SERP API account.",
            "default": "serper"
          },
          "serpApiKey": {
            "title": "SERP API key",
            "type": "string",
            "description": "Your own Serper.dev or SerpApi key (one search per keyword; results cached 30 days). Stored encrypted as an Apify secret, never logged or written to the output."
          },
          "country": {
            "title": "Country (SERP)",
            "type": "string",
            "description": "2-letter country code for SERPs, e.g. gb, us, de.",
            "default": "gb"
          },
          "language": {
            "title": "Language (SERP)",
            "type": "string",
            "description": "Language code, e.g. en, de.",
            "default": "en"
          },
          "serpOverlap": {
            "title": "SERP overlap needed (of top 10)",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many of the top-10 URLs two keywords must share to be one page. 3 is a common default; 4-5 = tighter clusters.",
            "default": 3
          },
          "useSerpCache": {
            "title": "Reuse cached SERPs (30 days)",
            "type": "boolean",
            "description": "Cache SERPs in the named store 'siteverdict-keyword-serp-cache' so re-runs do not pay your SERP API twice.",
            "default": true
          },
          "openaiApiKey": {
            "title": "OpenAI API key (embeddings)",
            "type": "string",
            "description": "Your own OpenAI key for embedding clustering. Stored encrypted as an Apify secret, never logged or written to the output."
          },
          "embeddingModel": {
            "title": "Embedding model",
            "type": "string",
            "description": "OpenAI embedding model.",
            "default": "text-embedding-3-small"
          },
          "similarityThreshold": {
            "title": "Embedding similarity threshold",
            "minimum": 0.5,
            "maximum": 0.99,
            "type": "number",
            "description": "Cosine similarity to the cluster head (0.5-0.99). Higher = tighter clusters.",
            "default": 0.82
          },
          "lexicalThreshold": {
            "title": "Lexical similarity threshold",
            "minimum": 0.1,
            "maximum": 1,
            "type": "number",
            "description": "Weighted word overlap (0.1-1). Higher = tighter clusters.",
            "default": 0.5
          },
          "brandTerms": {
            "title": "Brand terms",
            "type": "array",
            "description": "Your brand names (and competitors') so branded keywords get navigational intent.",
            "items": {
              "type": "string"
            }
          },
          "minVolume": {
            "title": "Minimum volume / impressions",
            "minimum": 0,
            "maximum": 1000000000,
            "type": "integer",
            "description": "Drop keywords below this demand.",
            "default": 0
          },
          "aiLabels": {
            "title": "AI cluster labels + briefs (your own key)",
            "type": "boolean",
            "description": "Name each cluster and write a one-line page brief with your own Anthropic/OpenAI key.",
            "default": false
          },
          "aiProvider": {
            "title": "AI provider",
            "enum": [
              "anthropic",
              "openai"
            ],
            "type": "string",
            "description": "Which API your key belongs to.",
            "default": "anthropic"
          },
          "aiApiKey": {
            "title": "AI API key",
            "type": "string",
            "description": "Your own API key (we never use ours). Stored encrypted as an Apify secret, never logged or written to the output."
          },
          "aiModel": {
            "title": "AI model (optional)",
            "type": "string",
            "description": "Leave empty for a fast, low-cost default (claude-haiku-4-5 / gpt-4.1-mini)."
          },
          "sampleMode": {
            "title": "Sample mode (demo data, free)",
            "type": "boolean",
            "description": "Run on a built-in demo with planted problems. No network requests and nothing charged. Use it to see the output format.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}