# ChatGPT Search Answer & Citation Tracker (`xyrelith-data/chatgpt-search-scraper`) Actor

Ask ChatGPT prompts with live web search and get the answer, every cited source, claim-level citations, product cards, entities, brand mentions with sentiment, follow-ups and honest per-prompt statuses.

- **URL**: https://apify.com/xyrelith-data/chatgpt-search-scraper.md
- **Developed by:** [Xyrelith Data](https://apify.com/xyrelith-data) (community)
- **Categories:** AI, SEO tools, Automation
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.49 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## ChatGPT Search Answer & Citation Tracker

Ask ChatGPT your buyer questions, the way a logged-out visitor does on `chatgpt.com`, and get one clean row per prompt: the answer as text and Markdown, every page it cited, the exact sentence each source supports, product cards, entity chips, brand visibility with sentiment, and an honest status for every prompt.

No OpenAI account, API key, cookie or login is required. The actor drives a headless browser through the public ChatGPT web interface with web search switched on, then reads the answer from the same data the page renders.

### What you get per prompt

| Field | What it contains |
|---|---|
| `prompt`, `promptSent` | Your prompt and the exact text sent (including an optional language or market directive) |
| `status` | `ANSWERED`, `EMPTY_ANSWER`, `BLOCKED`, `TIMEOUT` or `ERROR` — never a silent empty row |
| `answerText`, `answerMarkdown` | The full answer, with headings, lists and tables preserved in Markdown |
| `answerWordCount` | Word count of the plain answer |
| `webSearchTriggered` | Whether ChatGPT actually searched the web |
| `websitesSearched` | The count ChatGPT reports (“Searched N websites”) |
| `sources` | Every cited source, in citation order: position, title, URL, domain, publisher, publish date, first cited character and the claims it supports |
| `citations` | Claim-level citations: each cited sentence with the exact source(s) behind it |
| `citedDomains` | Unique cited domains in citation order |
| `searchResults` | Every page ChatGPT read, not only the ones it cited |
| `products` | Product cards when ChatGPT shows them: name, price, currency, merchant, URL, rating and review count when the source exposes them |
| `entities` | Company, product and other entity chips with ChatGPT's own category |
| `trackedBrands` | For each brand or domain you list: mentioned, mention count, first position (character and %), the passage around the first mention, a simple sentiment, whether its site is cited and the cited position |
| `conversationId`, `conversationUrl` | The saved conversation, so you can open the same answer in a browser |
| `responseTimeSeconds`, `scrapedAt` | How long the answer took and when the row was collected |
| `followUp*` fields | The follow-up answer, its sources, citations, products and response time |
| `turns` | In conversation mode: every turn with its own answer, sources, citations, products and status |

Missing values are omitted, never sent as `null`, `""`, `[]` or `{}`.

### Modes

- **One answer per prompt** (default) — each prompt runs in a fresh chat, so one question never colours the next. Add an optional follow-up prompt to ask a second question in every chat.
- **One conversation** — all prompts run as turns in a single chat. Use this to measure how ChatGPT changes its answer when a buyer pushes back or adds detail. The optional follow-up prompt becomes the last turn.

### Inputs

| Input | Default | Description |
|---|---|---|
| `mode` | `answers` | `answers` asks each prompt in its own fresh chat; `conversation` keeps all prompts in one chat and returns a `turns` array. |
| `prompts` | – | The questions to ask. One per line or a JSON array. |
| `followUpPrompt` | – | Optional second question in the same chat. In answers mode it is asked after every prompt; in conversation mode it becomes the last turn. |
| `maxItems` | `3` | Caps how many prompts or turns a run processes (1–100). |
| `forceWebSearch` | `true` | Turns ChatGPT's web search on for every prompt. The row still reports whether a search ran. |
| `trackBrands` | – | Names such as `HubSpot` or domains such as `salesforce.com`. `Name | domain.com` is also accepted. |
| `language` | `auto` | Asks ChatGPT to answer in a language. The exact prompt is recorded in `promptSent`. |
| `marketHint` | – | Asks ChatGPT to use sources and prices relevant to a country or region. Also recorded in `promptSent`. |
| `includeSearchResults` | `true` | Adds the pages ChatGPT read but did not cite. |
| `stripUtm` | `true` | Removes `utm_source=chatgpt.com` from source URLs. |
| `responseTimeoutSecs` | `120` | Seconds to wait for each answer (30–300). |
| `retries` | `1` | Fresh-page retries for a prompt that times out or returns no answer (0–3). |
| `proxyConfiguration` | – | Optional. The actor works without a proxy. |

### Example row

```json
{
  "prompt": "best running shoes for flat feet 2026",
  "status": "ANSWERED",
  "answerText": "For most runners with flat feet...",
  "answerMarkdown": "For most runners with flat feet...\n\n## Top picks\n\n| Shoe | Best for |\n...",
  "webSearchTriggered": true,
  "websitesSearched": 5,
  "sources": [
    {
      "position": 1,
      "title": "The 9 Best Running Shoes for Runners With Flat Feet",
      "url": "https://www.runnersworld.com/gear/a25750345/running-shoes-flat-feet/",
      "domain": "runnersworld.com",
      "publisher": "Runner's World",
      "publishedAt": "November 6, 2026",
      "firstCitedAtChar": 120,
      "citedInClaims": [1]
    }
  ],
  "citations": [
    {
      "index": 1,
      "text": "Flat feet do not automatically mean you need aggressive arch support.",
      "sources": [
        {
          "title": "The 9 Best Running Shoes for Runners With Flat Feet",
          "url": "https://www.runnersworld.com/gear/a25750345/running-shoes-flat-feet/",
          "domain": "runnersworld.com"
        }
      ]
    }
  ],
  "citedDomains": ["runnersworld.com"],
  "products": [
    {
      "position": 1,
      "name": "Brooks Adrenaline GTS 25",
      "price": "$155.00",
      "priceValue": 155.0,
      "currency": "USD",
      "merchant": "Nordstrom",
      "domain": "nordstrom.com",
      "url": "https://www.nordstrom.com/s/brooks-adrenaline-gts-25"
    }
  ],
  "trackedBrands": [
    {
      "brand": "Brooks",
      "mentioned": true,
      "mentionCount": 2,
      "firstMentionAtChar": 84,
      "firstMentionPositionPct": 0.041,
      "sentiment": "positive",
      "sentimentScore": 2,
      "cited": false
    }
  ],
  "conversationUrl": "https://chatgpt.com/uc/…",
  "responseTimeSeconds": 11.4,
  "scrapedAt": "2026-11-15T03:20:00+00:00"
}
```

### How it works

1. Opens a fresh signed-out ChatGPT chat for each prompt.
2. Turns on web search (unless you switch it off) and waits for the complete answer.
3. Reads the answer, the reasoning status, the citation bindings, the search results, product references and entity chips from the stream that feeds the page.
4. Resolves each citation reference to its title, URL, domain, publisher and publish date.
5. Maps each cited sentence to its sources and records the first position of every tracked brand.
6. Writes one row per prompt, or one row per conversation with a `turns` array.

The browser is a normal headless Chromium session. The actor does not use your account and does not send OpenAI credentials anywhere.

### Use cases

- **AI visibility and GEO tracking** — run the questions your buyers ask and see whether ChatGPT names you, how early, in what tone, and whether it cites your site.
- **Citation and content research** — find the pages ChatGPT relies on for a topic, and the exact sentences those pages support.
- **Competitive intelligence** — compare brands and domains across a prompt set, week after week.
- **Product visibility** — see which products and merchants ChatGPT recommends when it shows shopping cards.
- **Answer monitoring** — schedule the same prompts and compare dated rows; every row carries the conversation URL and timestamp.
- **Evaluation datasets** — `answerMarkdown` plus `citations` is a clean, grounded dataset for analysis or fine-tuning workflows.

### Reliability and limits

- Answers vary between runs and with the model rollout. The actor records what ChatGPT showed at that moment; it never rewrites or fills gaps.
- **Per-country IP targeting is not available in this build.** ChatGPT answers come from the actor's datacenter location. Use the market hint to ask for local sources and prices; the exact prompt is recorded so you can audit it.
- **Language** follows your prompt and the optional language directive. The ChatGPT UI locale does not change the answer language on its own.
- **Model name and the follow-up searches ChatGPT ran internally are not exposed to logged-out visitors.** They are not guessed.
- **Product cards and entity chips are conditional.** They appear when ChatGPT decides to show them. Products are emitted only when real product references exist, plus a price parsed from product lines in the answer; merchant and rating are omitted when the page does not expose them.
- **A blocked or timed-out prompt still produces a row** with a status and an error message, so a missing answer is visible instead of being silently dropped.
- Runs process prompts sequentially to stay polite to the public endpoint. Keep the default prefill small; it is the cheapest run that still returns an answer.

### FAQ

**Do I need an OpenAI API key or ChatGPT account?** No. The actor uses the logged-out public ChatGPT web interface.

**Does it use a proxy?** No by default. The actor works directly. A proxy input exists if you want to route the browser yourself.

**Why are there fewer cited sources than “websites searched”?** ChatGPT reads more pages than it cites. `searchResults` lists what it read; `sources` lists what it cited.

**Why is the answer different from a run yesterday?** The answer depends on the model, the web results and the moment. That is the signal this actor is built to measure.

**Can I ask a follow-up?** Yes. Add a follow-up prompt, or use conversation mode for multiple turns.

**What does the sentiment value mean?** It is a transparent word-level score over the sentences that mention the brand: `positive`, `negative`, `mixed` or `neutral`, plus the numeric `sentimentScore`. It is not an LLM judgement.

**Are prices local?** The currency ChatGPT shows is recorded. Use the market hint for local prices and sources.

### Data source

Public ChatGPT web search at `chatgpt.com`, asked as a logged-out visitor. The actor stores only what the page renders for that prompt. It is not affiliated with OpenAI.

### Automate

Every run writes to an Apify dataset, so you can export JSON, CSV or Excel, send rows to Google Sheets, Slack, Make, Zapier or a webhook, or pull them from the Apify API. Schedule the same prompt set to build a visibility time series.

# Actor input Schema

## `mode` (type: `string`):

Ask each prompt in its own fresh chat, or keep all prompts in one conversation.

## `prompts` (type: `array`):

The questions to ask ChatGPT. Each prompt is one fresh chat in answers mode, or one turn in conversation mode.

## `followUpPrompt` (type: `string`):

Optional follow-up asked in the same chat. In answers mode it is asked after every prompt; in conversation mode it is added as the last turn.

## `maxItems` (type: `integer`):

Maximum number of prompts (or conversation turns) to process.

## `forceWebSearch` (type: `boolean`):

Turn ChatGPT's web search on for every prompt. The row still reports whether a search actually ran.

## `trackBrands` (type: `array`):

Brand names or domains (for example HubSpot or salesforce.com). Each row reports whether each one is mentioned, how early, whether its site is cited, and a simple sentiment.

## `language` (type: `string`):

Ask ChatGPT to answer in this language. The exact prompt sent is recorded in promptSent.

## `marketHint` (type: `string`):

Optional country or region to ask ChatGPT to use for local sources and prices (for example Germany or India). Recorded in promptSent.

## `includeSearchResults` (type: `boolean`):

Include the pages ChatGPT read, not only the pages it cited.

## `stripUtm` (type: `boolean`):

Remove utm_source=chatgpt.com from source URLs.

## `responseTimeoutSecs` (type: `integer`):

How long to wait for each answer before marking the row TIMEOUT.

## `retries` (type: `integer`):

How many times to retry a prompt that times out or returns no answer.

## `proxyConfiguration` (type: `object`):

Optional. The actor works without a proxy; provide one only if you want to route the browser yourself.

## Actor input object example

```json
{
  "mode": "answers",
  "prompts": [
    "best running shoes for marathon training"
  ],
  "maxItems": 1,
  "forceWebSearch": true,
  "trackBrands": [],
  "language": "auto",
  "includeSearchResults": true,
  "stripUtm": true,
  "responseTimeoutSecs": 120,
  "retries": 1
}
```

# Actor output Schema

## `answers` (type: `string`):

Dataset containing one row per prompt or conversation.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "mode": "answers",
    "prompts": [
        "best running shoes for marathon training"
    ],
    "maxItems": 1,
    "forceWebSearch": true,
    "trackBrands": [],
    "language": "auto",
    "includeSearchResults": true,
    "stripUtm": true,
    "responseTimeoutSecs": 120,
    "retries": 1
};

// Run the Actor and wait for it to finish
const run = await client.actor("xyrelith-data/chatgpt-search-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "mode": "answers",
    "prompts": ["best running shoes for marathon training"],
    "maxItems": 1,
    "forceWebSearch": True,
    "trackBrands": [],
    "language": "auto",
    "includeSearchResults": True,
    "stripUtm": True,
    "responseTimeoutSecs": 120,
    "retries": 1,
}

# Run the Actor and wait for it to finish
run = client.actor("xyrelith-data/chatgpt-search-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "mode": "answers",
  "prompts": [
    "best running shoes for marathon training"
  ],
  "maxItems": 1,
  "forceWebSearch": true,
  "trackBrands": [],
  "language": "auto",
  "includeSearchResults": true,
  "stripUtm": true,
  "responseTimeoutSecs": 120,
  "retries": 1
}' |
apify call xyrelith-data/chatgpt-search-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,xyrelith-data/chatgpt-search-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/7S45EMYN18KW2IGrY/builds/AC4PhbAfCZMlKrL3W/openapi.json
