{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Position Checker — Keyword Rank Snapshot",
    "description": "Check keyword ranking positions from SERP snapshots or approved live SERP collection with country/language options and rank evidence.",
    "version": "1.0",
    "x-build-id": "QmwztjFpwryTq1XhG"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/junipr~google-position-checker/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-junipr-google-position-checker",
        "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/junipr~google-position-checker/runs": {
      "post": {
        "operationId": "runs-sync-junipr-google-position-checker",
        "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/junipr~google-position-checker/run-sync": {
      "post": {
        "operationId": "run-sync-junipr-google-position-checker",
        "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": "List of keywords to check Google rankings for. Up to 1,000 keywords per run.",
            "default": [
              "apify web scraper"
            ],
            "items": {
              "type": "string"
            }
          },
          "domain": {
            "title": "Target Domain",
            "type": "string",
            "description": "Domain to find in search results (e.g., apify.com). Do not include https:// or trailing slashes. Leave empty to return top-ranked result for each keyword.",
            "default": ""
          },
          "maxPosition": {
            "title": "Max Position to Check",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum SERP position to check (1–100). Positions beyond this are not checked.",
            "default": 3
          },
          "country": {
            "title": "Country",
            "type": "string",
            "description": "Google country code for localised results (ISO 3166-1 alpha-2, e.g., us, gb, de, fr, au). Determines which Google domain is queried.",
            "default": "us"
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Search language code (ISO 639-1, e.g., en, es, fr, de, ja). Affects the language of results returned.",
            "default": "en"
          },
          "location": {
            "title": "Location",
            "type": "string",
            "description": "Geo-specific location for hyper-area results (e.g., New York, NY or London, England). Uses Google's uule parameter. Leave empty for country-level results.",
            "default": ""
          },
          "device": {
            "title": "Device Type",
            "enum": [
              "desktop",
              "mobile"
            ],
            "type": "string",
            "description": "Device type to simulate when fetching search results. Mobile and desktop rankings can differ significantly.",
            "default": "desktop"
          },
          "includeSerp": {
            "title": "Include Full SERP",
            "type": "boolean",
            "description": "Include all ranked results in the output (not just the target domain's position). Useful for full competitive analysis.",
            "default": false
          },
          "includeFeaturedSnippet": {
            "title": "Detect Featured Snippet",
            "type": "boolean",
            "description": "Detect and return featured snippet data — including which domain owns the snippet at position 0.",
            "default": true
          },
          "includePeopleAlsoAsk": {
            "title": "Extract People Also Ask",
            "type": "boolean",
            "description": "Extract People Also Ask questions from the search results page.",
            "default": true
          },
          "includeLocalPack": {
            "title": "Detect area Pack",
            "type": "boolean",
            "description": "Detect and return Google Maps / area pack results if present (business name, address, rating).",
            "default": false
          },
          "includeAds": {
            "title": "Include Paid Ads",
            "type": "boolean",
            "description": "Include Google paid ads (sponsored) results in the SERP data and flag them as isAd: true.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Proxy settings. Residential proxies are strongly recommended — Google blocks datacenter IPs for search queries.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          },
          "maxChargeUsd": {
            "title": "Max Charge USD",
            "minimum": 0,
            "type": "number",
            "description": "Stop before paid output would exceed the configured max charge.",
            "default": 50
          },
          "debugMode": {
            "title": "Debug Mode",
            "type": "boolean",
            "description": "Write extra free diagnostics to the key-value store.",
            "default": false
          },
          "saveRawHtmlToKvs": {
            "title": "Save Raw HTML to KVS",
            "type": "boolean",
            "description": "Save raw snapshots as free debug artifacts when enabled.",
            "default": false
          },
          "requestTimeout": {
            "title": "Request Timeout (ms)",
            "minimum": 1000,
            "maximum": 120000,
            "type": "integer",
            "description": "Maximum time to wait for a request or page load.",
            "default": 30000
          },
          "maxRetries": {
            "title": "Max Retries",
            "minimum": 0,
            "maximum": 3,
            "type": "integer",
            "description": "Maximum retry attempts per source.",
            "default": 1
          },
          "maxConcurrency": {
            "title": "Max Concurrency",
            "minimum": 1,
            "maximum": 3,
            "type": "integer",
            "description": "Maximum concurrent requests. High-risk marketplace and SERP actors default to a low value.",
            "default": 1
          },
          "maxQueries": {
            "title": "Max Queries",
            "type": "integer",
            "description": "Run setting used to control cost, runtime, and output size."
          },
          "serpMode": {
            "title": "SERP Mode",
            "enum": [
              "suppliedSnapshot",
              "provider"
            ],
            "type": "string",
            "description": "Use suppliedSnapshot by default. Provider mode requires an approved SERP provider key. Direct live Google scraping is not the default.",
            "default": "suppliedSnapshot"
          },
          "suppliedSerpSnapshots": {
            "title": "Supplied SERP Snapshots",
            "type": "array",
            "description": "SERP snapshot objects with keyword and html/providerJson fields.",
            "items": {
              "type": "object"
            },
            "default": []
          },
          "serpProviderApiKey": {
            "title": "SERP Provider API Key",
            "type": "string",
            "description": "API key for approved provider mode."
          },
          "sourceMode": {
            "title": "Source Mode",
            "enum": [
              "livePublic",
              "suppliedSnapshot",
              "provider"
            ],
            "type": "string",
            "description": "Use public live targets, supplied snapshots, or provider-backed source data when supported.",
            "default": "livePublic"
          },
          "suppliedSnapshotHtml": {
            "title": "Supplied Snapshot HTML",
            "type": "string",
            "description": "Optional HTML snapshot for deterministic public-data extraction tests or controlled source capture."
          },
          "suppliedSnapshotJson": {
            "title": "Supplied Snapshot JSON",
            "type": "string",
            "description": "Optional JSON snapshot/provider response for deterministic public-data extraction tests or controlled source capture."
          },
          "suppliedSnapshotText": {
            "title": "Supplied Snapshot Text",
            "type": "string",
            "description": "Optional plain text snapshot for text-analysis actors."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}