{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Search Results Scraper – SERP API, AI Overview & AI Mode",
    "description": "Scrape Google search results (SERP) for any keyword, country, language or city: organic results with real URLs, ads, AI Overview, People Also Ask, related searches, local pack and top stories, plus Google AI Mode answers. Licensed data, no blocks, $1.50 per 1,000 pages.",
    "version": "0.1",
    "x-build-id": "6ddLiv9cJzdcflrN8"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/rt-solutions~google-search-results-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-rt-solutions-google-search-results-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/rt-solutions~google-search-results-scraper/runs": {
      "post": {
        "operationId": "runs-sync-rt-solutions-google-search-results-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/rt-solutions~google-search-results-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-rt-solutions-google-search-results-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",
        "required": [
          "queries"
        ],
        "properties": {
          "queries": {
            "title": "Search terms or Google URLs",
            "type": "string",
            "description": "One per line. Plain keywords (any language, Google operators like site: or \"quotes\" work) or Google search links (google.com/search?q=…; their gl= and hl= are used)."
          },
          "maxPagesPerQuery": {
            "title": "Pages per search",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Each page = 10 organic results. Charged per page actually returned.",
            "default": 1
          },
          "countryCode": {
            "title": "Country",
            "type": "string",
            "description": "Two-letter Google country code (us, gb, fr, de, in, br, ae…). 213 countries.",
            "default": "us"
          },
          "languageCode": {
            "title": "Language",
            "type": "string",
            "description": "Google interface language (en, fr, de, es, ar, ja, zh-CN…). Empty = main language of the country."
          },
          "location": {
            "title": "City or region (optional)",
            "type": "string",
            "description": "Local results for a precise place, Google format: \"New York,New York,United States\", \"Paris,Ile-de-France,France\", \"London,England,United Kingdom\"."
          },
          "mobileResults": {
            "title": "Mobile results",
            "type": "boolean",
            "description": "Get the results a phone user sees instead of desktop.",
            "default": false
          },
          "site": {
            "title": "Only this website",
            "type": "string",
            "description": "Restrict results to one domain (adds site:example.com)."
          },
          "forceExactMatch": {
            "title": "Exact match",
            "type": "boolean",
            "description": "Put each search between quotes.",
            "default": false
          },
          "quickDateRange": {
            "title": "Date range",
            "type": "string",
            "description": "Only recent pages: h (hour), d (day), w (week), m (month), y (year), optionally followed by a number — e.g. d7 = last 7 days, m6 = last 6 months."
          },
          "includeAiOverview": {
            "title": "Load full AI Overviews",
            "type": "boolean",
            "description": "Also load AI Overviews that Google shows with a delay (full text + sources). Charged only when an AI Overview is found. Without this option, AI Overviews shown instantly are still included free.",
            "default": false
          },
          "includeAiMode": {
            "title": "Also get the Google AI Mode answer",
            "type": "boolean",
            "description": "One extra AI Mode answer per search (full answer text + cited sources). Charged separately per answer.",
            "default": false
          },
          "flattenResults": {
            "title": "One row per organic result",
            "type": "boolean",
            "description": "Easier for Excel/CSV: one row per organic result instead of one item per results page.",
            "default": false
          },
          "dataForSeoLogin": {
            "title": "Your DataForSEO login (free Apify plan only)",
            "type": "string",
            "description": "Only needed on the Apify free plan after your free trial run. Paid Apify plans need no key."
          },
          "dataForSeoPassword": {
            "title": "Your DataForSEO API password",
            "type": "string",
            "description": "From app.dataforseo.com → API Access."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}