{
  "openapi": "3.0.1",
  "info": {
    "title": "AI Search Citation Monitor — Google AI Overview & AI Mode",
    "description": "Track which sources Google's AI Overview cites for your keywords. One record per query: AI answer text and Markdown, cited URLs with position and domain, whether your target domains were cited, and the organic top 10. Built for GEO / AI visibility monitoring. Failed queries are not charged.",
    "version": "0.1",
    "x-build-id": "Ba9LvxcoiEcrBqK3K"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/fre.d~ai-search-citations/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-fre.d-ai-search-citations",
        "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/fre.d~ai-search-citations/runs": {
      "post": {
        "operationId": "runs-sync-fre.d-ai-search-citations",
        "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/fre.d~ai-search-citations/run-sync": {
      "post": {
        "operationId": "run-sync-fre.d-ai-search-citations",
        "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": "Search queries",
            "minItems": 1,
            "uniqueItems": true,
            "type": "array",
            "description": "Keywords to check. One output record is produced per query and engine. Each query/engine pair is a separate billable event.",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "targetDomains": {
            "title": "Target domains",
            "uniqueItems": true,
            "type": "array",
            "description": "Domains you want to monitor, e.g. your own site and competitors (apify.com, docs.example.org). For every query the Actor reports whether each domain was cited by the AI answer and at which positions. Subdomains count as a hit.",
            "items": {
              "type": "string"
            }
          },
          "engines": {
            "title": "Engines",
            "uniqueItems": true,
            "type": "array",
            "description": "Which Google AI surfaces to check. 'google_ai_overview' is the AI Overview block on a normal results page. 'google_ai_mode' tries the dedicated AI Mode page (udm=50); it is experimental and returns status 'failed' with error 'ai_mode_not_available' when Google does not serve it without a browser.",
            "items": {
              "type": "string",
              "enum": [
                "google_ai_overview",
                "google_ai_mode"
              ],
              "enumTitles": [
                "Google AI Overview",
                "Google AI Mode (experimental)"
              ]
            },
            "default": [
              "google_ai_overview"
            ]
          },
          "countryCode": {
            "title": "Country code",
            "pattern": "^[a-zA-Z]{2}$",
            "type": "string",
            "description": "Two-letter country code that selects the Google domain and the 'gl' parameter (us, gb, de, fr, jp, ...). AI Overview availability depends on the country.",
            "default": "us"
          },
          "languageCode": {
            "title": "Language code",
            "pattern": "^[a-zA-Z]{2}(-[a-zA-Z]{2,4})?$",
            "type": "string",
            "description": "Interface language passed as the 'hl' parameter (en, de, ja, ...). The AI Overview heading is detected in the most common languages; use 'en' for the most reliable extraction.",
            "default": "en"
          },
          "maxQueries": {
            "title": "Max queries",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Safety cap on how many queries from the list are processed in this run.",
            "default": 100
          },
          "resolveUrls": {
            "title": "Resolve real URLs",
            "type": "boolean",
            "description": "Google serves result links as opaque redirect tokens. When enabled, the Actor follows each redirect (headers only, no page download) to get the real URL and domain of every citation and organic result. Disable to save a few seconds per query; citations will then carry the Google redirect URL and 'resolved: false'.",
            "default": true
          },
          "proxyGroup": {
            "title": "Proxy group",
            "enum": [
              "auto",
              "GOOGLE_SERP",
              "RESIDENTIAL"
            ],
            "type": "string",
            "description": "'auto' uses Apify's Google SERP proxy and falls back to residential proxies if the SERP group is not available on your plan. Pick one explicitly to force it.",
            "default": "auto"
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many result pages are fetched in parallel.",
            "default": 3
          },
          "debugSaveHtml": {
            "title": "Save raw HTML (debug)",
            "type": "boolean",
            "description": "Store the raw HTML of every fetched result page in the run's key-value store (keys HTML-0001.html, ...). Useful when reporting extraction problems; off by default.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}