{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Search Scraper",
    "description": "Extract structured Google results across Search, Images, Videos, Places, Maps, News, Shopping, Scholar, Autocomplete, and Patents. Supports query/category batching, localization, pagination, retries, and clean dataset output.",
    "version": "0.0",
    "x-build-id": "m7GAOzrrk7DeXxRvI"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/api-ninja~google-search-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-api-ninja-google-search-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/api-ninja~google-search-scraper/runs": {
      "post": {
        "operationId": "runs-sync-api-ninja-google-search-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/api-ninja~google-search-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-api-ninja-google-search-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": [
          "query",
          "categories",
          "lang",
          "geo"
        ],
        "properties": {
          "query": {
            "title": "🔍 Query",
            "type": "string",
            "description": "Search query to process. The Actor runs this query across selected categories."
          },
          "categories": {
            "title": "🗂️ Search categories",
            "type": "array",
            "description": "Select which types of content to scrape for the query. Multiple categories are supported.",
            "items": {
              "type": "string",
              "enum": [
                "search",
                "images",
                "videos",
                "places",
                "maps",
                "news",
                "shopping",
                "scholar",
                "autocomplete",
                "patents"
              ],
              "enumTitles": [
                "🔍 Search",
                "🖼️ Images",
                "📺 Videos",
                "📍 Places",
                "🗺️ Maps",
                "📰 News",
                "🛍️ Shopping",
                "📚 Scholar",
                "🤖 Autocomplete",
                "🔬 Patents"
              ]
            },
            "default": [
              "search"
            ]
          },
          "resultsPerCategory": {
            "title": "🔢 Maximum Results per Category",
            "minimum": 10,
            "type": "integer",
            "description": "Maximum number of results to collect per category. Ignored when 'Parse all results' is enabled. Max average results per category is about 300.",
            "default": 100
          },
          "parseAllResults": {
            "title": "Parse All Available Results",
            "type": "boolean",
            "description": "When enabled, scrape all available content regardless of the maximum results limit.",
            "default": false
          },
          "autocorrect": {
            "title": "✍️ Autocorrect",
            "type": "boolean",
            "description": "Enable Google query autocorrection when supported by the selected category endpoint.",
            "default": true
          },
          "timeFrame": {
            "title": "🗓️ Date range",
            "enum": [
              "qdr:h",
              "qdr:d",
              "qdr:w",
              "qdr:m",
              "qdr:y"
            ],
            "type": "string",
            "description": "Date range for filtering results. Select a specific time period or leave empty for 'Anytime'. Date range is supported for Search, Images, Videos, News categories."
          },
          "lang": {
            "title": "🗣️ Language",
            "pattern": "^[a-z]{2}$",
            "type": "string",
            "description": "Two-letter language code for localized results (e.g., en, es, fr).",
            "default": "en"
          },
          "geo": {
            "title": "🌍 Country",
            "pattern": "^[A-Z]{2}$",
            "type": "string",
            "description": "Two-letter country code used for localization (e.g., US, GB, IN).",
            "default": "US"
          },
          "location": {
            "title": "📍 Location",
            "type": "string",
            "description": "Optional location hint for more specific local results, such as cities or neighborhoods."
          },
          "ll": {
            "title": "GPS position & zoom level",
            "pattern": "@(-?\\d+\\.\\d+),(-?\\d+\\.\\d+),(\\d+)z",
            "type": "string",
            "description": "This parameter allows you to adjust the focus of your search area by specifying GPS coordinates in this format: @latitude,longitude,zoom.  For example:@40.6973709,-74.1444871,11z.  You can find a search area by going to Google Maps, dragging around the map to your desired location, and then looking at the URL to get the coordinates.  The zoom level, while optional, is recommended for higher precision. It ranges from 3z (completely zoomed out) to 21z (completely zoomed in).  Setting the search area with this parameter only applies to search queries with q, not when you look up by placeId or cid.  This parameter is optional by default but required for paginated searches (page > 1)."
          },
          "placeId": {
            "title": "Place ID",
            "type": "string",
            "description": "This parameter allows you to search by Place ID. A Google Place ID uniquely identifies a location on Google Maps. Place IDs are available for most places, including businesses, landmarks, parks, and intersections. It's possible for the same place to have multiple different place IDs, and these IDs may change over time."
          },
          "cid": {
            "title": "CID",
            "type": "string",
            "description": "This parameter allows you to search by CID. A Google CID (Customer Identification) number is a unique identification number for a specific business listing on Google Maps."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}