String docs
Site integrations

ChatGPT

ChatGPT answers: the answer a signed-out visitor gets for a prompt with web search on, the citations behind it and the product cards it shows.

Call these actions with your String API key; see Authentication. Every call answers with the envelope described in Responses & errors, whose data holds the rows below.

  • Site: chatgpt
  • Version: 1.1.0
  • Reads from: chatgpt.com
ActionDescriptionListed price
answerAsk ChatGPT one question as a signed-out visitor with web search on and get the answer it writes: markdown text with inline citation markers, the sources it cites, the product cards it shows with their prices, merchants and links, whether a web search ran and how many sites it searched, the conversation id, and the persona and web build the answer was served under.Billed per request at your plan's rates

answer

Ask ChatGPT one question as a signed-out visitor with web search on and get the answer it writes: markdown text with inline citation markers, the sources it cites, the product cards it shows with their prices, merchants and links, whether a web search ran and how many sites it searched, the conversation id, and the persona and web build the answer was served under.

POST https://request.usestring.ai/v1/integrations/chatgpt/answer

Input

Unknown fields are rejected.

FieldTypeDescription
querystringRequired. The question to ask ChatGPT. At least 1 character. Matches \S.

Output

data is an array of rows, one per result. Each row has:

FieldTypeDescription
querystring—
answerMarkdownstringThe answer's markdown text, with the inline citation markers kept verbatim.
conversationIdstring | nullThe conversation the answer belongs to.
webSearchRanbooleanWhether a web search ran for the answer.
searchedSiteCountinteger | nullHow many sites the answer reports searching; null when the stream does not say.
personastringThe client persona the answer was served under, such as chatgpt-noauth.
clientBuildstringThe chatgpt.com web build that produced the answer.
citationsobject[]The sources the answer shows, in the order it shows them: the ones its inline citation markers point at (Cite) and the links on the cards it shows (Link)
citations[].positionintegerPosition in the answer's source list, from 1.
citations[].kindstringCite for a source an inline citation marker points at, Link for a link on a card the answer shows, such as a product's website.
citations[].refIdstring | nullThe id an inline citation marker in answerMarkdown names this source by, such as turn0search3; null for a Link.
citations[].urlstring—
citations[].titlestring | null—
citations[].sourceLabelstring | nullThe site name shown for the source.
citations[].snippetstring | nullThe passage the source contributed, when the stream carries one.
citations[].domainstringThe source URL's host, without a leading www.
citations[].publishedTimestampinteger | nullThe source's publication time in unix seconds, when the stream carries it.
productsobject[]The product cards the answer shows, in the order it shows them; empty when the answer shows none, such as an answer that names products only in its text.
products[].positionintegerPosition in the answer's product list, from 1.
products[].refIdstring | nullThe id answerMarkdown names this product by, such as turn836743product9.
products[].productIdstring | nullChatGPT's id for the product; for some merchants it is also the merchant's item number.
products[].titlestring—
products[].pricestring | nullThe price as the card shows it, with its currency symbol, such as $31.99.
products[].originalPricestring | nullThe price before a discount, when the card shows one.
products[].merchantstring | nullThe merchant shown on the card.
products[].brandstring | null—
products[].urlstring | nullThe product's page at the merchant.
products[].ratingnumber | nullThe average customer rating, out of 5.
products[].reviewCountinteger | nullHow many customer reviews the rating covers.
products[].descriptionstring | null—
products[].imageUrlsstring[]The card's product images.
products[].offersobject[]Each merchant's offer for the product, in the order the card lists them.
products[].offers[].merchantstring | null—
products[].offers[].sellerstring | nullThe seller named on the offer.
products[].offers[].urlstring | null—
products[].offers[].pricestring | nullThe price as the offer shows it, with its currency symbol.
products[].offers[].originalPricestring | nullThe price before a discount, when the offer shows one.
products[].offers[].detailsstring | nullThe offer's stock or delivery line, such as In stock.
products[].offers[].availableboolean | null—
products[].offers[].tagstring | nullThe label on the offer, such as Best price.

Example

curl https://request.usestring.ai/v1/integrations/chatgpt/answer \
  -H "Authorization: Bearer $STRING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "What is the tallest mountain in Africa?"
  }'

data starts with these rows:

[
  {
    "query": "What is the tallest mountain in Africa?",
    "answerMarkdown": "The tallest mountain in Africa is **Mount Kilimanjaro**, located in northeastern Tanzania.\n\nimage_group{\"query\":[\"Mount Kilimanjaro snow capped summit Tanzania Africa\"],\"aspect_ratio\":\"16:9\",\"layout\":\"carousel\",\"num_per_query\":1}\n\n- **Height\\:** 5,895 meters (19,341 feet) above sea level.\n- **Location\\:** Tanzania, near the border with Kenya.\n- **Type\\:** Dormant volcanic mountain.\n- **Highest point\\:** Uhuru Peak.\n\nMount Kilimanjaro is also the **highest free-standing mountain in the world**, meaning it does not form part of a larger mountain range.\n\nLearn more: urlUNESCO’s guide to Kilimanjaro National Parkhttps://whc.unesco.org/en/list/403\\.",
    "conversationId": "6ad8bcc3-7a74-83ea-8218-cdbe04fab0ee",
    "webSearchRan": true,
    "searchedSiteCount": 12,
    "persona": "chatgpt-noauth",
    "clientBuild": "prod-59702a84751bcc53e7cf3fc6e8f5022acb883535",
    "citations": [
      {
        "position": 1,
        "kind": "Link",
        "refId": null,
        "url": "https://whc.unesco.org/en/list/403?utm_source=chatgpt.com",
        "title": "whc.unesco.org",
        "sourceLabel": "whc.unesco.org",
        "snippet": null,
        "domain": "whc.unesco.org",
        "publishedTimestamp": null
      }
    ],
    "products": []
  }
]

Requests and billing

  • Requests: 5 Web Access requests per call.
  • Billing: passthrough. Each request the action makes bills at its own rate on your plan; there is no separate charge for the action. See Pricing.