ChatGPT API

ChatGPT Search API

Ask ChatGPT a web-grounded question and receive an answer with source citations. ChatGPT composes each answer per request, so the same prompt returns different wording and a different source set.

POST/v1/run/chatgpt.search
Uptime
97.88%
30d · 519 calls
Requests
519
30d · weekly, last 12 wks
Response
37.2s
median · 30d

Try it

Make your first request

Open in
Get a free key
Sample response
Free runs return only the first 3 results. Fund a key to get the full response.
{
  "data": {
    "ads": [
      {
        "advertiserName": "Example title",
        "advertiserUrl": "https://example.com/page",
        "domain": "example.com",
        "image": "https://example.com/image.jpg",
        "snippet": "A short example description of this item.",
        "title": "Example title",
        "url": "https://example.com/page"
      }
    ],
    "answer": "example",
    "answerMarkdown": "example",
    "citations": [
      {
        "answerPosition": 1,
        "title": "Example title",
        "url": "https://example.com/page"
      }
    ],
    "createdUtc": 12.5,
    "entities": [
      {
        "category": "general",
        "domain": "example.com",
        "title": "Example title",
        "url": "https://example.com/page"
      }
    ],
    "model": "example",
    "places": [
      {
        "address": "123 Main St",
        "category": "general",
        "description": "A short example description of this item.",
        "name": "Example title",
        "phone": "+1 555-0142",
        "position": 1,
        "rating": 4.6,
        "reviewCount": 12500,
        "websiteUrl": "https://example.com/page"
      }
    ],
    "prompt": "example",
    "searchQueries": [
      "example"
    ],
    "searchResults": [
      {
        "cited": true,
        "title": "Example title",
        "url": "https://example.com/page"
      }
    ],
    "shoppingCards": [
      {
        "currency": "USD",
        "description": "A short example description of this item.",
        "image": "https://example.com/image.jpg",
        "merchants": "example",
        "price": 19.99,
        "rating": 4.6,
        "title": "Example title",
        "url": "https://example.com/page"
      }
    ],
    "webSearchTriggered": true
  },
  "found": true
}
Response interface
interface ChatgptSearchResponse {
  data: {
    ads?: {
      advertiserName?: string | null;
      advertiserUrl?: string | null;
      domain?: string | null;
      image?: string | null;
      snippet?: string | null;
      title: string;
      url?: string | null;
    }[] | null;
    answer: string;
    answerMarkdown: string;
    citations: {
      answerPosition?: number | null;
      title: string;
      url: string;
    }[];
    createdUtc?: number | null;
    entities?: {
      category?: string | null;
      domain?: string | null;
      title: string;
      url?: string | null;
    }[] | null;
    model?: string | null;
    places?: {
      address?: string | null;
      category?: string | null;
      description?: string | null;
      name: string;
      phone?: string | null;
      position?: number;
      rating?: number | null;
      reviewCount?: number | null;
      websiteUrl?: string | null;
    }[] | null;
    prompt: string;
    searchQueries?: string[] | null;
    searchResults?: {
      cited?: boolean;
      title?: string;
      url?: string;
    }[] | null;
    shoppingCards?: {
      currency?: string | null;
      description?: string | null;
      image?: string | null;
      merchants?: string | null;
      price?: number | null;
      rating?: number | null;
      title: string;
      url?: string | null;
    }[] | null;
    webSearchTriggered?: boolean | null;
  } | null;
  found: boolean;
}

Full parameter and response reference - every field, type, and example for this endpoint.

Reference

Request, response, and price

Last verified 2026-09-12 · uptime and latency measured over 30d
POST /v1/run/chatgpt.search
curl -X POST https://api.getanyapi.com/v1/run/chatgpt.search \
  -H "Authorization: Bearer $ANYAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{"prompt":"What is AnyAPI at getanyapi.com, and what does it offer?"}'
FieldTypeExample value
Request body
promptstring"What is AnyAPI at getanyapi.com, and what does it offer?"Question or research prompt for ChatGPT to answer using web search.
countrystringISO-3166 alpha-2 country to ask from, e.g. US, GB, DE. ChatGPT localizes both the pages it retrieves and the answer it writes, so this is the difference between what a US buyer and a UK buyer are told.
requireAdsbooleanServe only from a source that can return sponsored placements shown with the answer. One source currently qualifies, so the request cannot fall back when it is unavailable.
requireEntitiesbooleanServe only from a source that can return brands and other named entities recognized in the answer. One source currently qualifies, so the request cannot fall back when it is unavailable.
requirePlacesbooleanServe only from a source that can return places shown with the answer. Leaving this off still returns places whenever the source that answered can. Turning it on selects the single source that guarantees them, which costs more and has nothing to fall back to if it is unavailable.
requireShoppingCardsbooleanServe only from a source that can return shopping cards shown with the answer. Leaving this off still returns shopping cards whenever the source that answered can. Turning it on selects the single source that guarantees them, which costs more and has nothing to fall back to if it is unavailable.
webSearchenumWhether to insist ChatGPT browses the web. force instructs it to search and is the default; auto lets ChatGPT decide, which is cheaper and answers from memory roughly half the time. Check webSearchTriggered for what actually happened - an answer written without a search is not web-grounded.
Response
dataobjectThe normalized answer and citations, or null when no answer was found.
data.adsobject[]Sponsored placements ChatGPT displayed with the answer. null means the source that answered cannot report ads; an empty array means none were shown.
data.ads[].advertiserNamestringAdvertiser name.
data.ads[].advertiserUrlstringAdvertiser URL, tracking parameters stripped.
data.ads[].domainstringAdvertised domain.
data.ads[].imagestringSponsored image URL.
data.ads[].snippetstringSponsored placement text.
data.ads[].titlestringSponsored placement title.
data.ads[].urlstringSponsored destination URL, tracking parameters stripped.
data.answerstringThe web-grounded answer as text. Populated whenever the provider has data for the entity.
data.answerMarkdownstringThe answer in Markdown when the engine returns a Markdown rendering, otherwise the same text as answer. Populated whenever the provider has data for the entity.
data.citationsobject[]Sources cited by the answer. Populated whenever the provider has data for the entity.
data.citations[].answerPositionintegerOne-based answer section where ChatGPT cited this source. null means the source that answered cannot report the position.
data.citations[].titlestringSource page title when supplied by the search engine.
data.citations[].urlstringSource page URL.
data.createdUtcnumberUTC epoch timestamp in seconds (Unix time). Multiply by 1000 for a JS Date in milliseconds. null means the source that answered does not report when it answered.
data.entitiesobject[]Brands and other named entities recognized in the answer. null means the source that answered cannot report them; an empty array means none were identified.
data.entities[].categorystringEntity category.
data.entities[].domainstringEntity domain.
data.entities[].titlestringEntity name.
data.entities[].urlstringEntity URL, tracking parameters stripped.
data.modelstringThe ChatGPT model that produced the answer. null means the source that answered does not report it, which is not the same as an unknown model.
data.placesobject[]Places and local businesses ChatGPT displayed with the answer. null means the source that answered cannot report them; an empty array means none were shown.
data.places[].addressstringPlace address as displayed.
data.places[].categorystringPlace category shown by ChatGPT.
data.places[].descriptionstringPlace description shown by ChatGPT.
data.places[].namestringPlace or business name.
data.places[].phonestringPlace phone number as displayed.
data.places[].positionintegerOne-based position in the places block.
data.places[].ratingnumberPlace rating when the source reports one.
data.places[].reviewCountintegerNumber of reviews behind the displayed rating.
data.places[].websiteUrlstringPlace website URL, tracking parameters stripped.
data.promptstringThe prompt answered by ChatGPT.
data.searchQueriesstring[]The web search queries ChatGPT ran to ground its answer. null means the source that answered cannot report them; an empty array means it searched with none recorded.
data.searchResultsobject[]Pages ChatGPT retrieved while answering. A SUPERSET of citations: a page can be read and not cited. null means the source that answered cannot report them.
data.searchResults[].citedbooleanWhether this retrieved page made it into citations. false means ChatGPT read the page and chose not to cite it, which is a different and more actionable fact than the page being absent.
data.searchResults[].titlestringTitle of the retrieved page, empty when the source did not send one.
data.searchResults[].urlstringCanonical URL of the retrieved page, tracking parameters stripped.
data.shoppingCardsobject[]Products ChatGPT displayed with the answer. null means the source that answered cannot report shopping cards; an empty array means none were shown.
data.shoppingCards[].currencystringISO 4217 currency code when the source reports it.
data.shoppingCards[].descriptionstringProduct description shown on the shopping card.
data.shoppingCards[].imagestringProduct image URL.
data.shoppingCards[].merchantsstringMerchant name shown on the shopping card.
data.shoppingCards[].pricenumberDisplayed product price as a number when the source reports one.
data.shoppingCards[].ratingnumberProduct rating when the source reports one.
data.shoppingCards[].titlestringProduct name shown by ChatGPT.
data.shoppingCards[].urlstringProduct page URL, tracking parameters stripped.
data.webSearchTriggeredbooleanWhether ChatGPT actually ran a web search before answering. ChatGPT decides this per session, and an answer written without one is not web-grounded. null means the source that answered cannot report it, which is not the same as false.
foundbooleanWhether ChatGPT returned a web-grounded answer.
Price
Price per requestUSD$0.0018
Price /1k reqUSD$1.80

FAQ

About the ChatGPT Search API

The AnyAPI ChatGPT Search API returns ChatGPT search data as normalized JSON from one POST call to /v1/run/chatgpt.search. Ask ChatGPT a web-grounded question and receive an answer with source citations. ChatGPT composes each answer per request, so the same prompt returns different wording and a different source set. AnyAPI routes each request across 3 sources and falls back automatically when one fails. It costs from $1.80 per 1,000 requests, in US dollars with no subscription and no monthly minimum. Over the last 30 days, 97.9% of ChatGPT search calls through AnyAPI succeeded, with a median response time of 37.2 seconds across 519 measured calls.

It costs from $1.80 per 1,000 requests, in US dollars with no subscription and no monthly minimum. You fund one USD wallet, each call draws it down, and a failed request costs $0.

Ask ChatGPT a web-grounded question and receive an answer with source citations. ChatGPT composes each answer per request, so the same prompt returns different wording and a different source set. The response is normalized JSON with the same envelope every AnyAPI endpoint returns, so parsing a second endpoint is a change of URL and nothing else.

Over the last 30 days, 97.9% of ChatGPT search calls through AnyAPI succeeded, with a median response time of 37.2 seconds across 519 measured calls. These are AnyAPI's own measurements of traffic through the gateway, recomputed continuously, not a published service-level target.