# ChatGPT Search API: Answers, Sources & Citations in Bulk (`nerolabs/chatgpt-search-api`) Actor

ChatGPT answers with cited sources from OpenAI's API with its own web search (not chatgpt.com, so no blocks or logins). Inputs: questions, fileUrl (CSV or Google Sheet), datasetId, country, brands, competitors, monitor. Charged only per answer returned. Agent-ready: x402, MCP.

- **URL**: https://apify.com/nerolabs/chatgpt-search-api.md
- **Developed by:** [Adam Pearce](https://apify.com/nerolabs) (community)
- **Categories:** AI, SEO tools, Developer tools
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $12.00 / 1,000 chatgpt answers

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
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 API: Answers, Sources & Citations in Bulk

**ChatGPT answers in bulk with their cited sources: paste your questions (or a CSV, Google Sheet or dataset) and get every answer back with the web pages it cited, the cited domains and, if you want, whether your brand and your competitors were named.** The answers come from OpenAI's own API, a current GPT model running OpenAI's built-in web search, not from a browser session on chatgpt.com, so they can differ from what the ChatGPT app shows a logged-in person. That is also why there are no blocks, logins, cookies, proxies or CAPTCHAs, and why runs finish in seconds.

**You pay only when an answer comes back.** Failed, empty, duplicate and skipped questions are marked on the row and never charged.

### At a glance

- **Result:** one row per question with the full ChatGPT-style answer, its cited sources in order (position, URL, page title, domain, where in the answer it was cited), the cited domains, how many web searches OpenAI ran, and your brand's position next to the competitors you name.
- **Proof:** in tests on 4th December 2026, 20 of 20 real questions (shopping, local businesses, travel, software, today's news) came back with at least one cited source from OpenAI's own web search, news answers citing pages published that day, and a 50 question run answered all 50 with sources in 37 seconds.
- **Speed:** about 6 seconds an answer (10 at most in those tests), 5 questions at a time, up to 10.
- **Effort:** one call. It accepts typed questions, a CSV, TSV, Excel or JSON link, a Google Sheet link or an Apify dataset. No OpenAI account or key.
- **Bonuses, included in the price:** cited sources with position and domain; the answer as plain text as well as with its inline links; a brand and competitor check with position; "is my website cited"; the 30 most-cited domains in the summary (where to get listed); monitor mode that marks new and dropped sources on a schedule.
- **Price of a typical job:** 24 questions cost $0.36 here plus about $0.26 of OpenAI model and search cost billed by Apify, about $0.62 in all. 1,000 questions are about $26.
- **Next step:** switch on monitor mode and schedule it weekly: only what changed since the last run is flagged. AI agents can call it through Apify's MCP server or x402.

### What you can use it for

- **AI search visibility (GEO / AEO):** does ChatGPT name your brand for "best CRM for a small business"? In what position, next to which competitors, and does it cite your site?
- **Brand and competitor tracking:** turn on monitor mode and schedule it weekly to see which sources and brand mentions appeared or dropped since the last run.
- **Research in bulk:** ask 500 questions from a Google Sheet and get answers plus sources as rows, ready for Excel, an LLM pipeline or a database.
- **Content and PR targets:** the summary ranks the domains ChatGPT cites most for your topic, so you know which sites to get listed on.
- **Local and country answers:** set a country (or a `country` column) and OpenAI searches as a user there.

### Sample output (one row)

```json
{
  "question": "Best noise cancelling headphones under $200",
  "status": "ok",
  "answer": "**Best for most people: Sony WH-CH720N.** They're very lightweight and offer capable noise cancellation... ([recordingnow.com](https://recordingnow.com/blog/best-budget-wireless-headphones/))",
  "answerText": "Best for most people: Sony WH-CH720N. They're very lightweight and offer capable noise cancellation...",
  "citations": [
    { "position": 1, "url": "https://recordingnow.com/blog/best-budget-wireless-headphones/", "title": "Best Noise Cancelling Headphones under $200 (50+ Tested!)", "domain": "recordingnow.com", "answerIndex": 209 },
    { "position": 2, "url": "https://www.rtings.com/headphones/reviews/best/noise-cancelling-headphones-under-200", "title": "The 5 Best Noise Cancelling Headphones Under $200 of 2026", "domain": "rtings.com", "answerIndex": 417 }
  ],
  "citedDomains": ["recordingnow.com", "rtings.com"],
  "citationCount": 2,
  "webSearches": 1,
  "brandMentioned": true,
  "brandPosition": 1,
  "competitorsMentioned": ["JBL"],
  "model": "openai/gpt-6-luna",
  "modelCostUsd": 0.0115,
  "monitorStatus": null
}
```

Every other column in your file or dataset is kept on the row.

The run's **Summary** (key-value store record `OUTPUT`) gives the share of answers that name your brand, the share that cite your site, competitors ranked by share of answers and average position, and the 30 most-cited domains.

### How much does it cost?

You pay two small amounts, both shown on your Apify bill:

1. **$0.015 per answer** to this Actor ($0.0135 on Apify's Silver plan, $0.012 on Gold and above). Only answers that come back with text are charged. Failed, empty, duplicate and skipped rows are marked on the row and never charged.
2. **OpenAI's own cost, about $0.011 per answer** with the default settings (one web search at $0.01 plus a few tenths of a cent of model tokens), billed to your Apify account by Apify's official OpenRouter proxy at OpenRouter's rate. 'As many searches as the model wants' runs 1 to 4 searches, about $0.02 to $0.04. GPT-6.1 Terra is about $0.02 per answer.

So all-in, an answer costs about **$0.026** on a paid Apify plan. Asking 1,000 questions a month costs about $26. **On Apify's Free plan, Apify bills the proxy cost at 10x**, so an answer costs about $0.13 there; a paid plan is much cheaper for regular use.

### Input

- **Questions**, or a **File or Google Sheet URL** (CSV, TSV, Excel, JSON), or an Apify **Dataset**. One question per row; the question column is detected (question, query, prompt, keyword) or set with *Question column*. *Question template* turns a keyword list into questions ("Best CRM for {question}").
- **OpenAI model**: `gpt-6-luna` (default) or `gpt-6.1-terra`.
- **Web searches per question**: one (default) or as many as the model wants.
- **Country** and **Answer language**: both optional.
- **Your brand names**, **Your website domains**, **Competitors**: all optional.
- **Monitor mode**: remembers each question's last answer and marks new or dropped sources (`isNew` on each citation, `newCitations`, `droppedCitations`) and brand or competitor mentions gained or lost (`changes`). Use *Monitor name* to keep several monitors apart.

### Good to know

- **This is OpenAI's API, not the ChatGPT website.** The answers come from a current OpenAI GPT model with OpenAI's own web search tool, called through Apify's official OpenRouter proxy. The ChatGPT app can use a different model, your chat history and your account settings, so its wording and sources can differ from these, and answers change from run to run. For tracking how ChatGPT-style answers treat a brand across many questions, the API is the stable, repeatable source.
- OpenAI does not return the search queries it ran, only how many searches it made (`webSearches`).
- Citations are listed in the order the answer first cites them; `answerIndex` is where in `answer` that happens.
- Brand and competitor mentions are found by exact whole-word matching in code, not guessed by an AI.
- About 5 questions are asked at a time, with automatic retries.

### FAQ

**Is this a ChatGPT scraper?** No. Nothing is scraped from chatgpt.com. It asks OpenAI's API with web search switched on, which is why it never hits a login wall, a block or a CAPTCHA.

**Do I need an OpenAI API key?** No. The model is called through Apify's own OpenRouter proxy with your run's Apify token, and its cost is added to your Apify bill.

**Can I track the same questions every week?** Yes: turn on monitor mode and schedule the Actor. Each run marks what changed since the one before.

**Can I see what the app shows in my country?** Set *Country* (for example GB) and OpenAI searches as a user located there. It is still the API, not your personal ChatGPT account.

If this saved you checking ChatGPT by hand, a review on the Apify Store helps a lot.

# Actor input Schema

## `questions` (type: `array`):

The questions or search queries to ask ChatGPT, one per line. Each one returns the full answer from OpenAI's API with web search, with its cited sources, and is charged once, only when an answer with text comes back. Or give a CSV, Google Sheet or dataset below instead.

## `fileUrl` (type: `string`):

A public link to a CSV, TSV, Excel, JSON or JSON Lines file with one question per row. A normal Google Sheets link works (share it as 'Anyone with the link can view'). Every other column is kept on the output row. Used when 'Questions' is empty.

## `datasetId` (type: `string`):

An Apify dataset with one question per row, for example a keyword list from another Actor. Every original column is kept. Use the picker rather than typing an ID. Used when 'Questions' and 'File or Google Sheet URL' are empty.

## `questionField` (type: `string`):

For a file or dataset: the column that holds the question. Leave empty to detect it (looks for question, query, prompt, keyword).

## `questionTemplate` (type: `string`):

Optional. Turns each row into a full question, for example 'Best CRM for {question}' with a row 'real estate agents'. {question} is replaced by the row's text. Useful when a sheet holds keywords, not questions.

## `fileFormat` (type: `string`):

Leave on auto unless the file is detected wrongly.

## `sheetName` (type: `string`):

For an Excel file: which sheet to read. Leave empty for the first sheet.

## `model` (type: `string`):

gpt-6-luna is fast and cheap (about $0.011 of model and search cost per answer with one web search, billed to your Apify account by Apify's OpenRouter proxy). gpt-6.1-terra is a stronger model (about $0.02 per answer). Both are charged the same Actor price per answer.

## `searchDepth` (type: `string`):

'one' asks OpenAI to run exactly one web search per question (fastest, about $0.011 model cost). 'auto' lets the model search as often as it wants, like the ChatGPT app can (1 to 4 searches, about $0.02 to $0.04 model cost, more sources). OpenAI bills $0.01 per search.

## `country` (type: `string`):

Optional two-letter country code (US, GB, DE) so OpenAI searches as a user in that country. A 'country' column in the file overrides it per row.

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

Optional, for example 'Spanish' or 'German'. The answer is written in this language; the question can be in any language.

## `systemPrompt` (type: `string`):

Optional style instruction added to every question, for example 'Answer in 3 bullet points' or 'Name at least 5 products'. To change what is asked, use 'Question template'.

## `brands` (type: `array`):

Optional. Your brand or product names, for example 'HubSpot'. Each answer reports brandMentioned and brandPosition (1 = named first among all your brands and competitors that appear).

## `domains` (type: `array`):

Optional. Your website domains, for example 'hubspot.com'. Each answer lists ownDomainsCited with the position of each cited page.

## `competitors` (type: `array`):

Optional. Competitor names or domains, for example 'Salesforce'. Each answer lists competitorsMentioned in the order named, and the summary ranks them by share of answers.

## `monitor` (type: `boolean`):

Remember each question's last answer (in a named key-value store on your account) and, on the next run, mark only what changed: new and dropped sources (isNew on each citation), newly cited or dropped sites, and brand or competitor mentions gained or lost. Schedule the run daily or weekly. Off by default.

## `monitorName` (type: `string`):

Keeps separate monitors apart, for example one per client. Letters, numbers and dashes.

## `onlyChanged` (type: `boolean`):

In monitor mode, write only rows that are new or changed since the last run. Every answered question is still charged once, because OpenAI was asked.

## `keepOriginalFields` (type: `boolean`):

Copy every other column of the input row onto the output row.

## `concurrency` (type: `integer`):

How many questions are asked at the same time.

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

Stop after this many rows from the source.

## Actor input object example

```json
{
  "questions": [
    "What is the best CRM for a small business?",
    "HubSpot vs Salesforce for a startup",
    "Cheapest CRM with email automation"
  ],
  "fileFormat": "auto",
  "model": "gpt-6-luna",
  "searchDepth": "one",
  "brands": [
    "HubSpot"
  ],
  "domains": [
    "hubspot.com"
  ],
  "competitors": [
    "Salesforce",
    "Pipedrive",
    "Zoho"
  ],
  "monitor": false,
  "monitorName": "default",
  "onlyChanged": false,
  "keepOriginalFields": true,
  "concurrency": 5
}
```

# Actor output Schema

## `results` (type: `string`):

One row per question: the ChatGPT answer from OpenAI's API with web search, cited sources with position and domain, brand and competitor checks, monitor changes. Your original columns are kept.

## `summary` (type: `string`):

Questions answered, model and search cost, brand share of answers, competitors ranked, most cited domains, monitor changes and warnings.

# 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 = {
    "questions": [
        "What is the best CRM for a small business?",
        "HubSpot vs Salesforce for a startup",
        "Cheapest CRM with email automation"
    ],
    "brands": [
        "HubSpot"
    ],
    "domains": [
        "hubspot.com"
    ],
    "competitors": [
        "Salesforce",
        "Pipedrive",
        "Zoho"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("nerolabs/chatgpt-search-api").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 = {
    "questions": [
        "What is the best CRM for a small business?",
        "HubSpot vs Salesforce for a startup",
        "Cheapest CRM with email automation",
    ],
    "brands": ["HubSpot"],
    "domains": ["hubspot.com"],
    "competitors": [
        "Salesforce",
        "Pipedrive",
        "Zoho",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("nerolabs/chatgpt-search-api").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 '{
  "questions": [
    "What is the best CRM for a small business?",
    "HubSpot vs Salesforce for a startup",
    "Cheapest CRM with email automation"
  ],
  "brands": [
    "HubSpot"
  ],
  "domains": [
    "hubspot.com"
  ],
  "competitors": [
    "Salesforce",
    "Pipedrive",
    "Zoho"
  ]
}' |
apify call nerolabs/chatgpt-search-api --silent --output-dataset

```

## MCP server setup

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

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/CWNWgHhEasaYQvCMq/builds/TVHDDeu2HOaaK3950/openapi.json
