{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Search Results Scraper (SERP, Rank Tracking)",
    "description": "Google's organic search results for any keyword: position, title, link, snippet, date and sitelinks for 44 countries, with rank change since your last run and an only-new mode. One free summary row per query carries People also ask, the AI Overview and related searches.",
    "version": "0.1",
    "x-build-id": "4UGix5TCEKAwQddiM"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/locaihost~google-search/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-locaihost-google-search",
        "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/locaihost~google-search/runs": {
      "post": {
        "operationId": "runs-sync-locaihost-google-search",
        "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/locaihost~google-search/run-sync": {
      "post": {
        "operationId": "run-sync-locaihost-google-search",
        "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": "Queries",
            "type": "array",
            "description": "What to search on Google, one per line. Paste up to 1,000. A pasted Google results link (google.com/search?q=...) works too: its page, date filter, country and language are read from the link.",
            "items": {
              "type": "string"
            }
          },
          "country": {
            "title": "Country",
            "enum": [
              "us",
              "gb",
              "ca",
              "au",
              "nz",
              "ie",
              "in",
              "sg",
              "my",
              "ph",
              "za",
              "ng",
              "ae",
              "de",
              "at",
              "ch",
              "fr",
              "be",
              "es",
              "mx",
              "ar",
              "co",
              "cl",
              "it",
              "pt",
              "br",
              "nl",
              "se",
              "dk",
              "no",
              "fi",
              "pl",
              "cz",
              "ro",
              "gr",
              "tr",
              "il",
              "jp",
              "kr",
              "tw",
              "hk",
              "id",
              "th",
              "vn"
            ],
            "type": "string",
            "description": "The country searched from: results are what a visitor there sees. A pasted link with its own gl parameter overrides this for that query.",
            "default": "us"
          },
          "language": {
            "title": "Language",
            "enum": [
              "",
              "en",
              "es",
              "de",
              "fr",
              "it",
              "pt-BR",
              "pt-PT",
              "nl",
              "sv",
              "da",
              "no",
              "fi",
              "pl",
              "cs",
              "ro",
              "el",
              "tr",
              "he",
              "ar",
              "hi",
              "ja",
              "ko",
              "zh-CN",
              "zh-TW",
              "zh-HK",
              "id",
              "ms",
              "th",
              "vi",
              "tl"
            ],
            "type": "string",
            "description": "The interface language Google answers in. Country default uses the country's own language.",
            "default": ""
          },
          "maxPagesPerQuery": {
            "title": "Pages per query",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many results pages to read per query, 10 results a page (2 pages returns up to 20 results). Stops early when Google has no more.",
            "default": 1
          },
          "onlyNew": {
            "title": "Only new results",
            "type": "boolean",
            "description": "Skip results this Actor already returned for the same query, country and filters in an earlier run. Skipped results are counted in the free summary row and never charged. Good for a daily schedule.",
            "default": false
          },
          "site": {
            "title": "Only this website",
            "type": "string",
            "description": "Limit every query to one domain, such as example.com. Leave empty to search the whole web."
          },
          "dateRange": {
            "title": "Published within",
            "enum": [
              "any",
              "hour",
              "day",
              "week",
              "month",
              "year"
            ],
            "type": "string",
            "description": "Only pages Google dates within this period. A pasted link with its own tbs date filter overrides this for that query.",
            "default": "any"
          },
          "exactMatch": {
            "title": "Exact match",
            "type": "boolean",
            "description": "Search for the exact phrase: every query is wrapped in quotes.",
            "default": false
          },
          "excludeWords": {
            "title": "Exclude words",
            "type": "string",
            "description": "Words to leave out, space or comma separated: each is added to the query as -word."
          },
          "fileType": {
            "title": "File type",
            "type": "string",
            "description": "Only one kind of document, such as pdf, xls or ppt (added to the query as filetype:pdf)."
          },
          "includeSerpFeatures": {
            "title": "Include People also ask, AI Overview and related searches",
            "type": "boolean",
            "description": "Carry what Google shows around the results in the query's free summary row. Turn off to keep summaries bare.",
            "default": true
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}