# ChatGPT & Perplexity Answers + Citations (`dainty_dogfish/chatgpt-perplexity-answers`) Actor

Ask ChatGPT and Perplexity any query and get the AI answer, cited URLs, the web searches behind it, and where your brand ranks. Uses official APIs with live web search instead of browser scraping. Built for AI search visibility (GEO/AEO) tracking.

- **URL**: https://apify.com/dainty_dogfish/chatgpt-perplexity-answers.md
- **Developed by:** [Steven](https://apify.com/dainty_dogfish) (community)
- **Categories:** AI, SEO tools, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $40.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/running/actors-in-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

## What does ChatGPT & Perplexity Answers do?

**ChatGPT & Perplexity Answers** asks **ChatGPT** and **Perplexity** your queries and returns clean, structured data for every answer: the **AI-generated answer text**, every **cited source** with URL and domain, the **web searches ChatGPT ran** to build the answer, and **where your brands rank** in it.

It calls the engines' official APIs with live web search (OpenAI Responses API with the web search tool, and Perplexity Sonar) instead of driving a browser. There are no proxies, CAPTCHAs or logins, and nothing breaks when a chat UI changes. One run asks both engines and returns one dataset in the same shape for each.

### What can ChatGPT & Perplexity Answers do?

- **Get ChatGPT and Perplexity answers** - the full answer in markdown and as plain text, for every query and engine
- **Collect cited sources** - every cited URL with its title, domain and position in the answer
- **See ChatGPT's query fan-out** - the web searches ChatGPT ran behind the answer, plus pages it read but did not cite
- **Track brands** - for each brand you list: mentioned or not, how often, its rank (order of first mention) and whether one of its pages was cited
- **Batch processing** - submit hundreds of queries in one run; each query is asked to every engine you select
- **Apify platform benefits** - REST API, schedules, Apify MCP for AI agents, and integrations with Zapier, Make, n8n and Google Sheets

### What data can you extract?

| Field | Type | Description |
| --- | --- | --- |
| `query` | String | The query you submitted |
| `engine` | String | `chatgpt` or `perplexity` |
| `model` | String | Model version reported by the API, e.g. `gpt-5-mini-2025-08-07`, `perplexity/sonar` |
| `answer` | String | Full answer in markdown, with the engine's inline citations |
| `answerText` | String | The answer with citation markers and links removed |
| `citations` | Array | Cited sources, each with `position`, `url`, `title` and `domain` |
| `citationCount` | Number | Number of cited sources |
| `citedDomains` | Array | Unique cited domains, in order of first citation |
| `searchQueries` | Array | ChatGPT only: the web searches it ran to build the answer |
| `sourcesConsulted` | Array | ChatGPT only: pages the search returned that the answer did not cite |
| `brandMentions` | Array | Per tracked brand: `mentioned`, `mentionCount`, `rank`, `cited`, `citedUrls` |
| `brandsMentioned` | Array | Tracked brands found in the answer, in order of first mention |
| `usage` | Object | Tokens and web-search calls reported by the API |
| `error` | String | Why an answer failed; `null` on success |

### How to get ChatGPT and Perplexity answers

1. **Go to the Actor page** - open [ChatGPT & Perplexity Answers](https://apify.com/dainty_dogfish/chatgpt-perplexity-answers) on Apify Store and click **Try for free**.
2. **Enter your queries** - in the Input tab, type or paste your queries into the **Queries** field, one per line. For example: `What are the top 5 CRM tools`, `Best calorie tracking app for iPhone`.
3. **Pick engines and brands** - keep both engines or choose one, and optionally list the brands you want to track.
4. **Start the run** - click **Start**. Each answer takes about 4 seconds on Perplexity and 10-15 seconds on ChatGPT, and answers run in parallel.
5. **Export your data** - open the **Output** tab. The **Answers** view has one row per answer and the **Citations** view has one row per cited URL. Export as JSON, CSV or Excel, or send it to Google Sheets, Zapier or Make.
6. **Automate with Apify MCP** - connect your AI tool with [Apify MCP](https://docs.apify.com/platform/integrations/mcp) and let your agent run and schedule the Actor.

### Input parameters

| Parameter | Description |
| --- | --- |
| **Queries** | Your queries, one per line. Supports bulk input. |
| **Engines** | `chatgpt`, `perplexity`, or both (default both). Each engine is a separate answer. |
| **Brands to track** | Optional brand names to look for in every answer. |
| **Country** | Optional ISO country code for the web search location, e.g. `us`. |
| **ChatGPT model** | `gpt-5-mini` (default). With your own OpenAI key you can also pick `gpt-5.4-mini` or `gpt-5.5` (closest to the ChatGPT app). |
| **Your OpenAI / OpenRouter API key** | Optional: bring your own keys (stored encrypted) for the lowest price. ChatGPT uses your OpenAI key; Perplexity uses your OpenRouter key. |
| **Max concurrency** | Answers requested in parallel (1-10, default 4). |

For the full list of options, see the **Input** tab on the Actor page.

### Input example

```json
{
    "queries": "What are the top 5 CRM tools\nBest calorie tracking app for iPhone",
    "engines": ["chatgpt", "perplexity"],
    "brands": ["HubSpot", "Salesforce", "Pipedrive"],
    "countryCode": "us"
}
```

### Output example

A real Perplexity answer from a test run (answer and lists trimmed):

```json
{
    "query": "What are the top 5 CRM tools",
    "engine": "perplexity",
    "model": "perplexity/sonar",
    "countryCode": "us",
    "answer": "The **top 5 CRM tools** most commonly surfaced across recent review roundups are **Salesforce**, **HubSpot Sales Hub**, **Pipedrive**, **monday CRM**, and **Zoho CRM**.[2][8][17] ...",
    "citations": [
        {
            "position": 1,
            "url": "https://www.pcmag.com/picks/the-best-crm-software",
            "title": "The Best CRM Software We've Tested for 2026",
            "domain": "pcmag.com"
        },
        {
            "position": 2,
            "url": "https://www.g2.com/categories/crm",
            "title": "Best CRM Software: User Reviews from November 2026",
            "domain": "g2.com"
        }
    ],
    "citationCount": 21,
    "citedDomains": ["pcmag.com", "g2.com", "cybernews.com", "creatio.com", "techradar.com"],
    "brandMentions": [
        {
            "brand": "Salesforce",
            "mentioned": true,
            "mentionCount": 2,
            "firstPosition": 83,
            "rank": 1,
            "cited": true,
            "citedUrls": ["https://www.salesforce.com/crm/best-crm/"]
        }
    ],
    "brandsMentioned": ["Salesforce", "HubSpot"],
    "latencyMs": 3496,
    "error": null
}
```

The same query on ChatGPT also returns the web searches it ran:

```json
{
    "query": "What are the top 5 CRM tools",
    "engine": "chatgpt",
    "model": "gpt-5-mini-2025-08-07",
    "answer": "Here are five CRM tools that consistently appear at the top of 2026 vendor rankings ... 1) Salesforce Sales Cloud — best for large enterprises and deep customization/automation. ([gartner.com](https://www.gartner.com/en/documents/8230961?utm_source=openai)) ...",
    "citations": [
        {
            "position": 1,
            "url": "https://www.gartner.com/en/documents/8230961",
            "title": "Gartner Magic Quadrant for CRM Sales Platforms",
            "domain": "gartner.com"
        }
    ],
    "searchQueries": [
        "top CRM software 2026 Gartner Leaders CRM 2026",
        "best CRM software 2026 G2",
        "Capterra top CRM 2026 list"
    ],
    "brandsMentioned": ["Salesforce", "HubSpot"],
    "usage": {"inputTokens": 8890, "outputTokens": 882, "searchCalls": 1},
    "error": null
}
```

### Failed answers

If an engine can't return an answer, the item stays in the dataset with the reason in `error` (and the API status in `errorStatus`), so you can see exactly which queries failed. **Failed answers are never charged.**

```json
{
    "query": "What are the top 5 CRM tools",
    "engine": "chatgpt",
    "answer": null,
    "citations": [],
    "error": "HTTP 429: Rate limit reached for requests",
    "errorStatus": 429
}
```

### Pricing

Pay per successful answer. Prices depend on your Apify plan:

| Event | Free plan | Paid plans |
| --- | --- | --- |
| ChatGPT answer (our API key) | $0.18 | $0.04 |
| Perplexity answer (our API key) | $0.045 | $0.015 |
| Answer with your own API key | $0.18 | $0.0045 (Starter), $0.0036 (Scale), $0.0027 (Business and up) |

With your own key, the AI provider bills you separately for its usage (roughly $0.015 per ChatGPT answer and $0.006-0.008 per Perplexity answer at current list prices). Set **Maximum cost per run** to cap spend; the Actor stops before going over it.

### Frequently asked questions

#### Is this scraping ChatGPT and Perplexity?

No. The Actor calls OpenAI's and Perplexity's official APIs with live web search turned on, under their API terms. It does not log in to or automate the ChatGPT or Perplexity apps.

#### Are the answers the same as in the ChatGPT and Perplexity apps?

They are close but not identical. The apps add personalization and memory, and AI answers vary between runs. Cited sources and recommended brands are usually very similar. Treat results as a sample of what the engines say, and run the same queries on a schedule to see trends.

#### What are the best use cases?

**AI search visibility (GEO / AEO)** - track whether ChatGPT and Perplexity mention and cite your brand. **Competitive analysis** - compare share of voice with competitors across the same queries. **Content research** - find which sites AI engines cite for your topics, and which searches ChatGPT runs to answer them. **AI agents and dashboards** - feed structured answers and citations into your own tools.

#### How does brand tracking work?

Brand matching is case-insensitive and whole-word. `rank` is the order of first mention among the brands you list. A brand counts as **cited** when its name appears in a cited page's domain or title.

#### Can I integrate it with other tools?

Yes. Use the **Apify API**, the **Apify Python/JavaScript clients**, **Apify MCP**, webhooks, or integrations with **Zapier**, **Make**, **n8n**, **Google Sheets** and **Slack**. Save your input as a task and schedule it hourly, daily or weekly.

#### Can you add other engines?

Gemini and Google AI Overviews are candidates. Tell us what you need in the **Issues** tab.

# Actor input Schema

## `queries` (type: `string`):

One query per line. Each line is asked to every selected engine; each successful answer is one charged event.

## `engines` (type: `array`):

Answer engines to ask. Each engine is a separate answer and charge.

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

Brand names to look for in each answer. Output shows mentioned, mention count, rank (order of first mention) and whether the brand domain is cited.

## `countryCode` (type: `string`):

Approximate user location for the web search (ISO country code), e.g. us. Leave empty for no location.

## `chatgptModel` (type: `string`):

OpenAI model used with the web search tool. GPT-5.4 mini and GPT-5.5 require your own OpenAI API key.

## `perplexityModel` (type: `string`):

Perplexity model used for answers.

## `maxConcurrency` (type: `integer`):

Answers requested in parallel.

## `openaiApiKey` (type: `string`):

Bring your own key: ChatGPT answers run on your OpenAI account and are charged at the lower byok-answer price.

## `openrouterApiKey` (type: `string`):

Bring your own key: Perplexity answers run on your OpenRouter account and are charged at the lower byok-answer price.

## Actor input object example

```json
{
  "queries": "What are the top 5 CRM tools\nBest calorie tracking app for iPhone",
  "engines": [
    "chatgpt",
    "perplexity"
  ],
  "brands": [
    "HubSpot",
    "Salesforce",
    "Pipedrive"
  ],
  "countryCode": "us",
  "chatgptModel": "gpt-5-mini",
  "perplexityModel": "sonar",
  "maxConcurrency": 4
}
```

# Actor output Schema

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

All answers (failed ones have an error field and are not charged)

## `citations` (type: `string`):

Cited sources, one row per URL

# 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 = {
    "queries": `What are the top 5 CRM tools
Best CRM for a 10-person startup`,
    "engines": [
        "chatgpt",
        "perplexity"
    ],
    "brands": [
        "HubSpot",
        "Salesforce"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("dainty_dogfish/chatgpt-perplexity-answers").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 = {
    "queries": """What are the top 5 CRM tools
Best CRM for a 10-person startup""",
    "engines": [
        "chatgpt",
        "perplexity",
    ],
    "brands": [
        "HubSpot",
        "Salesforce",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("dainty_dogfish/chatgpt-perplexity-answers").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 '{
  "queries": "What are the top 5 CRM tools\\nBest CRM for a 10-person startup",
  "engines": [
    "chatgpt",
    "perplexity"
  ],
  "brands": [
    "HubSpot",
    "Salesforce"
  ]
}' |
apify call dainty_dogfish/chatgpt-perplexity-answers --silent --output-dataset

```

## MCP server setup

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

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/bjLbjwcph4Gt3arai/builds/IWcgaxZrBlIEerPgM/openapi.json
