{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Search API (from $0.17 / 1,000 pages)",
    "description": "Google search results as JSON from $0.17 per 1,000 result pages of up to 10 results. Rich mode adds People Also Ask, top stories, local pack, shopping and videos at no extra cost. Batch runs or a live HTTP API.",
    "version": "0.1",
    "x-build-id": "cdheNpQfgr8JjTdgJ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/serpdata~google-search-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-serpdata-google-search-api",
        "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/serpdata~google-search-api/runs": {
      "post": {
        "operationId": "runs-sync-serpdata-google-search-api",
        "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/serpdata~google-search-api/run-sync": {
      "post": {
        "operationId": "run-sync-serpdata-google-search-api",
        "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 queries",
            "type": "array",
            "description": "One Google search per line.",
            "items": {
              "type": "string"
            }
          },
          "mode": {
            "title": "Result detail",
            "enum": [
              "simple",
              "rich"
            ],
            "type": "string",
            "description": "simple returns organic results only. rich also returns People Also Ask, top stories, the local pack, shopping, images, videos and related searches.",
            "default": "simple"
          },
          "maxPagesPerQuery": {
            "title": "Pages per query",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many pages of ten results to fetch for each query. Each page is charged as one result.",
            "default": 1
          },
          "gl": {
            "title": "Country",
            "pattern": "^[A-Za-z]{2}$",
            "type": "string",
            "description": "Two-letter country code, such as gb. Required when a location is set."
          },
          "uule": {
            "title": "City (UULE)",
            "pattern": "^w\\+CAIQIC[A-Za-z0-9+/_-]+={0,2}$",
            "type": "string",
            "description": "Canonical-name Google UULE starting with w+, such as w+CAIQICIdTG9uZG9uLEVuZ2xhbmQsVW5pdGVkIEtpbmdkb20= for London. Set the matching country too."
          },
          "restrictToCountry": {
            "title": "Only pages from country",
            "pattern": "^[A-Za-z]{2}$",
            "type": "string",
            "description": "Two-letter country code, such as de. Unlike Country, which localizes results, this leaves out pages from other countries. Sent to Google as cr=countryDE."
          },
          "searchLanguage": {
            "title": "Search language",
            "enum": [
              "",
              "ar",
              "bg",
              "ca",
              "cs",
              "da",
              "de",
              "el",
              "en",
              "es",
              "et",
              "fi",
              "fr",
              "hr",
              "hu",
              "id",
              "is",
              "it",
              "iw",
              "ja",
              "ko",
              "lt",
              "lv",
              "nl",
              "no",
              "pl",
              "pt",
              "ro",
              "ru",
              "sk",
              "sl",
              "sr",
              "sv",
              "th",
              "tr",
              "uk",
              "zh-CN",
              "zh-TW"
            ],
            "type": "string",
            "description": "Only return pages written in this language. Sent to Google as lr."
          },
          "languageCode": {
            "title": "Interface language",
            "enum": [
              "",
              "af",
              "sq",
              "am",
              "ar",
              "hy",
              "az",
              "eu",
              "be",
              "bn",
              "bs",
              "bg",
              "ca",
              "zh-CN",
              "zh-TW",
              "hr",
              "cs",
              "da",
              "nl",
              "en",
              "eo",
              "et",
              "fo",
              "fil",
              "fi",
              "fr",
              "fy",
              "gl",
              "ka",
              "de",
              "el",
              "gu",
              "iw",
              "hi",
              "hu",
              "is",
              "id",
              "ga",
              "it",
              "ja",
              "jw",
              "kn",
              "kk",
              "km",
              "ko",
              "lo",
              "la",
              "lv",
              "lt",
              "mk",
              "ms",
              "ml",
              "mt",
              "mr",
              "mn",
              "ne",
              "no",
              "nn",
              "fa",
              "pl",
              "pt-BR",
              "pt-PT",
              "pa",
              "ro",
              "ru",
              "gd",
              "sr",
              "si",
              "sk",
              "sl",
              "es",
              "es-419",
              "su",
              "sw",
              "sv",
              "ta",
              "te",
              "th",
              "tr",
              "uk",
              "ur",
              "uz",
              "vi",
              "cy",
              "xh",
              "zu"
            ],
            "type": "string",
            "description": "The language of Google's page labels. It can also change which results rank. Sent to Google as hl."
          },
          "quickDateRange": {
            "title": "Quick date range",
            "pattern": "^[hdwmy][0-9]{0,4}$",
            "type": "string",
            "description": "Only results from the past hour (h), day (d), week (w), month (m) or year (y), with an optional count: d10 is the past 10 days, m6 the past 6 months. Don't combine with the before and after dates."
          },
          "afterDate": {
            "title": "After date",
            "pattern": "^([0-9]{4}-[0-9]{2}-[0-9]{2}|[0-9]+ ?(day|week|month|year)s?)$",
            "type": "string",
            "description": "Only results from this date on. A date such as 2026-01-31, or a time ago such as 3 months. Dates are UTC."
          },
          "beforeDate": {
            "title": "Before date",
            "pattern": "^([0-9]{4}-[0-9]{2}-[0-9]{2}|[0-9]+ ?(day|week|month|year)s?)$",
            "type": "string",
            "description": "Only results up to this date. A date such as 2026-03-01, or a time ago such as 8 days. Dates are UTC."
          },
          "fileTypes": {
            "title": "File types",
            "maxItems": 10,
            "type": "array",
            "description": "Only results of these file types. Each query gets filetype: terms joined with OR, such as filetype:pdf OR filetype:docx.",
            "items": {
              "type": "string",
              "enum": [
                "pdf",
                "doc",
                "docx",
                "xls",
                "xlsx",
                "ppt",
                "pptx",
                "csv",
                "txt",
                "rtf",
                "odt",
                "ods",
                "odp",
                "epub",
                "ps",
                "xml",
                "html",
                "htm",
                "md",
                "tex",
                "svg",
                "kml",
                "kmz"
              ],
              "enumTitles": [
                "PDF (pdf)",
                "Word (doc)",
                "Word (docx)",
                "Excel (xls)",
                "Excel (xlsx)",
                "PowerPoint (ppt)",
                "PowerPoint (pptx)",
                "CSV (csv)",
                "Text (txt)",
                "Rich Text (rtf)",
                "OpenDocument text (odt)",
                "OpenDocument spreadsheet (ods)",
                "OpenDocument presentation (odp)",
                "EPUB (epub)",
                "PostScript (ps)",
                "XML (xml)",
                "HTML (html)",
                "HTML (htm)",
                "Markdown (md)",
                "TeX (tex)",
                "SVG (svg)",
                "Google Earth (kml)",
                "Google Earth (kmz)"
              ]
            }
          },
          "includeUnfilteredResults": {
            "title": "Unfiltered results",
            "type": "boolean",
            "description": "Also return the similar results Google normally hides. Sent to Google as filter=0.",
            "default": false
          },
          "disableAutocorrect": {
            "title": "No spelling correction",
            "type": "boolean",
            "description": "Search for each query exactly as typed, even when Google would correct its spelling. Sent to Google as nfpr=1.",
            "default": false
          },
          "safeSearch": {
            "title": "SafeSearch",
            "type": "boolean",
            "description": "Hide explicit results. Sent to Google as safe=active.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}