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.
Provider network
Providers ranked by traffic
Try it
Make your first request
{
"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,
"reason": "not_found"
}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;
reason?: "not_found";
}Full parameter and response reference - every field, type, and example for this endpoint.
Reference
Request, response, and price
Last verified 2026-09-29 · uptime and latency measured over 30dcurl -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?"}'| Field | Type | Example value |
|---|---|---|
| Request body | ||
| prompt | string | "What is AnyAPI at getanyapi.com, and what does it offer?"Question or research prompt for ChatGPT to answer using web search. |
| country | string | ISO-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. |
| requireAds | boolean | Serve 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. |
| requireEntities | boolean | Serve 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. |
| requireFields | array | Optional; omit it and routing is unchanged, with the cheapest source serving. Name the output fields this request must be able to return, for example `cited` or `ads`, and it is served only by a source that returns every one of them. Fields you do not name are still returned whenever the serving source has them. This can raise your price: when the cheapest source cannot return a named field, a dearer source serves, and you are quoted and charged its price. A named field can still be absent on a result that genuinely lacks it. Naming a combination that no single source returns together is refused as invalid input, with no charge. |
| requirePlaces | boolean | Serve 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. |
| requireShoppingCards | boolean | Serve 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. |
| webSearch | enum | Whether 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 | ||
| data | object | The normalized answer and citations, or null when no answer was found. |
| data.adscan require | object[] | 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[].advertiserNamecan require | string | Advertiser name. |
| data.ads[].advertiserUrlcan require | string | Advertiser URL, tracking parameters stripped. |
| data.ads[].domaincan require | string | Advertised domain. |
| data.ads[].image | string | Sponsored image URL. |
| data.ads[].snippetcan require | string | Sponsored placement text. |
| data.ads[].title | string | Sponsored placement title. |
| data.ads[].url | string | Sponsored destination URL, tracking parameters stripped. |
| data.answer | string | The web-grounded answer as text. Populated whenever the provider has data for the entity. |
| data.answerMarkdown | string | The 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.citations | object[] | Sources cited by the answer. Populated whenever the provider has data for the entity. |
| data.citations[].answerPositioncan require | integer | One-based answer section where ChatGPT cited this source. null means the source that answered cannot report the position. |
| data.citations[].title | string | Source page title when supplied by the search engine. |
| data.citations[].url | string | Source page URL. |
| data.createdUtc | number | UTC 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.entitiescan require | object[] | 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[].category | string | Entity category. |
| data.entities[].domaincan require | string | Entity domain. |
| data.entities[].title | string | Entity name. |
| data.entities[].url | string | Entity URL, tracking parameters stripped. |
| data.modelcan require | string | The 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.places | object[] | 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[].addresscan require | string | Place address as displayed. |
| data.places[].category | string | Place category shown by ChatGPT. |
| data.places[].descriptioncan require | string | Place description shown by ChatGPT. |
| data.places[].name | string | Place or business name. |
| data.places[].phone | string | Place phone number as displayed. |
| data.places[].position | integer | One-based position in the places block. |
| data.places[].rating | number | Place rating when the source reports one. |
| data.places[].reviewCount | integer | Number of reviews behind the displayed rating. |
| data.places[].websiteUrl | string | Place website URL, tracking parameters stripped. |
| data.prompt | string | The prompt answered by ChatGPT. |
| data.searchQueriescan require | string[] | 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.searchResultscan require | object[] | 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[].citedcan require | boolean | Whether 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[].title | string | Title of the retrieved page, empty when the source did not send one. |
| data.searchResults[].url | string | Canonical URL of the retrieved page, tracking parameters stripped. |
| data.shoppingCards | object[] | 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[].currencycan require | string | ISO 4217 currency code when the source reports it. |
| data.shoppingCards[].descriptioncan require | string | Product description shown on the shopping card. |
| data.shoppingCards[].image | string | Product image URL. |
| data.shoppingCards[].merchants | string | Merchant name shown on the shopping card. |
| data.shoppingCards[].price | number | Displayed product price as a number when the source reports one. |
| data.shoppingCards[].rating | number | Product rating when the source reports one. |
| data.shoppingCards[].title | string | Product name shown by ChatGPT. |
| data.shoppingCards[].url | string | Product page URL, tracking parameters stripped. |
| data.webSearchTriggeredcan require | boolean | Whether 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. |
| found | boolean | Whether ChatGPT returned a web-grounded answer. |
| reason | "not_found" | Present only when `found` is false, and says why there is no result. `not_found`: the source states the target does not exist, or returned nothing for it. A `found: false` answer is a successful call, not an error, and `costUsd` is what it actually cost. |
| Price | ||
| Price per request | USD | $0.0018 |
| Price /1k req | USD | $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 2 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.4% of ChatGPT search calls through AnyAPI succeeded, with a median response time of 32.6 seconds across 613 measured calls.