{
  "openapi": "3.0.1",
  "info": {
    "title": "AI Visibility Check: can ChatGPT cite your site, and does it?",
    "description": "Two answers in one run. Scores any site out of 100 on whether AI assistants can read, quote and date it. Then asks the questions your buyers type and reads what Google AI Overview, Perplexity and ChatGPT answer, to see whether you are named or a rival is. One shareable report per run.",
    "version": "0.3",
    "x-build-id": "o7kp6q6gWS3LSLCgU"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/operstack~ai-visibility-check/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-operstack-ai-visibility-check",
        "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/operstack~ai-visibility-check/runs": {
      "post": {
        "operationId": "runs-sync-operstack-ai-visibility-check",
        "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/operstack~ai-visibility-check/run-sync": {
      "post": {
        "operationId": "run-sync-operstack-ai-visibility-check",
        "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": [
          "urls"
        ],
        "properties": {
          "urls": {
            "title": "Websites to check",
            "minItems": 1,
            "maxItems": 200,
            "type": "array",
            "description": "One or more site addresses. Any public page works; the check reads the site's homepage, robots.txt, llms.txt, sitemap and up to three pages.",
            "items": {
              "type": "string"
            }
          },
          "questions": {
            "title": "Questions your buyers ask",
            "maxItems": 50,
            "type": "array",
            "description": "Leave empty to score the site only. Add questions and the actor also collects the answers AI assistants give and checks whether your brand is named in them. Write them the way a customer would type them, for example \"best property agency in Phuket\".",
            "items": {
              "type": "string"
            }
          },
          "runsPerQuestion": {
            "title": "How many times to ask each question",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "An AI answers the same question differently each time, so a single answer is a coin toss. Ask three to five times and the report gives you the share of answers that named you, which is a number you can act on. Each extra round costs another answer, so start at 1 to look around and raise it when the number matters.",
            "default": 1
          },
          "brand": {
            "title": "Brand name to look for",
            "type": "string",
            "description": "How your company is written in ordinary text. Leave empty and the domain name is used, so \"fazwaz.com\" becomes \"Fazwaz\"."
          },
          "competitors": {
            "title": "Rivals to compare against",
            "maxItems": 20,
            "type": "array",
            "description": "Names or domains. Every answer is checked for these too, so the report shows who is named when you are not.",
            "items": {
              "type": "string"
            }
          },
          "engines": {
            "title": "Where to ask",
            "type": "array",
            "description": "Google AI Overview works out of the box. Perplexity and ChatGPT are used only if you paste the matching key.",
            "items": {
              "type": "string",
              "enum": [
                "google-ai-overview",
                "perplexity",
                "openai"
              ],
              "enumTitles": [
                "Google AI Overview",
                "Perplexity",
                "ChatGPT (OpenAI)"
              ]
            },
            "default": [
              "google-ai-overview"
            ]
          },
          "countryCode": {
            "title": "Country to ask from",
            "type": "string",
            "description": "Two-letter country code for the Google search, for example us, gb, th, ae.",
            "default": "us"
          },
          "languageCode": {
            "title": "Language",
            "type": "string",
            "description": "Two-letter language code for the Google search, for example en, ru, es.",
            "default": "en"
          },
          "perplexityApiKey": {
            "title": "Perplexity API key",
            "type": "string",
            "description": "Your own key from perplexity.ai. Stored encrypted, used only for this run, never written to the output."
          },
          "openaiApiKey": {
            "title": "OpenAI API key",
            "type": "string",
            "description": "Your own key from platform.openai.com. Stored encrypted, used only for this run, never written to the output."
          },
          "samplePages": {
            "title": "Pages to sample per site",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many content pages to read beyond the homepage. More pages give a steadier content score and take longer.",
            "default": 3
          },
          "budgetSeconds": {
            "title": "Time budget per site",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "Hard limit for one site. Raise it for slow sites.",
            "default": 20
          },
          "perplexityModel": {
            "title": "Perplexity model",
            "type": "string",
            "description": "Which Perplexity model answers the questions.",
            "default": "sonar"
          },
          "openaiModel": {
            "title": "OpenAI model",
            "type": "string",
            "description": "Which OpenAI model answers the questions. Web search is requested; if the model cannot search, the answer is marked as ungrounded.",
            "default": "gpt-4o-mini"
          },
          "retryMissingAnswers": {
            "title": "Ask again when Google shows no AI answer",
            "type": "boolean",
            "description": "Google serves an AI Overview inconsistently, so a question can return one on one pass and nothing on the next. Leave this on and any question that came back empty is asked once more before it is reported as unanswered. It costs one more search for those questions only.",
            "default": true
          },
          "trackChanges": {
            "title": "Remember the last run and report the change",
            "type": "boolean",
            "description": "Keeps one line per site (the score and the mention share) so the next run can show which way both moved. Turn it off if you do not want anything remembered between runs.",
            "default": true
          },
          "htmlReport": {
            "title": "Also write a report page you can forward",
            "type": "boolean",
            "description": "Saves a single self-contained HTML page to the run's storage: every site, its score, the AI answers word for word, and the fixes in order. Open it in a browser or send it to a client as it is.",
            "default": true
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}