{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Keyword Rank Tracker — Serpstat Alternative",
    "description": "Track current Google keyword rankings and compare target domains in the same SERP. Export positions, top domains, related queries, and source evidence; optionally cluster keywords by shared ranking domains.",
    "version": "1.0",
    "x-build-id": "eiZiCkPrruHMhDR5w"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/khadinakbar~serpstat-alternative/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-khadinakbar-serpstat-alternative",
        "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/khadinakbar~serpstat-alternative/runs": {
      "post": {
        "operationId": "runs-sync-khadinakbar-serpstat-alternative",
        "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/khadinakbar~serpstat-alternative/run-sync": {
      "post": {
        "operationId": "run-sync-khadinakbar-serpstat-alternative",
        "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"
        ],
        "properties": {
          "mode": {
            "title": "Workflow",
            "enum": [
              "rank_snapshot",
              "keyword_clustering"
            ],
            "type": "string",
            "description": "Choose the SEO workflow to run. Use rank_snapshot to check one target domain and optional competitors for each keyword, for example a campaign review. Use keyword_clustering to group two or more phrases by shared top Google domains. This is not a persistent project, backlink lookup, or whole-site crawler.",
            "default": "rank_snapshot"
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Enter the Google search phrases to observe, for example [\"technical seo audit\", \"seo audit tool\"]. Duplicate and blank phrases are removed, then the list is capped by Max keywords. Rank snapshots accept one or more phrases; keyword clustering needs at least two. This is not a list of domains or URLs.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 160
            }
          },
          "targetDomain": {
            "title": "Target domain",
            "type": "string",
            "description": "Enter the domain whose organic Google position should be checked in rank_snapshot mode, for example example.com. Required only for rank_snapshot and ignored for keyword_clustering. Protocols and www are normalized before matching. This is not a Serpstat project URL or a competitor list."
          },
          "competitorDomains": {
            "title": "Competitor domains",
            "type": "array",
            "description": "Optionally add up to five domains to compare in the same Google SERP, for example [\"moz.com\", \"semrush.com\"]. Each domain is matched against the results already collected for the keyword, so it does not add separate provider requests. Ignored for keyword_clustering. This is not a keyword list or a source of historical rankings.",
            "items": {
              "type": "string",
              "minLength": 3,
              "maxLength": 253
            },
            "default": []
          },
          "locationName": {
            "title": "Google location",
            "type": "string",
            "description": "Choose the Google location used for this observation, for example United States, London, England, or Austin, Texas. Defaults to United States and is sent with every keyword in the run. Use a geographic location rather than a domain or an ISO country code. The returned row records the provider-resolved location when available.",
            "default": "United States"
          },
          "languageCode": {
            "title": "Google language code",
            "type": "string",
            "description": "Use the two-to-five-letter Google language code for the result set, for example en, de, or es. Defaults to en and should match the chosen search location. This is a language code, not a country code or a full language name. Invalid codes return an actionable input outcome.",
            "default": "en"
          },
          "device": {
            "title": "Search device",
            "enum": [
              "desktop",
              "mobile"
            ],
            "type": "string",
            "description": "Choose the Google device profile used for each current SERP observation. desktop uses a Windows profile and mobile uses an Android profile. Defaults to desktop for campaign comparability. This is not a request to crawl a mobile website.",
            "default": "desktop"
          },
          "maxKeywords": {
            "title": "Max keywords",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Set the maximum unique phrases processed from Keywords, from 1 to 20. Defaults to 5 so a first run stays bounded; duplicate phrases do not consume the limit. Each processed phrase can create one billable SEO observation, plus Apify platform usage. This is not a result-depth control.",
            "default": 5
          },
          "clusterSimilarityThreshold": {
            "title": "Cluster similarity threshold",
            "minimum": 0.1,
            "maximum": 0.9,
            "type": "number",
            "description": "Set the minimum shared-top-domain Jaccard similarity for keyword_clustering, from 0.1 to 0.9. Defaults to 0.3, which groups phrases with meaningful SERP overlap while leaving distinct intents separate. Ignored for rank_snapshot. This is not a keyword-difficulty score or a Google ranking threshold.",
            "default": 0.3
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}