ChatGPT API

GET   /api/v1/search?engine=chatgpt

The ChatGPT API lets you query ChatGPT programmatically and get its answers as structured JSON. Send a prompt to the chatgpt engine and get back the answer as markdown and typed text_blocks, plus response_metadata (the model that responded and the conversation_id / message_id). Enable web_search to turn it into a ChatGPT search API that runs a live web search and returns the cited reference_links.

API Parameters

Search Query

  • Name
    q
    Required
    Required
    Description

    The prompt to send to ChatGPT. Up to 4000 characters.

Expand Entities

  • Name
    expand_entities
    Required
    Optional
    Description

    Set to true to expand each knowledge-entity card in the answer into a rich detail card with a description, titled sections, related entities ("Key Areas" / "Nearby Landmarks"), inline images, and reference links, returned under each card's details. Adds latency since each entity triggers an extra fetch.

Engine

  • Name
    engine
    Required
    Required
    Description

    Parameter defines an engine that will be used to retrieve real-time data. It must be set to chatgpt.

API key

  • Name
    api_key
    Required
    Required
    Description

    The api_key authenticates your requests. Use it as a query parameter (https://www.searchapi.io/api/v1/search?api_key=YOUR_API_KEY) or in the Authorization header (Bearer YOUR_API_KEY).

Zero Data Retention

  • Name
    zero_retention
    Enterprise Only
    Enterprise Only
    Required
    Optional
    Description

    Set this parameter to true to disable all logging and persistent storage. No request parameters, HTML, or JSON responses are stored or logged. Suitable for high-compliance use cases. Debugging and support may be limited while enabled.

API Examples

Markdown / Text Blocks

Markdown / Text Blocks

A plain prompt returns the assistant's answer as markdown and as typed text_blocks (each with a type and its prose in answer or entries in items), plus response_metadata (the resolved model and the conversation_id / message_id). Inline citation markers are resolved to plain text in the answer. Entity-style prompts also return a cards array (each with a type, name, category, and disambiguation) and an inline_images carousel, each image carrying a title, source link, original and thumbnail URLs, width / height, and the query that surfaced it. The full event stream (auth tokens redacted) is available at search_metadata.html_url for inspection.

GET
https://www.searchapi.io/api/v1/search?engine=chatgpt&q=Tell+me+about+the+Eiffel+Tower
Request
import requests

url = "https://www.searchapi.io/api/v1/search"
params = {
  "engine": "chatgpt",
  "q": "Tell me about the Eiffel Tower"
}

response = requests.get(url, params=params)
print(response.text)
Response
{
  "search_metadata": {
    "id": "search_JRz4KNQmOp60YHVoyWl8DBvr",
    "status": "Success",
    "created_at": "2026-06-24T05:27:09Z",
    "request_time_taken": 8.06,
    "parsing_time_taken": 0.02,
    "total_time_taken": 8.08,
    "request_url": "https://chatgpt.com/?q=Tell+me+about+the+Eiffel+Tower",
    "html_url": "https://www.searchapi.io/api/v1/searches/search_JRz4KNQmOp60YHVoyWl8DBvr.html",
    "json_url": "https://www.searchapi.io/api/v1/searches/search_JRz4KNQmOp60YHVoyWl8DBvr"
  },
  "search_parameters": {
    "engine": "chatgpt",
    "q": "Tell me about the Eiffel Tower"
  },
  "text_blocks": [
    {
      "type": "paragraph",
      "answer": "The Eiffel Tower is one of the most famous landmarks in the world and a symbol of both Paris and France."
    },
    ...
  ],
  "markdown": "The Eiffel Tower is one of the most famous landmarks in the world and a symbol of both Paris and France.\n\n### Quick Facts\n- **Height:** About 330 meters (1,083 feet) including antennas.\n- **Location:** On the Champ de Mars near the Seine.\n- **Completed:** 1889.\n- **Designer:** Led by French engineer Gustave Eiffel and his company.\n- **Purpose:** Built as the centerpiece of the Exposition Universelle of 1889, which celebrated the 100th anniversary of the French Revolution.\n\n### Why It Was Controversial\nWhen construction began, many artists and intellectuals criticized the tower, arguing that its iron structure would be an eyesore. Despite the criticism, it became enormously popular and is now considered a masterpiece of engineering.\n\n### Engineering Highlights\n- Constructed from more than **18,000 iron parts** joined by roughly **2.5 million rivets**.\n- Took about **two years, two months, and five days** to build.\n- Was the **tallest man-made structure in the world** until the completion of the Chrysler Building in 1930.\n\n### Visiting the Tower\n\nVisitors can:\n- Take elevators or climb stairs to viewing platforms.\n- Enjoy panoramic views of Paris.\n- Dine in restaurants inside the tower.\n- See the tower sparkle with thousands of lights each evening.\n\n### Fun Facts\n- The tower was originally intended to stand for only **20 years**.\n- It was saved from demolition because it proved useful for **radio communications**.\n- The tower expands slightly in hot weather as the metal warms and can grow several centimeters taller.\n- It attracts millions of visitors every year, making it one of the world's most visited paid monuments.\n\nToday, the Eiffel Tower remains an enduring symbol of innovation, architecture, and French culture.",
  "inline_images": [
    {
      "title": "Paris Eiffel Tower and river Seine at sunset in Paris, France. Eiffel Tower is one of the most iconic landmarks of Paris",
      "link": "https://media.gettyimages.com/id/2202962275/photo/paris-eiffel-tower-and-river-seine-at-sunset-in-pa...",
      "original": "https://images.openai.com/static-rsc-4/E_V7M0vWkc5k9Sbbh2hUpm0y9yjngLpNw2x4wWNpWn6AMaui4EU-Kuuc8gqdh...",
      "thumbnail": "https://images.openai.com/static-rsc-4/aKKEMlmiPffZFPv_yA_DoKQGgwWA3vLv5NhkrRj7ae5Bgptm99-RVBq81_yXP...",
      "width": 2048,
      "height": 1365,
      "query": "Eiffel Tower Paris at sunset"
    },
    ...
  ],
  "cards": [
    {
      "type": "knowledge_entity",
      "name": "Eiffel Tower",
      "category": "point_of_interest",
      "disambiguation": "Paris, France",
      "id": "Dko_F3brZNXU8T8L"
    },
    ...
  ],
  "response_metadata": {
    "model": "gpt-5-5",
    "conversation_id": "6a3b6ab2-57ec-83ea-a99f-11a9fcf77bc4",
    "message_id": "a946f9cc-2c26-4361-ab81-974b36ffc4cb",
    "is_web_search_performed": false
  }
}

Expand Entities

Expand Entities

With expand_entities=true, each knowledge-entity card in the answer is expanded into a rich detail card, the same panel the ChatGPT app shows when you click an entity, returned under that card's details. A detail card carries a description, titled sections (each with a title and text), related_entities (the "Key Areas" / "Nearby Landmarks" carousels, each with a name and a subtitle or description and a thumbnail), an inline_images carousel, and, when the card runs its own web search, cited reference_links. Each entity triggers an extra fetch, so the request takes longer than a plain answer.

GET
https://www.searchapi.io/api/v1/search?engine=chatgpt&expand_entities=true&q=Tell+me+about+the+Colosseum
Request
import requests

url = "https://www.searchapi.io/api/v1/search"
params = {
  "engine": "chatgpt",
  "q": "Tell me about the Colosseum",
  "expand_entities": "true"
}

response = requests.get(url, params=params)
print(response.text)
Response
{
  "search_metadata": {
    "id": "search_aeKNpQdYHmnZHFfNDZ0Wu4Wi",
    "status": "Success",
    "created_at": "2026-06-29T21:04:02Z",
    "request_time_taken": 18.16,
    "parsing_time_taken": 0.04,
    "total_time_taken": 18.2,
    "request_url": "https://chatgpt.com/?q=Tell+me+about+the+Colosseum",
    "html_url": "https://www.searchapi.io/api/v1/searches/search_aeKNpQdYHmnZHFfNDZ0Wu4Wi.html",
    "json_url": "https://www.searchapi.io/api/v1/searches/search_aeKNpQdYHmnZHFfNDZ0Wu4Wi"
  },
  "search_parameters": {
    "engine": "chatgpt",
    "q": "Tell me about the Colosseum",
    "expand_entities": true
  },
  "text_blocks": [
    {
      "type": "paragraph",
      "answer": "The Colosseum (also called the Flavian Amphitheatre) is one of the most famous landmarks of ancient Rome. It is located in Rome and was built between AD 70 and 80 under the emperors Vespasian and Titus."
    },
    ...
  ],
  "markdown": "The **Colosseum** (also called the **Flavian Amphitheatre**) is one of the most famous landmarks of ancient Rome. It is located in Rome and was built between AD 70 and 80 under the emperors Vespasian and Titus.\n\n### Key Facts\n- **Capacity:** About 50,000–80,000 spectators.\n- **Purpose:** Hosted gladiator contests, animal hunts, public spectacles, executions, and dramatic reenactments.\n- **Size:** Roughly 189 meters (620 ft) long, 156 meters (512 ft) wide, and about 48 meters (157 ft) tall.\n- **Construction:** Made primarily of stone, concrete, and brick.\n\n### Engineering Marvel\nThe Colosseum was remarkably advanced for its time:\n- It had **80 entrances**, allowing large crowds to enter and exit quickly.\n- A huge retractable awning called the **velarium** provided shade for spectators.\n- Complex underground tunnels and chambers, known as the **hypogeum**, housed animals, gladiators, and stage machinery.\n\n### What Happened There?\nThe Colosseum was the center of public entertainment in ancient Rome. Gladiators fought each other, wild animals were displayed or hunted, and elaborate shows celebrated military victories and imperial power. These events could attract tens of thousands of spectators.\n\n### Decline and Preservation\nAfter the fall of the Roman Empire, earthquakes damaged much of the structure, and some of its stone was reused in other buildings around Rome. Despite this, a large portion remains standing and has become a symbol of ancient Roman engineering and culture.\n\n### Today\nThe Colosseum is a major tourist attraction and one of the world's most visited historical sites. Along with the nearby Roman Forum and Palatine Hill, it forms part of a vast archaeological area that offers a glimpse into life in ancient Rome.\n\nA fun fact: Contrary to a popular myth, there is little historical evidence that Christians were systematically martyred in the Colosseum, although various executions and public punishments did occur there.",
  "inline_images": [
    {
      "title": "Rome - View on the exterior facade of Colosseum of city of Rome, Lazio, Italy, Europe. UNESCO World Heritage Site",
      "link": "https://media.gettyimages.com/id/1497341358/photo/rome-view-on-the-exterior-facade-of-colosseum-of-c...",
      "original": "https://images.openai.com/static-rsc-4/L-tBhJQ3tlhWDoz2fC5iBQ30UPemX7Wv1DGN2-YMHqF_pbSUYYAJ8YXj1bvrR...",
      "thumbnail": "https://images.openai.com/static-rsc-4/4b8CMrpXO7r6VTicE1vbnu6ZACFeaNcsWVFMmGxbs3u9sdimE-yhOTRHcjew0...",
      "width": 2048,
      "height": 1153,
      "query": "Colosseum Rome exterior"
    },
    ...
  ],
  "cards": [
    {
      "type": "knowledge_entity",
      "name": "Rome",
      "category": "city",
      "disambiguation": "Italy",
      "id": "AEol4YdOfqkBPdTt",
      "details": {
        "description": "Rome (Roma) is the capital of Italy and one of the world's most historically influential cities. Known as the *Eternal City*, it served as the center of the ancient Roman Empire and remains a global hub for culture, religion, archaeology, and art, attracting millions of visitors each year.",
        "sections": [
          {
            "title": "Historical Significance",
            "text": "Founded in antiquity and traditionally dated to 753 BCE, Rome grew from a regional city into the capital of the Roman Kingdom, Republic, and Empire. Roman law, engineering, architecture, language, and political institutions shaped much of Western civilization, and the city's influence continued through the Renaissance and into modern Italy."
          },
          ...
        ],
        "related_entities": [
          {
            "name": "Colosseum",
            "category": "point_of_interest",
            "disambiguation": "ancient amphitheater",
            "query": "Colosseum",
            "thumbnail": "https://images.openai.com/static-rsc-4/JAEM0xTPpt4PQvCCXFvaT6c2pVLKIkmLi8ECSFYJrUtUfjTIcO4VQv27b5WeO..."
          },
          ...
        ],
        "inline_images": [
          {
            "title": "Parco Regionale dei Castelli Romani",
            "link": "https://peakvisor.com/park/parco-regionale-dei-castelli-romani.html",
            "original": "https://peakvisor.com/photo/SD/Italy-Rome-panorama-aerial.jpg",
            "thumbnail": "https://images.openai.com/static-rsc-4/H2dXHl9HDvTG8Du0f6tWevv7rFBhMFLd53e6fGeEaQV4tPK5I34c4cCTGzGUy...",
            "width": 1024,
            "height": 607,
            "query": "Rome skyline Italy"
          },
          ...
        ],
        "reference_links": [
          {
            "index": 0,
            "title": "Rome | Italy, History, Map, Population, Climate, & Facts | Britannica",
            "link": "https://www.britannica.com/place/Rome",
            "source": "Encyclopedia Britannica",
            "snippet": "Rome An aerial view of Rome, Italy.  ROME  national capital, Italy  Also known as: Roma  Written by  Richard R. RingAll  Fact-checked by  Britannica Editors  Last updated  Mar. 4, 2026 •History  Top...",
            "ref_id": "turn0search0"
          },
          ...
        ],
        "cards": [
          {
            "type": "knowledge_entity",
            "name": "Italy",
            "category": "country",
            "disambiguation": "European country",
            "id": "uSjG-lc8lKxWtnTZ"
          },
          ...
        ]
      }
    },
    ...
  ],
  "response_metadata": {
    "model": "gpt-5-5",
    "conversation_id": "6a42ddc9-5d5c-83ea-b927-34c8bfd62d6a",
    "message_id": "18e8a90b-99c6-4e81-b081-1a18c77f34bc",
    "is_web_search_performed": false
  }
}
Web Search

With web_search=true, ChatGPT searches the live web and the response includes the verbatim search_queries it ran plus a reference_links array of the cited pages, each with a 0-based index, a title, link (tracking parameters stripped), source attribution, a ref_id, and, for grouped citations, a snippet excerpt and ISO 8601 publish date. reference_links covers only the pages the answer actually cites; the full ranked set ChatGPT retrieved comes back separately as web_results, each entry carrying a 1-based position and the same fields, so a result sharing a ref_id can be joined back to the citations that point at it. A citations array links positions in the answer to the reference links that back them at character precision: each entry carries the character index in the markdown answer where a claim ends and the source_indexes of the reference links cited there. The text_blocks also carry best-effort block-level reference_indexes.

GET
https://www.searchapi.io/api/v1/search?engine=chatgpt&q=What+are+the+top+AI+news+stories+this+week%3F&web_search=true
Request
import requests

url = "https://www.searchapi.io/api/v1/search"
params = {
  "engine": "chatgpt",
  "q": "What are the top AI news stories this week?",
  "web_search": "true"
}

response = requests.get(url, params=params)
print(response.text)
Response
{
  "search_metadata": {
    "id": "search_BJ2OR1XvYom9LFKoGra4w0Nn",
    "status": "Success",
    "created_at": "2026-06-26T13:06:47Z",
    "request_time_taken": 6.8,
    "parsing_time_taken": 0.02,
    "total_time_taken": 6.82,
    "request_url": "https://chatgpt.com/?q=What+are+the+top+AI+news+stories+this+week%3F&hints=search",
    "html_url": "https://www.searchapi.io/api/v1/searches/search_BJ2OR1XvYom9LFKoGra4w0Nn.html",
    "json_url": "https://www.searchapi.io/api/v1/searches/search_BJ2OR1XvYom9LFKoGra4w0Nn"
  },
  "search_parameters": {
    "engine": "chatgpt",
    "q": "What are the top AI news stories this week?",
    "web_search": true
  },
  "text_blocks": [
    {
      "type": "paragraph",
      "answer": "Here are some of the biggest AI stories from the past week (as of June 26, 2026):"
    },
    ...
  ],
  "markdown": "Here are some of the biggest AI stories from the past week (as of **June 26, 2026**):\n\n1. **AI is starting to push up consumer tech prices**\n   - One of the week's biggest business stories is that the AI infrastructure boom is now affecting everyday consumers.\n   - Rising demand for AI servers and data centers has driven up memory chip prices, prompting companies including Apple to increase prices on some Macs and iPads.\n   - Analysts say this may mark the end of years of steadily falling computer prices. \n\n2. **Enterprise AI partnerships continue accelerating**\n   - Enterprise adoption remains one of the fastest-moving areas of AI.\n   - This week featured new announcements such as the Zeta–Palantir partnership to combine operational and customer data for AI-powered marketing and decision-making, reflecting the ongoing shift from AI experimentation toward production deployments. \n\n3. **Another busy week for AI product launches and funding**\n   - Industry roundups highlighted a steady stream of new AI products, infrastructure announcements, and startup activity involving companies including IBM, Arcade, and NeuBird AI.\n   - Investment in enterprise AI continues to remain strong despite broader market volatility. \n\n4. **Markets are watching for signs of an AI valuation bubble**\n   - Investors remain divided over whether AI-related stocks have become overheated.\n   - Financial analysts continue comparing today's AI enthusiasm to previous technology booms while noting that AI demand for chips and infrastructure remains exceptionally strong. \n\n5. **China claims the world's fastest supercomputer**\n   - China's new \"LineShine\" system topped the latest TOP500 rankings.\n   - While traditional supercomputing benchmarks don't directly measure AI performance, the announcement underscores the growing global competition in high-performance computing and AI infrastructure. \n\n6. **Healthcare AI continues expanding**\n   - New research and deployments in medical AI remain a major theme, with recent developments covering imaging, clinical workflows, and healthcare implementation discussed during Stanford Health AI Week and other industry updates. \n\nOverall, the dominant themes this week weren't flashy chatbot releases—they were:\n- AI driving up hardware costs through massive demand for chips.\n- Continued enterprise adoption and commercial deployments.\n- Ongoing investor debate over AI valuations.\n- Global competition in AI infrastructure and computing.\n- Continued expansion of AI in healthcare and other applied fields.",
  "reference_links": [
    {
      "index": 0,
      "title": "The AI price shock is here: Apple and Microsoft hike prices",
      "link": "https://www.axios.com/2026/06/26/apple-microsoft-prices-ai",
      "source": "Axios",
      "snippet": "Amid the ongoing surge in artificial intelligence (AI) development, consumers are beginning to feel the financial impact, with major tech companies like Apple and Microsoft significantly increasing prices. Apple recently raised prices on MacBook and iPad models by up to 25%, citing a sharp rise in memory chip costs driven by intense AI-driven demand. This marks a significant shift in technology pricing trends, as components like memory and storage have become increasingly expensive due to expanding AI data center infrastructure. Nationally, prices for computer software and accessories surged a record 14.5% in May year-over-year, reversing a longstanding trend of declining tech prices. While the labor market implications of AI are still unfolding, the immediate economic effects are already being felt through increased product costs, signaling a broader shift in how AI is transforming everyday expenses.",
      "date": "2026-06-26T08:30:04Z",
      "ref_id": "turn0news17"
    },
    ...
  ],
  "web_results": [
    {
      "position": 1,
      "title": "AI News Today - June 6, 2026: 16 Biggest Stories",
      "link": "https://www.buildfastwithai.com/blogs/ai-news-today-june-6-2026",
      "source": "buildfastwithai.com",
      "snippet": "Jun 5, 2026 — Sixteen stories in one week. 1. ChatGPT Dreaming V3 — OpenAI's Memory Revolution ・ 2. Great American AI Act — Congress Drops 269-Page AI Bill ...",
      "ref_id": "turn0search0"
    },
    ...
  ],
  "citations": [
    {
      "index": 511,
      "source_indexes": [
        0,
        ...
      ]
    },
    ...
  ],
  "search_queries": [
    "What are the top AI news stories this week?",
    ...
  ],
  "response_metadata": {
    "model": "gpt-5-5",
    "conversation_id": "6a3e796f-75b8-83ea-a7d2-b0c218b96261",
    "message_id": "d60e2e5b-25c0-4519-8527-91a73c6c4d29",
    "is_web_search_performed": true
  }
}

Genui Widget Card

Some prompts surface a rich vendor widget (a stock chart, weather forecast, etc.) instead of a knowledge-entity card. These come back as a RawCard: a type naming the widget and its native payload preserved verbatim under raw, so nothing the widget carries is lost even for shapes we don't parse into a dedicated structure.

GET
https://www.searchapi.io/api/v1/search?engine=chatgpt&q=What+is+the+weather+in+Tokyo%3F
Request
import requests

url = "https://www.searchapi.io/api/v1/search"
params = {
  "engine": "chatgpt",
  "q": "What is the weather in Tokyo?"
}

response = requests.get(url, params=params)
print(response.text)
Response
{
  "search_metadata": {
    "id": "search_QpjW9Nk2CQKfjP1r8vHXaOZm",
    "status": "Success",
    "created_at": "2026-07-29T12:00:00Z",
    "request_time_taken": 6.1,
    "parsing_time_taken": 0.02,
    "total_time_taken": 6.12,
    "request_url": "https://chatgpt.com/?q=What+is+the+weather+in+Tokyo%3F",
    "html_url": "https://www.searchapi.io/api/v1/searches/search_QpjW9Nk2CQKfjP1r8vHXaOZm.html",
    "json_url": "https://www.searchapi.io/api/v1/searches/search_QpjW9Nk2CQKfjP1r8vHXaOZm"
  },
  "search_parameters": {
    "engine": "chatgpt",
    "q": "What is the weather in Tokyo?"
  },
  "text_blocks": [
    {
      "type": "paragraph",
      "answer": "Tokyo is currently hot and mostly clear, with temperatures around 31°C (89°F). Today’s forecast calls for very hot conditions with some clouds and a chance of afternoon thunderstorms; expect high humidity and heat, especially during the afternoon.",
      "reference_indexes": [
        0,
        ...
      ]
    },
    ...
  ],
  "markdown": "Tokyo is currently **hot and mostly clear**, with temperatures around **31°C (89°F)**. Today’s forecast calls for **very hot conditions with some clouds and a chance of afternoon thunderstorms**; expect high humidity and heat, especially during the afternoon. \n\nIf you’re heading outdoors, it’s a good idea to carry water, use sun protection, and plan strenuous activities for cooler parts of the day. Tokyo’s summer heat has been particularly notable this season, with heat precautions being emphasized locally.",
  "reference_links": [
    {
      "index": 0,
      "title": "Tokyo, Tokyo, Japan Weather Forecast - AccuWeather",
      "link": "https://www.accuweather.com/en/jp/tokyo/226396/weather-forecast/226396",
      "source": "AccuWeather",
      "snippet": "Hot with sun yielding to clouds; a thunderstorm in spots this afternoon; Hi: 99° Tonight: Clear to partly cloudy, very warm and very humid Lo: 81° Current ...",
      "ref_id": "turn0search0"
    },
    ...
  ],
  "web_results": [
    {
      "position": 1,
      "title": "10-Day Weather Forecast for Tokyo, Tokyo Prefecture, Japan",
      "link": "https://weather.com/jp/tokyo-prefecture/city/tokyo/tenday",
      "source": "weather.com",
      "snippet": "Tokyo, Tokyo Prefecture, Japan with highs, lows, chance of precipitation. Today 1% AM Clouds/PM Sun 79° 91° 9 mph. Mostly Sunny 82° 97° 8 mph. Thunderstorms 82 ...",
      "ref_id": "turn0search1"
    },
    ...
  ],
  "cards": [
    {
      "type": "weather_widget_v3_with_source",
      "raw": {
        "forecast": {
          "location_label": "Tokyo, Japan",
          "display_mode": "daily",
          "current": {
            "description": "Mostly clear",
            "condition_type": "sun-mostly-sunny",
            "location": "Tokyo, Japan",
            "heading_c": "Currently 31°",
            "heading_f": "Currently 89°",
            "temperature": {
              "celsius": 31.4,
              "fahrenheit": 88.52,
              "label_c": "31",
              "label_f": "89",
              "a11y_label_c": "31 degrees Celsius",
              "a11y_label_f": "89 degrees Fahrenheit"
            },
            "icon": {
              "light": "https://persistent.oaistatic.com/sonic/sa/weather/light/moon-mostly-sunny/default.png",
              "dark": "https://persistent.oaistatic.com/sonic/sa/weather/dark/moon-mostly-sunny/default.png"
            },
            "night": true
          },
          "alerts": [],
          "hourly": [],
          "hourly_chart": [
            {
              "timestamp": 1784631600,
              "date_key": "07-21",
              "temp_f": 89.41999999999999,
              "temp_c": 31.9,
              "precip_chance": 9
            },
            ...
          ],
          "hourly_chart_day_start": {
            "07-21": 1784631600,
            "07-22": 1784646000,
            "07-23": 1784732400
          },
          "hourly_chart_labels": {
            "1784638800": "10pm",
            "1784649600": "1am",
            "1784660400": "4am"
          },
          "hourly_chart_ticks": [
            1784638800,
            ...
          ],
          "hourly_chart_domain_all_f": [
            59.12,
            ...
          ],
          "hourly_chart_today_key": "07-21",
          "hourly_chart_now_start": 1784631600,
          "daily": [
            {
              "label": "Tue",
              "weekday_label": "Tuesday",
              "full_date_label": "Tuesday, July 21",
              "date_key": "07-21",
              "timestamp": 1784584800,
              "description": "Sun followed by clouds and hot; a couple of afternoon thunderstorms; caution advised if outside for extended periods of time",
              "accent_color": "#A1ACE5",
              "a11y_label_c": "Tue, high 36 degrees Celsius, low 27 degrees Celsius",
              "a11y_label_f": "Tue, high 96 degrees Fahrenheit, low 81 degrees Fahrenheit",
              "high": {
                "celsius": 35.6,
                "fahrenheit": 96.08000000000001,
                "label_c": "36°",
                "label_f": "96°",
                "a11y_label_c": "36 degrees Celsius",
                "a11y_label_f": "96 degrees Fahrenheit"
              },
              "low": {
                "celsius": 27.2,
                "fahrenheit": 80.96,
                "label_c": "27°",
                "label_f": "81°",
                "a11y_label_c": "27 degrees Celsius",
                "a11y_label_f": "81 degrees Fahrenheit"
              },
              "icon": {
                "light": "https://persistent.oaistatic.com/sonic/sa/weather/light/rain-thunder/default.png",
                "dark": "https://persistent.oaistatic.com/sonic/sa/weather/dark/rain-thunder/default.png"
              },
              "night": false
            },
            ...
          ],
          "historical": []
        },
        "focus": "temp",
        "show_date_picker": true,
        "focus_date": "07-21",
        "unit": "C",
        "use_current": true,
        "initial_unit": "C",
        "temperature_label": "Temperature",
        "precipitation_label": "Precipitation",
        "focus_mode_label": "Weather data type",
        "unit_toggle_f_selected_label": "Temperature unit, Fahrenheit selected. Activate to switch to Celsius.",
        "unit_toggle_c_selected_label": "Temperature unit, Celsius selected. Activate to switch to Fahrenheit.",
        "region_label": "Weather forecast for Tokyo, Japan",
        "share_label": "Share",
        "enable_use_my_location_toggle": false,
        "use_my_location_label": null,
        "issue_new_turn_query_on_success": null,
        "share_button_variant": "none",
        "follow_up_actions": [],
        "follow_up_actions_by_date": {},
        "presentation": "chart",
        "hourly_table_date_label": "",
        "time_label": "Time",
        "conditions_label": "Conditions"
      }
    },
    ...
  ],
  "citations": [
    {
      "index": 260,
      "source_indexes": [
        0,
        ...
      ]
    },
    ...
  ],
  "search_queries": [
    "weather in Tokyo",
    ...
  ],
  "response_metadata": {
    "model": "gpt-5-5",
    "conversation_id": "6a5f47e5-4b98-83ea-8c01-e8a6a1d56038",
    "message_id": "be04e27d-cccb-4e87-815e-91e63eb2e502",
    "is_web_search_performed": true
  }
}

Stock Chart Card

A finance prompt returns a stock_chart RawCard whose raw payload carries the quote as ChatGPT renders it: the asset_display_name, current_price_text, market_status, after_hours pricing, the metrics_display grid (open, volume, market cap, 52-week range, EPS), and timeframe_configs keyed by range (5D, 1M, 6M, YTD, 1Y, 5Y, MAX), each with its own chart.data points and a summary. The answer's reference_links and search_queries come back alongside it, without passing web_search, because ChatGPT searched on its own to price the quote. response_metadata.is_web_search_performed is true here, and is always present so you never have to infer it.

GET
https://www.searchapi.io/api/v1/search?engine=chatgpt&q=What+is+Microsoft+stock+price+today%3F
Request
import requests

url = "https://www.searchapi.io/api/v1/search"
params = {
  "engine": "chatgpt",
  "q": "What is Microsoft stock price today?"
}

response = requests.get(url, params=params)
print(response.text)
Response
{
  "search_metadata": {
    "id": "search_Rn7YtLb4XWMhqK2s5cVDPeUf",
    "status": "Success",
    "created_at": "2026-07-29T12:04:31Z",
    "request_time_taken": 7.42,
    "parsing_time_taken": 0.03,
    "total_time_taken": 7.45,
    "request_url": "https://chatgpt.com/?q=What+is+Microsoft+stock+price+today%3F",
    "html_url": "https://www.searchapi.io/api/v1/searches/search_Rn7YtLb4XWMhqK2s5cVDPeUf.html",
    "json_url": "https://www.searchapi.io/api/v1/searches/search_Rn7YtLb4XWMhqK2s5cVDPeUf"
  },
  "search_parameters": {
    "engine": "chatgpt",
    "q": "What is Microsoft stock price today?"
  },
  "text_blocks": [
    {
      "type": "paragraph",
      "answer": "As of the latest available market data today, Microsoft (NASDAQ: MSFT) is trading at $402.29 USD, up $8.51 (+2.16%) from the previous close. The company's market capitalization is approximately $3.0 trillion.",
      "reference_indexes": [
        0,
        ...
      ]
    },
    ...
  ],
  "markdown": "As of the latest available market data today, **Microsoft (NASDAQ: MSFT)** is trading at **$402.29 USD**, up **$8.51 (+2.16%)** from the previous close. The company's market capitalization is approximately **$3.0 trillion**. \n\nIf you're interested, I can also provide:\n- today's trading range and volume,\n- recent news affecting MSFT,\n- a technical analysis (support/resistance),\n- or a comparison with other AI-related stocks like NVIDIA, Apple, or Alphabet.",
  "reference_links": [
    {
      "index": 0,
      "title": "Microsoft Corporation (MSFT)",
      "link": "https://finance.yahoo.com/quote/MSFT/",
      "source": "Yahoo Finance",
      "snippet": "Microsoft Corporation (MSFT) Trade MSFT on Coinbase Trading disclosure 402.29 +8.47 (+2.15%) a 2.15% increase in stock value … 2026 3.64 (0.92%) Aug 20, 2026",
      "ref_id": "turn0search12"
    },
    ...
  ],
  "cards": [
    {
      "type": "stock_chart",
      "raw": {
        "default_range": "5D",
        "timeframe_order": [
          "5D",
          ...
        ],
        "timeframe_configs": {
          "5D": {
            "value": "5d",
            "chart": {
              "data": [
                {
                  "timestamp": 1784059200,
                  "close": 385.455,
                  "formatted": "Jul 14, 4:00 PM",
                  "price_formatted": "$385.45"
                },
                ...
              ],
              "series": [
                {
                  "type": "area",
                  "dataKey": "close",
                  "color": "green",
                  "curveType": "linear"
                },
                ...
              ],
              "tooltipValueFormatter": {
                "type": "xAxisLabel"
              },
              "disableAnimation": false,
              "xAxis": {
                "dataKey": "timestamp",
                "labels": {
                  "1784059200": "Jul 14",
                  "1784062800": "Jul 14",
                  "1784066400": "Jul 14"
                },
                "tickMargin": 8,
                "padding": {
                  "right": 10
                },
                "ticks": [
                  1784059200,
                  ...
                ],
                "interval": "preserveStartEnd"
              },
              "yAxis": {
                "domain": [
                  383.88,
                  ...
                ],
                "ticks": [
                  385,
                  ...
                ],
                "width": 40,
                "axisLine": false,
                "orientation": "right"
              }
            },
            "summary": {
              "price_text": "$399.30",
              "price_change_text": "+$13.85 (3.59%)",
              "price_change_color": "success",
              "trade_date_text": "Last 5 days"
            }
          },
          "1M": {
            "value": "1m",
            "chart": {
              "data": [
                {
                  "timestamp": 1782086400,
                  "close": 367.34,
                  "formatted": "Jun 21",
                  "price_formatted": "$367.34"
                },
                ...
              ],
              "series": [
                {
                  "type": "area",
                  "dataKey": "close",
                  "color": "green",
                  "curveType": "linear"
                },
                ...
              ],
              "tooltipValueFormatter": {
                "type": "xAxisLabel"
              },
              "disableAnimation": false,
              "xAxis": {
                "dataKey": "timestamp",
                "labels": {
                  "1782086400": "Jun 21",
                  "1782172800": "Jun 22",
                  "1782259200": "Jun 23"
                },
                "tickMargin": 8,
                "padding": {
                  "right": 10
                },
                "ticks": [
                  1782086400,
                  ...
                ],
                "interval": "preserveStartEnd"
              },
              "yAxis": {
                "domain": [
                  349.8624,
                  ...
                ],
                "ticks": [
                  360,
                  ...
                ],
                "width": 40,
                "axisLine": false,
                "orientation": "right"
              }
            },
            "summary": {
              "price_text": "$402.29",
              "price_change_text": "+$34.95 (9.51%)",
              "price_change_color": "success",
              "trade_date_text": "Last month"
            }
          }
        },
        "asset_display_name": "Microsoft Corporation (MSFT)",
        "market_status": "PreMarket",
        "is_comparison_mode": false,
        "comparison_header_text": null,
        "current_price_text": "$402.29",
        "hover_price_text": null,
        "hover_comparison_rows": null,
        "price_status_text": "PreMarket | Updated 6:04 AM EDT",
        "after_hours": {
          "price_text": "$399.30",
          "change_text": "-$2.99",
          "percent_text": "(0.74%)",
          "color": "danger",
          "label": "After Hours"
        },
        "show_metrics": true,
        "metrics_display": [
          {
            "cols": [
              {
                "label": "Open",
                "value": "-"
              },
              ...
            ]
          },
          ...
        ],
        "metrics_display_mobile": [
          {
            "cols": [
              {
                "label": "Open",
                "value": "-"
              },
              ...
            ]
          },
          ...
        ],
        "has_timeframe_data": true,
        "fallback_summary": {
          "price_text": "$402.29",
          "price_change_text": "+$1.80 (0.45%)",
          "price_change_color": "success",
          "trade_date_text": "Today"
        },
        "labels": {
          "no_chart_data": "No chart data available",
          "share": "Share"
        },
        "share_button_variant": "none",
        "follow_up_actions": []
      }
    },
    ...
  ],
  "citations": [
    {
      "index": 225,
      "source_indexes": [
        0,
        ...
      ]
    },
    ...
  ],
  "search_queries": [
    "MSFT stock price today",
    ...
  ],
  "response_metadata": {
    "model": "gpt-5-5",
    "conversation_id": "6a5f47c4-ed30-83ea-865a-44cb8cb9a4f8",
    "message_id": "996ff71d-5e3c-460c-89ce-027df20cc755",
    "is_web_search_performed": true
  }
}