{
  "openapi": "3.0.1",
  "info": {
    "title": "ChatGPT Scraper | Answers, Citations & Brand Mentions",
    "description": "Send prompts to ChatGPT search and get the full answer, every cited source, the brands it names and their rank, and the web searches it ran. Ask each prompt up to 5 times for citation rates, track your domains and brands, and see what changed since your last run.",
    "version": "0.1",
    "x-build-id": "uvGRGXxfsu3gaGdGl"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/alexmorain~chatgpt-search-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-alexmorain-chatgpt-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/alexmorain~chatgpt-search-scraper/runs": {
      "post": {
        "operationId": "runs-sync-alexmorain-chatgpt-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/alexmorain~chatgpt-search-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-alexmorain-chatgpt-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": [
          "prompts"
        ],
        "properties": {
          "prompts": {
            "title": "Prompts",
            "minItems": 1,
            "maxItems": 1000,
            "type": "array",
            "description": "What people ask ChatGPT, one prompt per line: <code>best crm for a startup</code>. From 1 to 1,000 per run, up to 2,000 characters each (longer prompts are refused, never cut). Duplicates are removed.",
            "items": {
              "type": "string"
            }
          },
          "countryCode": {
            "title": "Country",
            "enum": [
              "ad",
              "ae",
              "af",
              "ag",
              "al",
              "am",
              "ao",
              "ar",
              "at",
              "au",
              "az",
              "ba",
              "bb",
              "bd",
              "be",
              "bf",
              "bg",
              "bh",
              "bi",
              "bj",
              "bn",
              "bo",
              "br",
              "bs",
              "bt",
              "bw",
              "bz",
              "ca",
              "cd",
              "cf",
              "cg",
              "ch",
              "ci",
              "cl",
              "cm",
              "co",
              "cr",
              "cv",
              "cy",
              "cz",
              "de",
              "dj",
              "dk",
              "dm",
              "do",
              "dz",
              "ec",
              "ee",
              "eg",
              "er",
              "es",
              "et",
              "fi",
              "fj",
              "fm",
              "fr",
              "ga",
              "gb",
              "gd",
              "ge",
              "gh",
              "gm",
              "gn",
              "gq",
              "gr",
              "gt",
              "gw",
              "gy",
              "hn",
              "hr",
              "ht",
              "hu",
              "id",
              "ie",
              "il",
              "in",
              "iq",
              "is",
              "it",
              "jm",
              "jo",
              "jp",
              "ke",
              "kg",
              "kh",
              "ki",
              "km",
              "kn",
              "kr",
              "kw",
              "kz",
              "la",
              "lb",
              "lc",
              "li",
              "lk",
              "lr",
              "ls",
              "lt",
              "lu",
              "lv",
              "ly",
              "ma",
              "mc",
              "md",
              "me",
              "mf",
              "mg",
              "mh",
              "mk",
              "ml",
              "mm",
              "mn",
              "mr",
              "mt",
              "mu",
              "mv",
              "mw",
              "mx",
              "my",
              "mz",
              "na",
              "nc",
              "ne",
              "ng",
              "ni",
              "nl",
              "no",
              "np",
              "nr",
              "nz",
              "om",
              "pa",
              "pe",
              "pf",
              "pg",
              "ph",
              "pk",
              "pl",
              "pm",
              "pt",
              "pw",
              "py",
              "qa",
              "ro",
              "rs",
              "rw",
              "sa",
              "sb",
              "sc",
              "se",
              "sg",
              "sh",
              "si",
              "sk",
              "sl",
              "sm",
              "sn",
              "so",
              "sr",
              "st",
              "sv",
              "sz",
              "td",
              "tf",
              "tg",
              "th",
              "tj",
              "tl",
              "tm",
              "tn",
              "to",
              "tr",
              "tt",
              "tv",
              "tw",
              "tz",
              "ua",
              "ug",
              "us",
              "uy",
              "uz",
              "va",
              "vc",
              "vn",
              "vu",
              "wf",
              "ws",
              "ye",
              "za",
              "zm",
              "zw"
            ],
            "type": "string",
            "description": "Where the prompt is asked from. The answer and its sources change with the country.",
            "default": "us"
          },
          "languageCode": {
            "title": "Language",
            "enum": [
              "ach",
              "af",
              "ak",
              "am",
              "ar",
              "az",
              "ban",
              "be",
              "bem",
              "bg",
              "bn",
              "bs",
              "ca",
              "ceb",
              "ckb",
              "crs",
              "cs",
              "da",
              "de",
              "ee",
              "el",
              "en",
              "es",
              "es-419",
              "et",
              "eu",
              "fa",
              "fi",
              "fil",
              "fo",
              "fr",
              "fy",
              "ga",
              "gaa",
              "gl",
              "gu",
              "ha",
              "he",
              "hi",
              "hr",
              "ht",
              "hu",
              "hy",
              "id",
              "ig",
              "is",
              "it",
              "iw",
              "ja",
              "ka",
              "kg",
              "kk",
              "km",
              "kn",
              "ko",
              "kri",
              "ky",
              "lg",
              "ln",
              "lo",
              "loz",
              "lt",
              "lua",
              "lv",
              "mfe",
              "mg",
              "mi",
              "mk",
              "ml",
              "mn",
              "mr",
              "ms",
              "mt",
              "my",
              "ne",
              "nl",
              "no",
              "nso",
              "ny",
              "nyn",
              "om",
              "pa",
              "pcm",
              "pl",
              "ps",
              "pt",
              "pt-BR",
              "pt-PT",
              "qu",
              "rm",
              "rn",
              "ro",
              "ru",
              "rw",
              "sd",
              "si",
              "sk",
              "sl",
              "sn",
              "so",
              "sq",
              "sr",
              "sr-Latn",
              "sr-ME",
              "st",
              "sv",
              "sw",
              "ta",
              "te",
              "tg",
              "th",
              "ti",
              "tk",
              "tl",
              "tn",
              "to",
              "tr",
              "tum",
              "uk",
              "ur",
              "uz",
              "vi",
              "wo",
              "xh",
              "yo",
              "zh-CN",
              "zh-TW",
              "zu"
            ],
            "type": "string",
            "description": "Language of the prompt and of the answer. Match it to the language of your prompts.",
            "default": "en"
          },
          "capturesPerPrompt": {
            "title": "Captures per prompt",
            "enum": [
              "1",
              "3",
              "5"
            ],
            "type": "string",
            "description": "How many times each prompt is asked. ChatGPT answers differently each time, so one capture is a snapshot: with 3 or 5, every domain and brand gets a rate (0.67 = present in 2 captures out of 3). The price per prompt grows with the captures that succeed.",
            "default": "1"
          },
          "trackDomains": {
            "title": "Domains to track",
            "type": "array",
            "description": "Your website and your competitors, one per line: <code>hubspot.com</code> (50 at most). A full URL works too, only the domain is kept, and subdomains count. Each prompt gets a citation rate and a best position per domain.",
            "items": {
              "type": "string"
            }
          },
          "trackBrands": {
            "title": "Brands to track",
            "type": "array",
            "description": "Brand or product names to look for in the answer text, one per line (50 at most): <code>HubSpot</code>, <code>monday.com</code>. Whole word, case ignored. Each prompt gets a mention rate and a rank per brand.",
            "items": {
              "type": "string"
            }
          },
          "compareWithPreviousRun": {
            "title": "Compare with previous run",
            "type": "boolean",
            "description": "Keep this run's results and compare the next one with them. Each prompt then gets a <code>changes</code> object: domains and brands gained or lost (present in at least half the captures), and the old and new rates of what you track. The first run saves the baseline. Use it with a schedule for weekly monitoring.",
            "default": false
          },
          "historyKey": {
            "title": "History name",
            "type": "string",
            "description": "Name of the saved history used by <b>Compare with previous run</b>. Give each client or project its own name to keep them separate. Prompts are kept apart by country and language.",
            "default": "default"
          },
          "includeAnswerText": {
            "title": "Include the answer text",
            "type": "boolean",
            "description": "Add the answer (the longest of the captures) to each result.",
            "default": true
          },
          "includeSources": {
            "title": "Include the source list",
            "type": "boolean",
            "description": "Add every cited source (title, URL, rate) and, where the engine gives them, its search results. Turn it off to keep only the per-domain summary.",
            "default": true
          },
          "webhookUrl": {
            "title": "Webhook URL",
            "type": "string",
            "description": "Optional. A public URL that receives a short JSON summary when the run ends (Slack, Discord, Make, Zapier, n8n). It is never written to the log or the results."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}