Skip to content

Guide

Can the ChatGPT API search the web?

Yes. OpenAI's API can search the web: the Responses API has a web_search tool and Chat Completions has a search model (as of November 2026). But the API's answer is not the answer chatgpt.com shows: with the API you choose the model, instructions and tool settings, while the ChatGPT app uses its own. To measure what people read in ChatGPT, ask the app.

Updated

Why is the API's answer different from the ChatGPT app's?

OpenAI API with web search and the ChatGPT app, per OpenAI's pages (as of November 2026)
OpenAI API (web_search)ChatGPT app
Who picks the model and instructionsYou, in each requestThe app
When it searchesWhen the tool is enabled and the model calls itChatGPT searches automatically or when the user picks Web search
Locationuser_location you send (approximate)May be estimated from the IP address; precise location is optional
OutputJSON: text with url_citation annotationsA page with the answer, citations and links
BillingPer token and per tool callChatGPT plans; billed separately from the API

Sources: ChatGPT search describes search in the app; billing says API usage is not included in ChatGPT subscriptions. OpenAI does not say the two return the same answer, and since the settings differ, you should not expect them to. If your question is "what does ChatGPT tell my customers?", the app is the thing to measure.

Is the ChatGPT API cheaper than ChatGPT Plus?

They are not the same purchase. A ChatGPT plan is a subscription to the app for a person. The API is billed per token and per tool call, on a separate account, and a ChatGPT subscription does not include API usage (per OpenAI's billing help). Which costs less depends entirely on how much you call the API.

How do I get the answer chatgpt.com shows, as JSON?

Ask the app. PromptGale opens chatgpt.com in a real browser from the country you choose and returns the answer, its sources and a brand analysis, for 1.5 credits per answer.

curl
curl -X POST https://promptgale.com/v1/sync/task \
  -H "Authorization: Bearer $PROMPTGALE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "taskType": "CHATGPT",
    "payload": {
      "prompt": "best coffee subscription for home espresso",
      "country": "GB",
      "brand": "Acme Coffee"
    }
  }'
Python
import os
import requests

res = requests.post(
    "https://promptgale.com/v1/sync/task",
    headers={"Authorization": f"Bearer {os.environ['PROMPTGALE_API_KEY']}"},
    json={"taskType": "CHATGPT", "payload": {"prompt": "best coffee subscription for home espresso", "country": "GB", "brand": "Acme Coffee"}},
    timeout=300,
)
task = res.json()["data"]
print(task["status"], task["result"]["text"][:300])
Node.js
const res = await fetch('https://promptgale.com/v1/sync/task', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.PROMPTGALE_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ taskType: 'CHATGPT', payload: {prompt: "best coffee subscription for home espresso", country: "GB", brand: "Acme Coffee"} }),
});
const { data: task } = await res.json();
console.log(task.status, task.result.text.slice(0, 300));
Response
{
  "success": true,
  "data": {
    "id": "tsk_3Xb8Kq0Lm2Np4Rs6Tu8Vw0Yz",
    "taskType": "CHATGPT",
    "status": "COMPLETED",
    "country": "US",
    "credits": 1.5,
    "creditsCharged": 1.5,
    "result": {
      "engine": "CHATGPT",
      "text": "For home espresso, these are the subscriptions people recommend most often: 1. Acme Coffee roasts to order and lets you pick the grind for your machine. 2. Northwind Roasters has a wide range of single-origin espresso roasts. 3. Bluebird Beans ships every two weeks and is easy to pause.",
      "sources": [
        {
          "position": 1,
          "url": "https://acmecoffee.example/espresso-subscription",
          "title": "Acme Coffee: espresso subscription",
          "domain": "acmecoffee.example",
          "cited": true,
          "citationNumber": 1
        },
        {
          "position": 2,
          "url": "https://reddit.com/threads/home-espresso",
          "title": "Home espresso subscriptions, compared",
          "domain": "reddit.com",
          "cited": true,
          "citationNumber": 2
        },
        {
          "position": 3,
          "url": "https://northwind.example/espresso-subscription",
          "title": "Northwind Roasters: espresso subscription",
          "domain": "northwind.example",
          "cited": true,
          "citationNumber": 3
        },
        {
          "position": 4,
          "url": "https://homebarista.example/threads/home-espresso",
          "title": "Home espresso subscriptions, compared",
          "domain": "homebarista.example",
          "cited": true,
          "citationNumber": 4
        }
      ],
      "analysis": {
        "status": "ok",
        "brands": [
          {
            "name": "Acme Coffee",
            "role": "target",
            "mentioned": true,
            "mentions": 1,
            "firstPosition": 79,
            "rank": 1,
            "cited": true,
            "citedUrls": [
              "https://acmecoffee.example/espresso-subscription"
            ],
            "shareOfVoice": 33.3
          },
          {
            "name": "Northwind Roasters",
            "role": "competitor",
            "mentioned": true,
            "mentions": 1,
            "firstPosition": 156,
            "rank": 2,
            "cited": true,
            "citedUrls": [
              "https://northwind.example/espresso-subscription"
            ],
            "shareOfVoice": 33.3
          },
          {
            "name": "Bluebird Beans",
            "role": "competitor",
            "mentioned": true,
            "mentions": 1,
            "firstPosition": 229,
            "rank": 3,
            "cited": false,
            "citedUrls": [],
            "shareOfVoice": 33.3
          }
        ]
      },
      "location": {
        "country": "US",
        "locale": "en-US",
        "timezone": "America/New_York"
      }
    }
  }
}

Sample output: the brands, domains and answer are made up (Acme Coffee and its competitors do not exist). The field names and shapes are the real API.

How do I compare the API and the app for the same prompt?

Run the prompt both ways from the same country, then compare what each one cites. The domains that appear only in the app are the ones a person in that market actually sees.

compare.mjs
// Same prompt, two answers: which domains does each one cite?
const appDomains = new Set(appTask.result.sources.filter((s) => s.cited).map((s) => s.domain)); // PromptGale, CHATGPT
const apiDomains = new Set(apiCitations.map((c) => new URL(c.url).hostname.replace(/^www\./, ''))); // OpenAI url_citation
const both = [...appDomains].filter((d) => apiDomains.has(d));
console.log({ onlyInApp: [...appDomains].filter((d) => !apiDomains.has(d)), onlyInApi: [...apiDomains].filter((d) => !appDomains.has(d)), both });

Questions, answered

Can the ChatGPT API search the web?

Yes. OpenAI's Responses API has a web_search tool that returns url_citation annotations, and Chat Completions has the gpt-5-search-api model, per OpenAI's docs in November 2026.

Does the API give the same answer as ChatGPT?

Not necessarily. In the API you choose the model, instructions and tool settings; the app uses its own. Treat them as two different answers to the same question.

Is ChatGPT Plus usage included in the API?

No. OpenAI's help center says API usage is not included in ChatGPT subscriptions and the two are billed separately.

How do I get the chatgpt.com answer programmatically?

Ask the app itself. PromptGale opens chatgpt.com from the country you pick and returns the answer, sources and brand analysis as JSON, for 1.5 credits per answer.

Sources

Statements about other companies come from their own pages, read on . Prices and products change; check the source before you decide.

Run your first prompt in a minute.