{
  "openapi": "3.0.1",
  "info": {
    "title": "Google SERP Scraper - Search Results, Rankings & SERP Features",
    "description": "Scrape Google search results including organic listings, local pack, featured snippets, People Also Ask, and ads. Perfect for SEO research, rank tracking, and competitive analysis.\nTrack Rankings\nAnalyze SERP Features\nResearch Competition\nStudy User Intent\nMonitor Local SEO",
    "version": "2.4",
    "x-build-id": "IoWDJlnrqqkxa7uam"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/alizarin_refrigerator-owner~google-serp-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-alizarin_refrigerator-owner-google-serp-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/alizarin_refrigerator-owner~google-serp-scraper/runs": {
      "post": {
        "operationId": "runs-sync-alizarin_refrigerator-owner-google-serp-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/alizarin_refrigerator-owner~google-serp-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-alizarin_refrigerator-owner-google-serp-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",
        "properties": {
          "queries": {
            "title": "Search Queries",
            "type": "array",
            "description": "List of search queries to scrape (one per line or comma-separated)",
            "default": [
              "best pizza near me"
            ],
            "items": {
              "type": "string"
            }
          },
          "location": {
            "title": "Location",
            "type": "string",
            "description": "Geographic location for localized results (e.g., 'New York, NY, USA')",
            "default": "United States"
          },
          "language": {
            "title": "Language",
            "enum": [
              "en",
              "es",
              "fr",
              "de",
              "it",
              "pt",
              "ja",
              "zh",
              "ko",
              "ar",
              "nl",
              "ru",
              "pl",
              "sv",
              "da",
              "no",
              "fi",
              "tr",
              "th",
              "vi"
            ],
            "type": "string",
            "description": "Search language code",
            "default": "en"
          },
          "device": {
            "title": "Device Type",
            "enum": [
              "desktop",
              "mobile"
            ],
            "type": "string",
            "description": "Emulate desktop or mobile search",
            "default": "desktop"
          },
          "maxResults": {
            "title": "Results Per Page",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Number of organic results to extract per page (Google typically shows 10)",
            "default": 10
          },
          "maxPagesPerQuery": {
            "title": "Pages Per Query",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Number of Google result pages to scrape per query (1-10). Page 2 = results 11-20, etc.",
            "default": 1
          },
          "includeAds": {
            "title": "Include Ads",
            "type": "boolean",
            "description": "Ads are rarely present in proxy-fetched SERP HTML, so this often returns an empty list.",
            "default": false
          },
          "includeShoppingAds": {
            "title": "Include Shopping Ads",
            "type": "boolean",
            "description": "Shopping units are rarely present in proxy-fetched SERP HTML, so this often returns an empty list.",
            "default": false
          },
          "includePAA": {
            "title": "Include People Also Ask",
            "type": "boolean",
            "description": "Extract People Also Ask questions",
            "default": true
          },
          "expandPAAAnswers": {
            "title": "Expand PAA Answers",
            "type": "boolean",
            "description": "PAA answers require browser interaction and are not extracted; only the questions are returned.",
            "default": true
          },
          "includeLocalPack": {
            "title": "Include Local Pack",
            "type": "boolean",
            "description": "Extract local business results (map pack) with ratings, reviews, categories",
            "default": true
          },
          "includeFeaturedSnippet": {
            "title": "Include Featured Snippet",
            "type": "boolean",
            "description": "Extract featured snippet content (paragraph, list, or table type)",
            "default": true
          },
          "includeKnowledgePanel": {
            "title": "Include Knowledge Panel",
            "type": "boolean",
            "description": "Knowledge panels are rendered client-side and are usually not present in fetched SERP HTML.",
            "default": true
          },
          "includeRelatedSearches": {
            "title": "Include Related Searches",
            "type": "boolean",
            "description": "Extract related search suggestions at bottom of SERP",
            "default": true
          },
          "includeSitelinks": {
            "title": "Include Sitelinks",
            "type": "boolean",
            "description": "Extract sitelinks (sub-links) under organic results with titles, URLs, and descriptions",
            "default": true
          },
          "includeEmphasizedKeywords": {
            "title": "Include Emphasized Keywords",
            "type": "boolean",
            "description": "Extract bolded/emphasized words from result descriptions — shows exact keyword matches Google uses",
            "default": true
          },
          "maxRetries": {
            "title": "Max Retries",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Maximum retry attempts per request when CAPTCHA or errors occur (1-5)",
            "default": 3
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Apify Proxy is enabled by default and required in practice. The actor fetches SERP HTML through the dedicated GOOGLE_SERP proxy group, which avoids the CAPTCHAs that Google serves to browser traffic.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "GOOGLE_SERP"
              ]
            }
          },
          "demoMode": {
            "title": "Demo Mode",
            "type": "boolean",
            "description": "Return realistic sample data without actual scraping (free, no proxy usage)",
            "default": false
          },
          "webhookUrl": {
            "title": "Webhook URL",
            "type": "string",
            "description": "Optional webhook URL to receive results in real-time as each query completes"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}