API para ChatGPT: Buscar
Faça ao ChatGPT uma pergunta embasada na web e receba uma resposta com citações das fontes. O ChatGPT compõe cada resposta por requisição, então o mesmo prompt retorna palavras diferentes e um conjunto diferente de fontes.
Rede de provedores
Provedores ordenados por tráfego
Teste
Faça sua primeira requisição
{
"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";
}Referência completa de parâmetros e resposta - todos os campos, tipos e exemplos deste endpoint.
Referência
Requisição, resposta e preço
Última verificação em 2026-09-29 · disponibilidade e latência medidas em 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?"}'| Campo | Tipo | Valor de exemplo |
|---|---|---|
| Corpo da requisição | ||
| prompt | string | "What is AnyAPI at getanyapi.com, and what does it offer?"Pergunta ou prompt de pesquisa para o ChatGPT responder usando busca na web. |
| country | string | País ISO-3166 alpha-2 de onde perguntar, ex.: US, GB, DE. O ChatGPT localiza tanto as páginas que busca quanto a resposta que escreve, então isso faz a diferença entre o que um comprador dos EUA e um do Reino Unido recebem como resposta. |
| requireAds | boolean | Atende apenas a partir de uma fonte que consegue retornar os posicionamentos patrocinados exibidos com a resposta. Hoje só uma fonte se qualifica, então a requisição não tem para onde recorrer quando ela está indisponível. |
| requireEntities | boolean | Atende apenas a partir de uma fonte que consegue retornar marcas e outras entidades nomeadas reconhecidas na resposta. Hoje só uma fonte se qualifica, então a requisição não tem para onde recorrer quando ela está indisponível. |
| requireFields | array | Opcional; se omitido, o roteamento não muda e a fonte mais barata atende. Informe os campos de saída que esta requisição precisa poder retornar, por exemplo `cited` ou `ads`, e ela só será atendida por uma fonte que retorne todos eles. Os campos que você não informar continuam sendo retornados sempre que a fonte que atende os tiver. Isso pode aumentar o seu preço: quando a fonte mais barata não consegue retornar um campo informado, uma fonte mais cara atende, e você recebe a cotação e é cobrado pelo preço dela. Um campo informado ainda pode vir ausente em um resultado que realmente não o tenha. Se você informar uma combinação de campos que nenhuma fonte retorna sozinha, a requisição é recusada como entrada inválida, sem cobrança. |
| requirePlaces | boolean | Atende apenas a partir de uma fonte que consegue retornar os locais exibidos com a resposta. Com isso desligado, os locais ainda são retornados sempre que a fonte que respondeu consegue. Ligado, é selecionada a única fonte que os garante, que custa mais e não tem para onde recorrer se estiver indisponível. |
| requireShoppingCards | boolean | Atende apenas a partir de uma fonte que consegue retornar os cards de compras exibidos com a resposta. Com isso desligado, os cards de compras ainda são retornados sempre que a fonte que respondeu consegue. Ligado, é selecionada a única fonte que os garante, que custa mais e não tem para onde recorrer se estiver indisponível. |
| webSearch | enum | Se deve obrigar o ChatGPT a navegar na web. force o instrui a buscar e é o padrão; auto deixa o ChatGPT decidir, o que é mais barato e responde de memória cerca de metade das vezes. Confira webSearchTriggered para saber o que realmente aconteceu: uma resposta escrita sem busca não é embasada na web. |
| Resposta | ||
| data | object | The normalized answer and citations, or null when no answer was found. |
| data.adspode ser exigido | 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[].advertiserNamepode ser exigido | string | Advertiser name. |
| data.ads[].advertiserUrlpode ser exigido | string | Advertiser URL, tracking parameters stripped. |
| data.ads[].domainpode ser exigido | string | Advertised domain. |
| data.ads[].image | string | Sponsored image URL. |
| data.ads[].snippetpode ser exigido | 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[].answerPositionpode ser exigido | 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.entitiespode ser exigido | 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[].domainpode ser exigido | string | Entity domain. |
| data.entities[].title | string | Entity name. |
| data.entities[].url | string | Entity URL, tracking parameters stripped. |
| data.modelpode ser exigido | 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[].addresspode ser exigido | string | Place address as displayed. |
| data.places[].category | string | Place category shown by ChatGPT. |
| data.places[].descriptionpode ser exigido | 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.searchQueriespode ser exigido | 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.searchResultspode ser exigido | 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[].citedpode ser exigido | 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[].currencypode ser exigido | string | ISO 4217 currency code when the source reports it. |
| data.shoppingCards[].descriptionpode ser exigido | 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.webSearchTriggeredpode ser exigido | 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. |
| Preço | ||
| Preço por requisição | USD | US$ 0,0018 |
| Preço /mil req. | USD | US$ 1,80 |
Dúvidas frequentes
Sobre o endpoint Buscar da API para ChatGPT
O endpoint Buscar da AnyAPI para ChatGPT retorna dados de ChatGPT em JSON normalizado com uma chamada POST para /v1/run/chatgpt.search. Faça ao ChatGPT uma pergunta embasada na web e receba uma resposta com citações das fontes. O ChatGPT compõe cada resposta por requisição, então o mesmo prompt retorna palavras diferentes e um conjunto diferente de fontes. A AnyAPI distribui cada requisição entre 2 fontes, com failover automático quando uma falha. Custa a partir de US$ 1,80 por mil requisições, em dólares, sem assinatura e sem mínimo mensal. Nos últimos 30 dias, 97,4% das chamadas ao endpoint Buscar da API para ChatGPT feitas pela AnyAPI tiveram sucesso, com tempo de resposta mediano de 32,6 segundos, em 613 chamadas medidas.