{
  "openapi": "3.0.1",
  "info": {
    "title": "Google AI Mode Answer & Citation Scraper",
    "description": "Run prompts through Google AI Mode (udm=50) in any country and language and export each answer as text and markdown with its cited sources, inline citation groups, product and place cards, follow-up questions and brand or domain visibility scores.",
    "version": "0.1",
    "x-build-id": "YPyW5y9bdygWtaIz2"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/xyrelith-data~google-ai-mode-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-xyrelith-data-google-ai-mode-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/xyrelith-data~google-ai-mode-scraper/runs": {
      "post": {
        "operationId": "runs-sync-xyrelith-data-google-ai-mode-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/xyrelith-data~google-ai-mode-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-xyrelith-data-google-ai-mode-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": [
          "prompts"
        ],
        "properties": {
          "prompts": {
            "title": "Prompts",
            "minItems": 1,
            "type": "array",
            "description": "Questions or search prompts to ask Google AI Mode. Each prompt is asked once per selected country.",
            "items": {
              "type": "string"
            }
          },
          "countries": {
            "title": "Countries",
            "minItems": 1,
            "uniqueItems": true,
            "type": "array",
            "description": "Countries whose Google market (gl) the answers should reflect. Select one or more; each prompt is asked once per country.",
            "items": {
              "type": "string",
              "enum": [
                "us",
                "uk",
                "ca",
                "au",
                "de",
                "fr",
                "es",
                "it",
                "br",
                "mx",
                "in",
                "jp",
                "kr",
                "nl",
                "be",
                "at",
                "ch",
                "se",
                "no",
                "dk",
                "fi",
                "pl",
                "cz",
                "pt",
                "ie",
                "nz",
                "za",
                "sg",
                "hk",
                "tw",
                "ph",
                "th",
                "id",
                "my",
                "vn",
                "ar",
                "cl",
                "co",
                "pe",
                "tr",
                "ru",
                "ua",
                "il",
                "ae",
                "sa",
                "eg",
                "ng",
                "ke"
              ],
              "enumTitles": [
                "United States",
                "United Kingdom",
                "Canada",
                "Australia",
                "Germany",
                "France",
                "Spain",
                "Italy",
                "Brazil",
                "Mexico",
                "India",
                "Japan",
                "South Korea",
                "Netherlands",
                "Belgium",
                "Austria",
                "Switzerland",
                "Sweden",
                "Norway",
                "Denmark",
                "Finland",
                "Poland",
                "Czech Republic",
                "Portugal",
                "Ireland",
                "New Zealand",
                "South Africa",
                "Singapore",
                "Hong Kong",
                "Taiwan",
                "Philippines",
                "Thailand",
                "Indonesia",
                "Malaysia",
                "Vietnam",
                "Argentina",
                "Chile",
                "Colombia",
                "Peru",
                "Turkey",
                "Russia",
                "Ukraine",
                "Israel",
                "United Arab Emirates",
                "Saudi Arabia",
                "Egypt",
                "Nigeria",
                "Kenya"
              ]
            },
            "default": [
              "us"
            ]
          },
          "languageCode": {
            "title": "Language",
            "enum": [
              "en",
              "es",
              "fr",
              "de",
              "it",
              "pt",
              "nl",
              "pl",
              "tr",
              "ru",
              "uk",
              "ar",
              "he",
              "fa",
              "hi",
              "bn",
              "ta",
              "te",
              "mr",
              "gu",
              "kn",
              "ml",
              "pa",
              "ur",
              "id",
              "ms",
              "th",
              "vi",
              "fil",
              "zh-CN",
              "zh-TW",
              "ja",
              "ko",
              "sv",
              "no",
              "da",
              "fi",
              "cs",
              "sk",
              "hu",
              "ro",
              "bg",
              "el",
              "hr",
              "sr",
              "sl",
              "lt",
              "lv",
              "et",
              "ca",
              "eu",
              "gl",
              "af",
              "sw"
            ],
            "type": "string",
            "description": "Language of the Google interface and of the AI Mode answer (hl). Pick the language your prompts are written in.",
            "default": "en"
          },
          "brands": {
            "title": "Brands to track",
            "type": "array",
            "description": "Optional brand names. For each one the actor reports whether the AI Mode answer mentions it, how many times, where it first appears and whether it is cited as a source.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "domains": {
            "title": "Domains to track",
            "type": "array",
            "description": "Optional website domains (for example example.com). For each one the actor reports whether the answer mentions it and whether it appears among the cited sources.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "includeProductCards": {
            "title": "Include product cards",
            "type": "boolean",
            "description": "Extract the product cards Google shows inside the answer (name, price, merchant, rating, review count and key specs).",
            "default": true
          },
          "includePlaceCards": {
            "title": "Include place cards",
            "type": "boolean",
            "description": "Extract local place cards when Google shows them in the answer.",
            "default": true
          },
          "includeFollowUpQuestions": {
            "title": "Include follow-up questions",
            "type": "boolean",
            "description": "Extract the follow-up questions Google suggests below the answer.",
            "default": true
          },
          "includeMarkdown": {
            "title": "Include markdown answer",
            "type": "boolean",
            "description": "Also save the answer as markdown, keeping headings, lists, tables and inline citation markers.",
            "default": true
          },
          "maxItems": {
            "title": "Maximum records",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Stop after this many answers. Each prompt and country pair produces one answer.",
            "default": 100
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}