{
  "openapi": "3.0.1",
  "info": {
    "title": "Google SERP Rank Tracker Scraper",
    "description": "Track public Google Search rankings and visible SERP features for target domains across search phrases and pages.",
    "version": "1.0",
    "x-build-id": "WAt8GdJLT9ackG7MO"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/googleapi~google-serp-rank-tracker-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-googleapi-google-serp-rank-tracker-scraper",
        "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/googleapi~google-serp-rank-tracker-scraper/runs": {
      "post": {
        "operationId": "runs-sync-googleapi-google-serp-rank-tracker-scraper",
        "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/googleapi~google-serp-rank-tracker-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-googleapi-google-serp-rank-tracker-scraper",
        "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": {
          "queries": {
            "title": "Search phrases",
            "maxItems": 500,
            "type": "array",
            "description": "Search phrases to track. Ignored when Start URLs are provided. Each phrase supports up to 200 characters; at most 500 are accepted before the global Maximum searches limit is applied.",
            "items": {
              "type": "string",
              "maxLength": 200
            }
          },
          "query": {
            "title": "Single search phrase",
            "maxLength": 200,
            "type": "string",
            "description": "Optional single-phrase alias for Search phrases."
          },
          "targetDomains": {
            "title": "Target domains",
            "maxItems": 100,
            "uniqueItems": true,
            "type": "array",
            "description": "Domains to find in organic Google results. Match includes the exact hostname or its subdomains. Protocols and URL paths are not needed. At most 100 domains are accepted.",
            "items": {
              "type": "string",
              "maxLength": 253
            }
          },
          "targetDomain": {
            "title": "Single target domain",
            "maxLength": 253,
            "type": "string",
            "description": "Optional single-domain alias for Target domains."
          },
          "startUrls": {
            "title": "Google Search URLs",
            "maxItems": 100,
            "type": "array",
            "description": "Optional Google /search URLs with a q parameter. When provided, these URLs take precedence over Search phrases; target domains and pagination limits still apply.",
            "items": {
              "type": "object",
              "properties": {
                "url": {
                  "title": "Google Search URL",
                  "description": "HTTPS Google Search results URL such as https://www.google.com/search?q=example.",
                  "type": "string"
                }
              },
              "required": [
                "url"
              ],
              "additionalProperties": false
            }
          },
          "language": {
            "title": "Search language",
            "pattern": "^[A-Za-z]{2,3}(-[A-Za-z]{2})?$",
            "type": "string",
            "description": "Two- or three-letter language code, optionally followed by a region. Used for generated searches; a language already present in a Google Search URL is preserved.",
            "default": "en"
          },
          "country": {
            "title": "Search country",
            "pattern": "^[A-Za-z]{2}$",
            "type": "string",
            "description": "Two-letter country code used for generated searches. A country already present in a Google Search URL is preserved.",
            "default": "us"
          },
          "page": {
            "title": "Starting page",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "One-based page number for generated searches. Google page offsets use the requested results-per-page setting; explicit start offsets in Google Search URLs take precedence.",
            "default": 1
          },
          "maxItems": {
            "title": "Maximum searches",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Global maximum number of distinct search phrases or Google Search URLs to process in this run.",
            "default": 25
          },
          "maxPages": {
            "title": "Maximum pages per search",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum Google result pages fetched for each search. The actor stops sooner if Google exposes no next page or the result page is empty.",
            "default": 10
          },
          "maxOrganicResultsPerPage": {
            "title": "Maximum organic results per page",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Maximum organic result cards retained per page. Actual Google result counts may be lower and are never padded.",
            "default": 10
          },
          "renderJavaScript": {
            "title": "Render public results",
            "type": "boolean",
            "description": "Use ordinary Chromium for each requested public Search page and expand the available main AI Overview. Default-off; challenges remain boundaries. GOOGLE_SERP supports static HTTP only.",
            "default": false
          },
          "includePageText": {
            "title": "Include visible page text",
            "type": "boolean",
            "description": "Include the complete cleaned visible text of fetched search pages.",
            "default": false
          },
          "requestTimeoutSecs": {
            "title": "Request timeout (seconds)",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "Maximum time for each Google Search page request.",
            "default": 20
          },
          "requestDelayMs": {
            "title": "Delay between pages (milliseconds)",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Pause between pages for the same search. This is pacing only and does not bypass Google access controls.",
            "default": 1000
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional Apify proxy configuration. Apify proxy routing is used only when configured; residential proxy groups can be selected when available on your account."
          },
          "includePaaAnswers": {
            "title": "Expand People also ask",
            "type": "boolean",
            "description": "Expand a bounded number of public same-page answer disclosures with full available text and clean HTML. Requires Render public results; no publisher pages are fetched.",
            "default": false
          },
          "maxPaaAnswers": {
            "title": "Maximum answers per page",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Maximum distinct initial question disclosures expanded per page. Newly generated follow-up questions are not recursively opened.",
            "default": 4
          },
          "maxRetries": {
            "title": "Maximum request retries",
            "minimum": 0,
            "maximum": 3,
            "type": "integer",
            "description": "Retries for transient HTTP transport failures only. Explicit source challenges, unsafe redirects and oversized responses are not retried.",
            "default": 1
          },
          "rankingHistoryStoreName": {
            "title": "Ranking history store",
            "pattern": "^[a-z0-9][a-z0-9-]{0,62}$",
            "type": "string",
            "description": "Named Apify key-value store used across runs for genuine prior ranking observations. Comparisons require the same phrase, domain, locale, filters and configured page range. Missing or partial source responses never overwrite history.",
            "default": "google-serp-rank-tracker-history"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}