{
  "openapi": "3.0.1",
  "info": {
    "title": "AI Keyword Clustering Tool - Topical Clustering + Bulk SERP",
    "description": "Bulk AI keyword clustering & topical clustering map with Google volume + CPC + 12-month trend + live SERP-validated MERGE/SPLIT recs. 1000 keywords/batch, keyword grouping for pillar pages. Ahrefs/Semrush/MarketMuse/Frase alternative - pay per 1000 KW, no subscription, no API keys.",
    "version": "0.0",
    "x-build-id": "qMQkDmd5cZpwK81RD"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/doesaiknow~ai-keyword-clustering-tool-topical-clustering-bulk-serp/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-doesaiknow-ai-keyword-clustering-tool-topical-clustering-bulk-serp",
        "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/doesaiknow~ai-keyword-clustering-tool-topical-clustering-bulk-serp/runs": {
      "post": {
        "operationId": "runs-sync-doesaiknow-ai-keyword-clustering-tool-topical-clustering-bulk-serp",
        "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/doesaiknow~ai-keyword-clustering-tool-topical-clustering-bulk-serp/run-sync": {
      "post": {
        "operationId": "run-sync-doesaiknow-ai-keyword-clustering-tool-topical-clustering-bulk-serp",
        "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": [
          "keywords",
          "businessContext"
        ],
        "properties": {
          "keywords": {
            "title": "Keywords (1–1000 per batch)",
            "minItems": 1,
            "maxItems": 1000,
            "type": "array",
            "description": "Flat list of seed keywords to research and cluster. Submit up to 1000 per batch — the full clustering benefit kicks in around 200+ keywords (below that you'll see fewer clusters, and seed-enrichment expansion runs only when you provide fewer than 200). Mixed-language batches work but produce stronger clusters when all keywords share a language. Each keyword: 1–200 chars, ASCII or Unicode. Duplicates (case-insensitive) are removed.",
            "items": {
              "type": "string"
            }
          },
          "businessContext": {
            "title": "Business context (REQUIRED — unlocks CORE / OUTER classification)",
            "minLength": 1,
            "maxLength": 2000,
            "type": "string",
            "description": "1–3 sentences describing what your business does, who you serve, and what you sell. This is the Source Context: every cluster gets a CORE / OUTER classification — CORE = clusters whose central entity is the main offering or a direct derivative (build pillar pages); OUTER = clusters tangential to the core offering that still build topical authority (supporting articles for E-E-A-T). Required in v1.0 so every run yields a real topical map."
          },
          "country": {
            "title": "Country / market",
            "enum": [
              "us",
              "gb",
              "ca",
              "au",
              "de",
              "fr",
              "es",
              "it",
              "pl",
              "nl",
              "se",
              "no",
              "dk",
              "fi",
              "br",
              "pt",
              "jp",
              "in",
              "mx",
              "ie",
              "at",
              "ch",
              "be",
              "cz",
              "ro",
              "ae",
              "ar",
              "bg",
              "cl",
              "co",
              "ee",
              "eg",
              "gr",
              "hr",
              "hu",
              "id",
              "il",
              "kr",
              "lt",
              "lv",
              "my",
              "ng",
              "nz",
              "pe",
              "ph",
              "pk",
              "sa",
              "sg",
              "sk",
              "th",
              "tr",
              "ua",
              "vn",
              "za"
            ],
            "type": "string",
            "description": "ISO-3166 country code (lowercase, 2 chars). Drives Google Ads search volume + CPC + SERP locale routing. 53 countries supported. Unknown codes silently fall back to US / English.",
            "default": "us"
          },
          "language": {
            "title": "Language (optional)",
            "enum": [
              "en",
              "pl",
              "de",
              "fr",
              "es",
              "it",
              "pt",
              "nl",
              "sv",
              "no",
              "da",
              "fi",
              "ja",
              "ko",
              "zh",
              "tr",
              "ar",
              "ru",
              "uk",
              "cs",
              "hu",
              "ro",
              "el"
            ],
            "type": "string",
            "description": "ISO-639 lowercase 2-char language code. If omitted, the language tied to `country` is used. Set explicitly when you want EN keywords run against a non-EN volume locale (e.g. `country=pl`, `language=en`)."
          },
          "enableSerpValidation": {
            "title": "Enable SERP validation + MERGE recommendations",
            "type": "boolean",
            "description": "When TRUE, every cluster's canonical_query is run through a live Google SERP for its top-10 results; cluster pairs with ≥50% URL overlap get a MERGE recommendation (Google ranks them as the same intent). Adds ~1–2 min runtime per 50 clusters and is already priced into the per-batch fee — no upcharge.",
            "default": true
          },
          "enableSplitCheck": {
            "title": "Enable SPLIT coherence check",
            "type": "boolean",
            "description": "When TRUE, clusters with more than 10 members are checked for internal SERP coherence: a random sample of members has its SERP compared to the cluster's canonical-query SERP, and clusters with <30% mean URL overlap get a SPLIT recommendation (the cluster mixes distinct intents). Uses a few extra SERP calls, already priced in.",
            "default": true
          },
          "minClusterSize": {
            "title": "Min cluster size (optional, defaults to 2)",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Minimum keywords per cluster. Keywords that don't fit a cluster of this size are marked as outliers (cluster_id = -1). Increase to 3+ for tighter, fewer clusters; set to 1 to keep every keyword in some cluster.",
            "default": 2
          },
          "maxClusters": {
            "title": "Max clusters (optional, auto-tuned by default)",
            "minimum": 5,
            "maximum": 200,
            "type": "integer",
            "description": "Hard cap on the number of clusters produced. Default is auto-tuned via silhouette score (typically 50–80 for 1000 keywords). Set explicitly for a strict pillar-page count when planning editorial."
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}