# AI Answers API: ChatGPT, Perplexity, Gemini, Claude & Grok (`zaiq/ai-answers-api`) Actor

Ask ChatGPT, Perplexity, Gemini, Claude and Grok your questions in one run: every answer with the sources it cites, live web search from any country, and where the AIs agree and disagree. Bulk questions, fast low-cost models or flagships, clean JSON for your app or agent.

- **URL**: https://apify.com/zaiq/ai-answers-api.md
- **Developed by:** [Zaiq](https://apify.com/zaiq) (community)
- **Categories:** AI, Developer tools, SEO tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.20 / 1,000 ai 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

## AI Answers API: ask ChatGPT, Perplexity, Gemini, Claude and Grok, with sources and a consensus

Ask **ChatGPT, Perplexity, Gemini, Claude and Grok** your questions in **one run** and get **every answer with the sources it cites**, searched live on the web **from the country you pick**. Hundreds of questions at once, as clean JSON for your app, sheet or agent.

Each question also gets a **consensus report**: the answer most of them support, **what they agree and disagree on**, **claims only one makes**, an **agreement score** and the **sites more than one cited**. Pick **fast low-cost models** (cents an answer) or each company's **flagship**.

### What you get

| Field | What it holds |
|---|---|
| Answer rows | `prompt`, `engine`, `model`, `answer`, `citations` (position, url, domain, kind), `citationCount`, `citedDomains`, `country`, `webSearch`, `finishReason`, `aiCostUsd`, `seconds` |
| Consensus rows | `consensus`, `agreeOn`, `disagreeOn` (each assistant's position), `uniqueClaims`, `mostComplete`, `agreementScore`, `domainsCitedByMoreThanOne`, `enginesAnswered` |
| SUMMARY | the models used, answers, failures, consensus reports, the AI usage reported, what was charged |

### What people use it for

- **Compare the AIs:** how each assistant answers the questions your customers ask, and which sites it trusts
- **Research with sources:** answers to many questions at once, each with links to check
- **Fact-checking:** where five assistants agree, and where one stands alone
- **Apps and agents:** multi-model answers through one API, without five API keys

### How to use it

1. Add your **questions**, one per line.
2. Pick the **assistants**, the **country** to search from and the **model tier**.
3. Click **Start** and open the **Answers** table: one row per question and assistant, one consensus row per question.

### Input

| Field | Example | Notes |
|---|---|---|
| Questions | `What are the best project management tools for a small team in 2026, and what does each cost?` | Each goes to every assistant |
| AI assistants | ChatGPT, Perplexity, Gemini, Claude | Grok too |
| Models | `fast` | `flagship`: what each assistant's app runs |
| Live web search | on | Off: answers from what the model knows |
| Country | `US` | Gemini takes no location |
| Consensus report | on | Two or more assistants |
| Instructions | `Answer in under 100 words` | Sent with every question |
| Fixed models | `{"chatgpt": "openai/gpt-6.1-sol"}` | Any OpenRouter model |

### Output

Each result is one row in the run's dataset (download it as JSON, CSV, Excel, XML or HTML, or read it through the API). An example row (values shortened):

```json
{
  "prompt": "What are the best project management tools for a small team in 2026, and what does each cost?",
  "engine": "ChatGPT",
  "model": "openai/gpt-5.4-mini",
  "modelTier": "fast",
  "webSearch": true,
  "country": "US",
  "answer": "Here's a practical 2026 shortlist for a small team… | Tool A | Teams that want an all-in-one workspace | Free; paid from $7/user/month (annual billing) ([tool-a.example](https://tool-a.example/pricing)) | …",
  "citations": [
    {
      "position": 1,
      "url": "https://tool-a.example/pricing",
      "domain": "tool-a.example",
      "kind": "other"
    },
    {
      "position": 2,
      "url": "https://tool-b.example/pricing",
      "domain": "tool-b.example",
      "kind": "other"
    }
  ],
  "citationCount": 7,
  "citedDomains": [
    "tool-a.example",
    "tool-b.example",
    "tool-c.example",
    "tool-d.example"
  ],
  "finishReason": "stop",
  "aiCostUsd": 0.0312,
  "seconds": 8.1,
  "status": "ok"
}
```

From runs on 17 October 2026 (one pricing question to all five assistants on the fast models; tool names and sites replaced): each answered with 0 to 20 sources, Perplexity in 5 seconds and Grok in 25; the consensus report gave an agreement score of 75 out of 100, named the most complete answer, listed the prices they disagreed on with each assistant's figure, and the claims only one of them made. A record named `SUMMARY` in the run's key-value store lists the models used and what was charged.

### Pricing

- **$0.004 per AI answer**: one assistant's answer to one question, with its sources
- **$0.004 per consensus report** (one per question when two or more assistants answered; switch it off to skip it)
- Free: failed answers and failed reports
- The AI usage is billed by Apify's AI gateway at OpenRouter's rates. Measured 17 October 2026 on a hard pricing question, fast models: Perplexity Sonar $0.006, GPT-5.4 mini $0.02-0.03, Claude Haiku 5.5 $0.023, Grok 4.3 $0.049, Gemini 3.8 Flash $0.061 (Google charges per search, and it ran about four); the consensus report about $0.005. Flagship: GPT-6.1 Sol about $0.09 and Grok 4.7 $0.15-0.23 an answer (12 October); Apify charges free-plan accounts 10 times the AI usage

What typical jobs cost at the list price:

| Job | Cost |
|---|---|
| 1 question to 4 assistants with a consensus (fast) | $0.02 + about $0.12 AI |
| 100 questions to Perplexity only | $0.40 + about $0.60 AI |
| 10 questions to all five (fast) | $0.24 + about $1.70 AI |

On Apify's Scale and Business plans the per-event prices are lower (Store discounts). Set **Maximum cost per run** and the Actor stops cleanly when it is reached: you never pay more than that.

### Tips

- Perplexity alone is the cheapest way to get web answers with many sources.
- Use the flagship tier when you need the answers your customers see in each assistant's app.
- Shape every answer with Instructions: a length, a format (a table, a numbered list) or a role.
- Tracking whether the AIs name your brand? The AI Answer Tracker counts mentions and citations per brand.

### Use it through the API

**Python**

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("zaiq/ai-answers-api").call(run_input={"prompts": ["What are the best project management tools for a small team in 2026?"], "engines": ["chatgpt", "perplexity", "gemini", "claude"], "country": "US"})
for row in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(row)
```

**JavaScript**

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

const client = new ApifyClient({ token: '<YOUR_APIFY_TOKEN>' });
const run = await client.actor('zaiq/ai-answers-api').call({"prompts": ["What are the best project management tools for a small team in 2026?"], "engines": ["chatgpt", "perplexity", "gemini", "claude"], "country": "US"});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
```

**HTTP (one call, results back)**

```bash
curl -X POST 'https://api.apify.com/v2/acts/zaiq~ai-answers-api/run-sync-get-dataset-items?token=<YOUR_APIFY_TOKEN>' \
  -H 'Content-Type: application/json' \
  -d '{"prompts": ["What are the best project management tools for a small team in 2026?"], "engines": ["chatgpt", "perplexity", "gemini", "claude"], "country": "US"}'
```

### Integrations and schedules

- **Schedules:** run it every hour, day or week from the Apify Console (Schedules) and keep a history of results.
- **Make, Zapier, n8n, Google Sheets, Slack, Airtable:** connect it through Apify's integrations, or send each finished run to a **webhook**.
- **Datasets:** results stay in the run's dataset; export them or read them by API whenever you need them.

### Use it with AI agents (MCP)

Add Apify's MCP server (`https://mcp.apify.com`) to Claude, ChatGPT, Cursor, VS Code or any MCP client. The agent can find this Actor and run it for you: ask it for "ask ChatGPT, Perplexity and Claude this question and show me where they disagree". AI agents can also pay for runs directly through Apify's agentic payments.

### Limits

- These are the assistants' official APIs with their own web search, not the consumer apps: the apps add memory, personalisation and their own instructions, so their answers can differ.
- Answers change from run to run and as the models are updated.
- An answer can hold at most 2,048 tokens (about 1,500 words), the limit of Apify's AI gateway.
- Gemini does not take a location; Perplexity always searches the web.

### FAQ

**Do I need API keys for OpenAI, Anthropic, Google or xAI?**

No. Apify's AI gateway runs every model and bills its exact usage to your Apify account.

**Is it the real ChatGPT?**

It is OpenAI's model through OpenAI's API with OpenAI's own web search: the same model family as ChatGPT, not the chatgpt.com app.

**Which models are used?**

Each company's newest model in the tier you pick, chosen at the start of every run; the model is in every row. Fixed models pins any OpenRouter model.

**Can I switch off web search?**

Yes, and the assistants answer from what they know (Perplexity always searches).

### Related Actors from Zaiq

- [ai-answer-tracker](https://apify.com/zaiq/ai-answer-tracker): whether the AIs name and cite your brand
- [bulk-ai-runner](https://apify.com/zaiq/bulk-ai-runner): one prompt on every row of your data
- [ai-web-scraper](https://apify.com/zaiq/ai-web-scraper): any page to JSON with a prompt
- [llm-website-crawler](https://apify.com/zaiq/llm-website-crawler): sites as Markdown for your own AI

### Support

Questions, a site that changed, or a field you need? Open an issue on this Actor's **Issues** tab: we answer there, usually within a day.

***

Also found as: chatgpt api, perplexity api, ai answers api, llm api, compare ai answers, gemini api, claude api, grok api, ai search api, multi llm api.

# Actor input Schema

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

One question per line, as you would type it into ChatGPT. Each question goes to every assistant you pick.

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

Each assistant answers through its official API. With web search on, each uses its own search (Gemini uses Google Search).

## `modelTier` (type: `string`):

Fast: each company's newest low-cost model. AI usage measured 17 Oct 2026 on a hard pricing question: Perplexity Sonar $0.006, GPT-5.4 mini $0.02-0.03, Claude Haiku 5.5 $0.023, Grok 4.3 $0.049, Gemini 3.8 Flash $0.061 (Google charges per search and it ran about four). Flagship: the newest model each assistant's own app runs, for the answers your customers see: about $0.09 an answer for GPT-6.1 Sol and $0.15-0.23 for Grok 4.7.

## `webSearch` (type: `boolean`):

On: each assistant searches the web and cites its sources. Off: they answer from what they know (Perplexity always searches).

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

Search as from this country (two-letter code). ChatGPT, Perplexity, Claude and Grok take it; Gemini does not take a location. Empty: no location.

## `consensus` (type: `boolean`):

Compare each question's answers: the consensus answer, what they agree and disagree on, claims only one made, an agreement score and the sites more than one cited. Needs two or more assistants.

## `instructions` (type: `string`):

Sent with every question, e.g. 'Answer in under 100 words', 'Reply as a numbered list' or 'You are a tax adviser in Germany'.

## `maxAnswerTokens` (type: `integer`):

About 0.75 words a token; 2,048 is the most Apify's AI gateway allows. Shorter answers: lower it, or say so in Instructions.

## `consensusLanguage` (type: `string`):

The language of the consensus report (the answers stay in the language of the question).

## `fixedModels` (type: `object`):

Pin any OpenRouter model id per assistant instead of the tier's newest, e.g. {"chatgpt": "openai/gpt-6.1-sol", "claude": "anthropic/claude-sonnet-5.5"}.

## Actor input object example

```json
{
  "prompts": [
    "What are the best project management tools for a small team in 2026, and what does each cost?"
  ],
  "engines": [
    "chatgpt",
    "perplexity",
    "gemini",
    "claude"
  ],
  "modelTier": "fast",
  "webSearch": true,
  "consensus": true,
  "maxAnswerTokens": 2048,
  "consensusLanguage": "English",
  "fixedModels": {}
}
```

# Actor output Schema

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

Dataset: the results.

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

What each input returned, and notes.

# 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 = {
    "prompts": [
        "What are the best project management tools for a small team in 2026, and what does each cost?"
    ],
    "engines": [
        "chatgpt",
        "perplexity",
        "gemini",
        "claude"
    ],
    "fixedModels": {}
};

// Run the Actor and wait for it to finish
const run = await client.actor("zaiq/ai-answers-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 = {
    "prompts": ["What are the best project management tools for a small team in 2026, and what does each cost?"],
    "engines": [
        "chatgpt",
        "perplexity",
        "gemini",
        "claude",
    ],
    "fixedModels": {},
}

# Run the Actor and wait for it to finish
run = client.actor("zaiq/ai-answers-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 '{
  "prompts": [
    "What are the best project management tools for a small team in 2026, and what does each cost?"
  ],
  "engines": [
    "chatgpt",
    "perplexity",
    "gemini",
    "claude"
  ],
  "fixedModels": {}
}' |
apify call zaiq/ai-answers-api --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,zaiq/ai-answers-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/w45hiRMNouViNGg5K/builds/Gp5yeqj0ebhso5MKb/openapi.json
