{
  "openapi": "3.0.1",
  "info": {
    "title": "AI Search Scraper – Google AI Overview Answers & Citations",
    "description": "Scrape the real Google AI Overview answer people see in search results — the answer text, its cited sources with resolved URLs, and the page-1 organic results — for any query, per country and language. Present / no-answer flag per row, no API keys, no login. Dataset-only, MCP-ready.",
    "version": "0.1",
    "x-build-id": "LvWz2bKtCX4m4Z6Sg"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/inovaflow~ai-search-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-inovaflow-ai-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/inovaflow~ai-search-scraper/runs": {
      "post": {
        "operationId": "runs-sync-inovaflow-ai-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/inovaflow~ai-search-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-inovaflow-ai-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": [
          "queries"
        ],
        "properties": {
          "queries": {
            "title": "Queries",
            "type": "array",
            "description": "Search queries, one per line — the questions your customers type into Google (`best CRM for small business`). Each query is checked on every selected country. Also accepted as `prompts` or `keywords`, or as objects {query}.",
            "items": {
              "type": "string"
            }
          },
          "countries": {
            "title": "Countries",
            "uniqueItems": true,
            "type": "array",
            "description": "Markets to check — each one is a separate Google domain and result page (a query × country pair is one row). Default: United States.",
            "items": {
              "type": "string",
              "enum": [
                "us",
                "uk",
                "ca",
                "au",
                "de",
                "fr",
                "es",
                "it",
                "nl",
                "cz",
                "at",
                "sk",
                "pl",
                "jp",
                "br",
                "mx",
                "cl",
                "in",
                "ch",
                "be",
                "ie",
                "pt",
                "se",
                "no",
                "dk",
                "fi",
                "ro",
                "hu",
                "gr",
                "tr",
                "ua",
                "ae",
                "sa",
                "il",
                "eg",
                "za",
                "sg",
                "hk",
                "tw",
                "kr",
                "id",
                "th",
                "vn",
                "ph",
                "my",
                "nz",
                "ar",
                "co",
                "pe"
              ],
              "enumTitles": [
                "United States (us)",
                "United Kingdom (uk)",
                "Canada (ca)",
                "Australia (au)",
                "Germany (de)",
                "France (fr)",
                "Spain (es)",
                "Italy (it)",
                "Netherlands (nl)",
                "Czechia (cz)",
                "Austria (at)",
                "Slovakia (sk)",
                "Poland (pl)",
                "Japan (jp)",
                "Brazil (br)",
                "Mexico (mx)",
                "Chile (cl)",
                "India (in)",
                "Switzerland (ch)",
                "Belgium (be)",
                "Ireland (ie)",
                "Portugal (pt)",
                "Sweden (se)",
                "Norway (no)",
                "Denmark (dk)",
                "Finland (fi)",
                "Romania (ro)",
                "Hungary (hu)",
                "Greece (gr)",
                "Türkiye (tr)",
                "Ukraine (ua)",
                "United Arab Emirates (ae)",
                "Saudi Arabia (sa)",
                "Israel (il)",
                "Egypt (eg)",
                "South Africa (za)",
                "Singapore (sg)",
                "Hong Kong (hk)",
                "Taiwan (tw)",
                "South Korea (kr)",
                "Indonesia (id)",
                "Thailand (th)",
                "Vietnam (vn)",
                "Philippines (ph)",
                "Malaysia (my)",
                "New Zealand (nz)",
                "Argentina (ar)",
                "Colombia (co)",
                "Peru (pe)"
              ]
            },
            "default": [
              "us"
            ]
          },
          "language": {
            "title": "Interface language",
            "type": "string",
            "description": "Google interface language (`hl`), e.g. `en`, `de`, `cs`. Leave empty to use each country's main language. Tip: AI Overviews are served most consistently when the query language matches this."
          },
          "surfaces": {
            "title": "AI surfaces",
            "uniqueItems": true,
            "type": "array",
            "description": "Which AI answers to return. Google AI Overview is the answer box at the top of Google search results.",
            "items": {
              "type": "string",
              "enum": [
                "google_ai_overview"
              ],
              "enumTitles": [
                "Google AI Overview"
              ]
            },
            "default": [
              "google_ai_overview"
            ]
          },
          "maxCitations": {
            "title": "Max citations per answer",
            "minimum": 0,
            "maximum": 50,
            "type": "integer",
            "description": "Cap on cited sources returned per answer (inline source chips first, then the related links under the answer). 0 = answer text only.",
            "default": 20
          },
          "resolveCitationUrls": {
            "title": "Resolve citation URLs",
            "type": "boolean",
            "description": "Google links every source through a redirect token; when on, each token is resolved to the real page URL (one small request per unique source, cached per run).",
            "default": true
          },
          "includeAnswerHtml": {
            "title": "Include answer HTML",
            "type": "boolean",
            "description": "Also store the raw HTML of the AI Overview block in `answerHtml` (large; useful for audits and custom parsing).",
            "default": false
          },
          "includeOrganicResults": {
            "title": "Include page-1 organic results",
            "type": "boolean",
            "description": "Also return the page-1 organic results of the same search in `organicResults` (position, resolved URL, domain, title) — what ranks next to what the AI answers. Read from the same page, so it adds no search request and no charge.",
            "default": true
          },
          "generationRetries": {
            "title": "Retries while Google is still generating",
            "minimum": 0,
            "maximum": 3,
            "type": "integer",
            "description": "When Google shows the AI Overview as still being generated (a one-off on common queries, the norm for niche or non-English ones), re-fetch the page this many times a few seconds apart before reporting `generating`. Each re-fetch is one more search request.",
            "default": 2
          },
          "maxRetries": {
            "title": "Retries on a blocked or failed page",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Extra attempts when Google serves a block page or the request fails.",
            "default": 2
          },
          "maxConcurrency": {
            "title": "Parallel queries",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many query × country pairs are fetched at once.",
            "default": 5
          },
          "maxItems": {
            "title": "Max rows",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Upper bound on query × country × surface rows produced in one run.",
            "default": 1000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}