{
  "openapi": "3.0.1",
  "info": {
    "title": "Keyword Rank Tracker — Google SERP Positions",
    "description": "Track a domain's Google organic keyword positions by location and device. Returns one timestamped row per keyword with target rank, ranking URL, top results, check URL, and provider task provenance. This measures observed SERP positions; it does not guarantee rankings or future traffic.",
    "version": "1.1",
    "x-build-id": "j4XqScWGLRetGtBUh"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/khadinakbar~keyword-rank-tracker/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-khadinakbar-keyword-rank-tracker",
        "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~keyword-rank-tracker/runs": {
      "post": {
        "operationId": "runs-sync-khadinakbar-keyword-rank-tracker",
        "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~keyword-rank-tracker/run-sync": {
      "post": {
        "operationId": "run-sync-khadinakbar-keyword-rank-tracker",
        "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": [
          "targetDomain",
          "keywords"
        ],
        "properties": {
          "targetDomain": {
            "title": "Target domain",
            "minLength": 1,
            "maxLength": 253,
            "type": "string",
            "description": "Domain to find in Google organic results, such as example.com. A URL is accepted and normalized to its hostname; subdomains count as matches."
          },
          "keywords": {
            "title": "Keywords",
            "minItems": 1,
            "maxItems": 100,
            "type": "array",
            "description": "One keyword or search phrase per line. The Actor checks each unique keyword and returns one row even when the target is not found within the selected depth.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 700
            }
          },
          "locationCode": {
            "title": "Google location code",
            "minimum": 1,
            "type": "integer",
            "description": "Google location code for the SERP check. The default 2840 is the United States; use a city or country location code for localized tracking.",
            "default": 2840
          },
          "languageCode": {
            "title": "Google language code",
            "pattern": "^[a-zA-Z]{2,5}$",
            "type": "string",
            "description": "Two-letter Google language code such as en, de, or fr.",
            "default": "en"
          },
          "device": {
            "title": "Device",
            "enum": [
              "desktop",
              "mobile"
            ],
            "type": "string",
            "description": "Device profile used for the Google SERP request. Mobile rankings can differ from desktop rankings.",
            "default": "desktop"
          },
          "os": {
            "title": "Operating system",
            "enum": [
              "windows",
              "macos",
              "android",
              "ios"
            ],
            "type": "string",
            "description": "Operating system paired with the device profile: windows or macos for desktop, android or ios for mobile.",
            "default": "windows"
          },
          "depth": {
            "title": "SERP depth",
            "minimum": 10,
            "maximum": 20,
            "type": "integer",
            "description": "How many Google result positions to retrieve per keyword. Use 10 for the first page or up to 20 for a bounded second-page check; larger depths are outside this Actor's margin-safe billing envelope.",
            "default": 10
          },
          "maxKeywords": {
            "title": "Maximum keywords",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Safety cap applied after duplicate removal. This keeps provider usage and the Apify run cost predictable.",
            "default": 25
          },
          "dataforSeoLogin": {
            "title": "Rank-provider login (legacy key)",
            "type": "string",
            "description": "Legacy input key for the managed rank-provider login. Prefer rankProviderLogin or Actor environment secrets."
          },
          "dataforSeoPassword": {
            "title": "Rank-provider password (legacy key)",
            "type": "string",
            "description": "Legacy input key for the managed rank-provider password. Prefer rankProviderPassword or Actor environment secrets."
          },
          "rankProviderLogin": {
            "title": "Rank-provider login",
            "type": "string",
            "description": "Optional managed rank-provider API login/email. Prefer Actor environment secrets when possible. Never written to output."
          },
          "rankProviderPassword": {
            "title": "Rank-provider API password",
            "type": "string",
            "description": "Optional managed rank-provider API password. Sent only in the Authorization header and never written to output."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}