{
  "openapi": "3.0.1",
  "info": {
    "title": "AI Answer Scraper - ChatGPT, Perplexity, Gemini & AI Mode",
    "description": "Answers and cited sources from ChatGPT, Perplexity, Gemini, Google AI Mode, Google AI Overviews and Claude for your prompts. Same input as Apify's AI scrapers (queries, countryCode). Licensed data, no logins, no browser. $0.015 per answer. Built for GEO / AI search tracking and AI agents.",
    "version": "1.0",
    "x-build-id": "oBrbpGBdWMUMTgLuY"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/wrenfield-data~ai-answer-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-wrenfield-data-ai-answer-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/wrenfield-data~ai-answer-scraper/runs": {
      "post": {
        "operationId": "runs-sync-wrenfield-data-ai-answer-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/wrenfield-data~ai-answer-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-wrenfield-data-ai-answer-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",
        "properties": {
          "prompts": {
            "title": "Prompts",
            "type": "array",
            "description": "Questions to ask, one per line (up to 500 characters each, up to 500 prompts). Each prompt is sent to every selected engine. Coming from Apify's ChatGPT / Perplexity / Gemini / AI Mode scrapers? You can send your existing <code>queries</code> input unchanged instead.",
            "items": {
              "type": "string"
            }
          },
          "engines": {
            "title": "AI engines",
            "type": "array",
            "description": "Engines to ask. One answer row per prompt and engine. Default: ChatGPT + Perplexity.",
            "items": {
              "type": "string",
              "enum": [
                "chatgpt",
                "perplexity",
                "gemini",
                "google_ai_mode",
                "google_ai_overview",
                "claude",
                "chatgpt_api"
              ],
              "enumTitles": [
                "ChatGPT (web answer with search)",
                "Perplexity (Sonar)",
                "Google Gemini",
                "Google AI Mode",
                "Google AI Overviews",
                "Claude API (no web search)",
                "ChatGPT API (official OpenAI API, no web search)"
              ]
            },
            "default": [
              "chatgpt",
              "perplexity"
            ]
          },
          "country": {
            "title": "Country",
            "type": "string",
            "description": "Country the answers are localized to (web search location): name, 2-letter code or location code. Default: United States."
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Language name or code (<code>English</code>, <code>de</code>).",
            "default": "English"
          },
          "chatgptWebSearch": {
            "title": "ChatGPT: force web search",
            "type": "boolean",
            "description": "Make ChatGPT search the web, so the answer has cited sources (what most users see for buying questions).",
            "default": true
          },
          "includeAnswerText": {
            "title": "Include answer text",
            "type": "boolean",
            "description": "Turn off to get only citations, cited domains and brands (smaller output for agents).",
            "default": true
          },
          "maxAnswerChars": {
            "title": "Max answer length",
            "minimum": 500,
            "maximum": 100000,
            "type": "integer",
            "description": "Answer text is cut to this length.",
            "default": 20000
          },
          "queries": {
            "title": "Queries (Apify-compatible)",
            "type": "string",
            "description": "Same as <code>queries</code> in Apify's AI scrapers: one query per line. Added to Prompts. When used, each row also gets Apify-style fields (<code>query</code>, <code>text</code>, <code>sources</code>, <code>citationUrls</code>)."
          },
          "countryCode": {
            "title": "Country code (Apify-compatible)",
            "type": "string",
            "description": "Lowercase 2-letter country code as in Apify's AI scrapers (e.g. <code>us</code>, <code>gb</code>). Used when Country is empty."
          },
          "perplexitySearch": {
            "title": "Perplexity options (Apify-compatible)",
            "type": "object",
            "description": "Accepted for compatibility with apify/perplexity-search-scraper. Images, related questions and search recency are not supported and are ignored (noted in the run summary)."
          },
          "apifyCompatibleFields": {
            "title": "Add Apify-style output fields",
            "type": "boolean",
            "description": "Add <code>query</code>, <code>text</code>, <code>sources</code>, <code>citationUrls</code>, <code>relatedQuestions</code> and <code>images</code> to every row, matching Apify's AI scrapers. Default: on when you use <code>queries</code>, off otherwise."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}