HELP CENTER

How to access search queries data from ChatGPT?

Understanding how large language models navigate and interpret the web becomes key to staying visible in AI responses. That’s where the new fan_out_queries feature in the LLM Scraper endpoint of AI Optimization API comes in. It gives you a behind-the-scenes look at how ChatGPT expands a topic into multiple related search queries, providing valuable insights into how it explores and retrieve information across the web.

What are fan-out queries?

When ChatGPT (or a similar LLM) receives a prompt, it often performs multiple background searches related to the main keyword to gather more comprehensive context or access up-to-date data. These automatically generated searches are called fan-out queries.

For example, if the main keyword of your prompt is “albert einstein”, the fan_out_queries generated by the model may return the following:

"fan_out_queries": [
  "Albert Einstein biography",
  "Albert Einstein early life",
  "Albert Einstein scientific contributions"
]

These queries show how ChatGPT expands the initial topic to retrieve supporting information.

How to get ChatGPT search queries with LLM Scraper API?

The fan_out_queries array appears in the JSON response of your LLM Scraper endpoint request. To receive this field, include the force_web_search parameter set to true.

When force_web_search is enabled, the model performs real web lookups, the response includes the fan_out_queries array alongside search_results and sources. However, note that even if force_web_search is set to true, there is no guarantee that search_results or fan_out_queries data will appear in the response.

Example request

[
    {
        "language_code": "en",
        "location_code": 2840,
        "keyword": "albert einstein",
        "force_web_search": true
    }
]

Example response

{
  "version": "0.1.20250724",
  "status_code": 20000,
  "status_message": "Ok.",
  "time": "15.0903 sec.",
  "cost": 0.004,
  "tasks_count": 1,
  "tasks_error": 0,
  "tasks": [
    {
      "id": "08061654-0696-0629-0000-9d8abd5829ae",
      "status_code": 20000,
      "status_message": "Ok.",
      "time": "15.0329 sec.",
      "cost": 0.004,
      "result_count": 1,
      "path": [
        "v3",
        "ai_optimization",
        "chat_gpt",
        "llm_scraper",
        "live",
        "advanced"
      ],
      "data": {
        "api": "ai_optimization",
        "function": "llm_scraper",
        "se": "chat_gpt",
        "force_web_search": true,
        "language_code": "en",
        "location_code": 2840,
        "keyword": "albert einstein",
        "device": "desktop",
        "os": "windows"
      },
      "result": [
        {
          "keyword": "albert einstein",
          "location_code": 2840,
          "language_code": "en",
          "model": "gpt-4o",
          "check_url": "https://chatgpt.com/?q=albert%20einstein&hints=search",
          "datetime": "2025-08-14 09:26:26 +00:00",
          "markdown": "![en.wikipedia.org/wiki/al...] Interested in diving deeper? Let me know if you'd like to explore any particular facet—his papers, quotes, or maybe his influence on modern physics!\n\n",
          "search_results": [
            {
              "type": "chatgpt_search_result",
              "url": "https://www.britannica.com/biography/Albert-Einstein?utm_source=chatgpt.com",
              "domain": "www.britannica.com",
              "title": "Albert Einstein | Biography, Education, Discoveries, & Facts | Britannica",
              "description": "Ask the Chatbot Games & Quizzes History & Society Science & Tech Biographies Animals & Nature Geography & Travel Arts & Culture ProCon Money Videos  Albert Einstein  Albert Einstein  ALBERT EINSTEIN...",
              "breadcrumb": "britannica.com"
            }
          ],
          "sources": [
            {
              "type": "chat_gpt_source",
              "title": "Albert Einstein",
              "snippet": null,
              "domain": "en.wikipedia.org",
              "url": "https://en.wikipedia.org/wiki/Albert_Einstein?utm_source=chatgpt.com",
              "thumbnail": null,
              "source_name": "Wikipedia",
              "publication_date": "2025-08-13 22:16:33 +00:00",
              "markdown": null
            },
            {
              "type": "chat_gpt_source",
              "title": "Albert Einstein: Biography, Physicist, Nobel Prize Winner",
              "snippet": null,
              "domain": "www.biography.com",
              "url": "https://www.biography.com/scientists/albert-einstein?utm_source=chatgpt.com",
              "thumbnail": null,
              "source_name": "Biography",
              "publication_date": null,
              "markdown": null
            },
            {
              "type": "chat_gpt_source",
              "title": "Annus mirabilis papers",
              "snippet": null,
              "domain": "en.wikipedia.org",
              "url": "https://en.wikipedia.org/wiki/Annus_mirabilis_papers?utm_source=chatgpt.com",
              "thumbnail": null,
              "source_name": "Wikipedia",
              "publication_date": "2025-07-06 19:19:49 +00:00",
              "markdown": null
            }
          ],
          "fan_out_queries": [
            "Albert Einstein biography"
          ],
          "se_results_count": 0,
          "item_types": [
            "chat_gpt_images",
            "chat_gpt_text",
            "chat_gpt_table",
            "chat_gpt_products",
            "chat_gpt_local_businesses",
            "chat_gpt_navigation_list"
          ],
          "items_count": 5,
          "items": [
            {
              "type": "chat_gpt_images",
              "rank_group": 1,
              "rank_absolute": 1,
              "markdown": "![en.wikipedia.org/wiki/al...](https://upload.wikimedia.org/wikipedia/commons/thumb/1/14/Albert_Einstein_1947.jpg/960px-Albert_Einstein_1947.jpg)",
              "items": [
                {
                  "type": "chat_gpt_images_element",
                  "url": "https://en.wikipedia.org/wiki/Albert_Einstein?utm_source=chatgpt.com",
                  "alt": "en.wikipedia.org/wiki/al...",
                  "image_url": "https://upload.wikimedia.org/wikipedia/commons/thumb/1/14/Albert_Einstein_1947.jpg/960px-Albert_Einstein_1947.jpg",
                  "markdown": "![en.wikipedia.org/wiki/al...](https://upload.wikimedia.org/wikipedia/commons/thumb/1/14/Albert_Einstein_1947.jpg/960px-Albert_Einstein_1947.jpg)"
                }
              ]
            },
            {
              "type": "chat_gpt_text",
              "rank_group": 1,
              "rank_absolute": 2,
              "markdown": "\n\nHere’s a classic image of **Albert Einstein**, perhaps the most iconic physicist of the 20th century.\n\n",
              "sources": [
                {
                  "type": "chat_gpt_source",
                  "title": "Albert Einstein",
                  "snippet": null,
                  "domain": "en.wikipedia.org",
                  "url": "https://en.wikipedia.org/wiki/Albert_Einstein?utm_source=chatgpt.com",
                  "thumbnail": null,
                  "source_name": "Wikipedia",
                  "publication_date": "2025-08-13 22:16:33 +00:00",
                  "markdown": null
                },
                {
                  "type": "chat_gpt_source",
                  "title": "Albert Einstein: Biography, Physicist, Nobel Prize Winner",
                  "snippet": null,
                  "domain": "www.biography.com",
                  "url": "https://www.biography.com/scientists/albert-einstein?utm_source=chatgpt.com",
                  "thumbnail": null,
                  "source_name": "Biography",
                  "publication_date": null,
                  "markdown": null
                },
                {
                  "type": "chat_gpt_source",
                  "title": "Annus mirabilis papers",
                  "snippet": null,
                  "domain": "en.wikipedia.org",
                  "url": "https://en.wikipedia.org/wiki/Annus_mirabilis_papers?utm_source=chatgpt.com",
                  "thumbnail": null,
                  "source_name": "Wikipedia",
                  "publication_date": "2025-07-06 19:19:49 +00:00",
                  "markdown": null
                }
              ]
            },
            {
              "type": "chat_gpt_table",
              "rank_group": 1,
              "rank_absolute": 3,
              "text": null,
              "markdown": "| Contribution                    | Impact                                                                 |\n|----------------------------------|------------------------------------------------------------------------|\n| Photoelectric Effect             | Laid foundations for quantum mechanics and practical light-based tech  |\n| Brownian Motion                  | Cemented atomic theory                                                |\n| Special & General Relativity     | Revolutionized understanding of spacetime and gravity                 |\n| E = mc²                          | Established mass-energy equivalence—key to nuclear physics            |\n| Everyday tech                    | Powering lasers, GPS, solar cells, devices using photoelectric cells  |\n\n",
              "table": {
                "table_header": [
                  "Contribution",
                  "Impact"
                ],
                "table_content": [
                  [
                    "Photoelectric Effect",
                    "Laid foundations for quantum mechanics and practical light-based tech"
                  ],
                  [
                    "Brownian Motion",
                    "Cemented atomic theory"
                  ],
                  [
                    "Special & General Relativity",
                    "Revolutionized understanding of spacetime and gravity"
                  ],
                  [
                    "E = mc²",
                    "Established mass-energy equivalence—key to nuclear physics"
                  ],
                  [
                    "Everyday tech",
                    "Powering lasers, GPS, solar cells, devices using photoelectric cells"
                  ]
                ]
              }
            },
            {
              "type": "chat_gpt_text",
              "rank_group": 2,
              "rank_absolute": 4,
              "markdown": "\n---\n\nEinstein’s genius extended beyond equations—he left an enduring mark on both science and society. His bold ideas continue to fuel discoveries. Interested in diving deeper? Let me know if you'd like to explore any particular facet—his papers, quotes, or maybe his influence on modern physics!\n\n",
              "sources": null
            },
            {
              "type": "chat_gpt_products",
              "rank_group": 1,
              "rank_absolute": 2,
              "items": [
                {
                  "type": "chat_gpt_products_element",
                  "product_id": "gid://shopify/p/7JnWm9ccvIQ5SklKKTC9zt",
                  "title": "Albert Einstein Tongue Out Hoodie",
                  "rating": null,
                  "price": 34.95,
                  "currency": "USD",
                  "tag": "Playful tongue‑out design, mid‑$30s",
                  "url": "https://absurdink.com/products/albert-einstein-tongue-out-hoodie?variant=31097782173755&utm_source=chatgpt.com",
                  "domain": "absurdink.com",
                  "images": [
                    "https://cdn.shopify.com/s/files/1/1111/4912/products/Einstein_06be2084-c169-43c6-acba-97df01fee76f.jpg?v=1725508345"
                  ]
                },
                {
                  "type": "chat_gpt_products_element",
                  "product_id": "gid://shopify/p/5ymP4aadqvedAsJ3PeFyvU",
                  "title": "Funny Albert Einstein Quotes Hoodie: 'The measure of intelligence…'",
                  "rating": null,
                  "price": 49.95,
                  "currency": "USD",
                  "tag": "Features iconic quote, comfy and cozy (~$50)",
                  "url": "https://www.printyourwear.com/products/funny-albert-einstein-quotes-hoodie-the-measure-of-intelligence-is-the-ability-to-change-code?variant=51537394270526&utm_source=chatgpt.com",
                  "domain": "www.printyourwear.com",
                  "images": [
                    "https://cdn.shopify.com/s/files/1/0721/2993/7726/files/ts09-17032502_hoodie-pyw__black.jpg?v=1750566345"
                  ]
                },
                {
                  "type": "chat_gpt_products_element",
                  "product_id": "gid://shopify/p/ZsqO4vxv0ViJXZxt74ePy",
                  "title": "Einstein E=McKushed Hoodie (StonerDays)",
                  "rating": null,
                  "price": 59.99,
                  "currency": "USD",
                  "tag": "Pop‑culture twist on E=MC², ethically sourced (~$60)",
                  "url": "https://shop.stonerdays.com/products/einstein-e-mckushed-hoodie?variant=14032863133805&utm_source=chatgpt.com",
                  "domain": "shop.stonerdays.com",
                  "images": [
                    "https://cdn.shopify.com/s/files/1/1373/4937/products/einstein-emckushed-hoodie-pullover-hoodieHoodiesforCannabisLovers.jpg?v=1725503584"
                  ]
                }
              ]
            },
            {
              "type": "chat_gpt_local_businesses",
              "rank_group": 1,
              "rank_absolute": 2,
              "markdown": "**[La Casa Del Caffe](http://www.lacasadelcaffe.com?utm_source=chatgpt.com)**  \n**Closed · Coffee Shop · $ · 3.9 (22 reviews)**  \n_1036 Morris Park Ave (at Hone Ave), Bronx, NY 10461_  \nA local favorite on Morris Park Avenue, known for great cappuccinos and one of the best places to work in the neighbourhood.\n\n**[Prince Coffee House](http://www.devollicorporation.com/?id=3&utm_source=chatgpt.com)**  \n**Closed · Café · $ · 3.7 (44 reviews)**  \n_2306 Arthur Ave, Bronx, NY 10458_  \nSpacious, bright interior on Arthur Ave (“Little Italy”), ample seating, stays open until 11 pm—great for late‑night study.\n\n**[Mottley Kitchen](http://www.mottleykitchen.com?utm_source=chatgpt.com)**  \n**Closed · Coffee Shop · $ · 4.4 (27 reviews)**  \n_402 E 140th St (Willis Ave), Bronx, NY 10454_  \nCozy breakfast‑lunch café with bookstore vibe, rooftop deck, quiet even when busy—nice for work/study.\n\n**Boogie Down Grind**  \n**Closed · Coffee Shop · $ · 3.9 (12 reviews)**  \n_868 Hunts Point Ave, Bronx, NY 10474_  \nCharming café with unique subway‑car design, cozy and quiet with background music and community atmosphere.",
              "items": [
                {
                  "type": "chat_gpt_local_businesses_element",
                  "title": "La Casa Del Caffe",
                  "description": "A local favorite on Morris Park Avenue, known for great cappuccinos and one of the best places to work in the neighbourhood.",
                  "address": "1036 Morris Park Ave (at Hone Ave), Bronx, NY 10461",
                  "phone": "+17189317816",
                  "reviews_count": 22,
                  "url": "http://www.lacasadelcaffe.com?utm_source=chatgpt.com",
                  "domain": "www.lacasadelcaffe.com",
                  "rating": {
                    "rating_type": "Max5",
                    "value": 3.9,
                    "votes_count": 22,
                    "rating_max": 5
                  }
                },
                {
                  "type": "chat_gpt_local_businesses_element",
                  "title": "Prince Coffee House",
                  "description": "Spacious, bright interior on Arthur Ave (“Little Italy”), ample seating, stays open until 11 pm—great for late‑night study.",
                  "address": "2306 Arthur Ave, Bronx, NY 10458",
                  "phone": "+13472701030",
                  "reviews_count": 44,
                  "url": "http://www.devollicorporation.com/?id=3&utm_source=chatgpt.com",
                  "domain": "www.devollicorporation.com",
                  "rating": {
                    "rating_type": "Max5",
                    "value": 3.7,
                    "votes_count": 44,
                    "rating_max": 5
                  }
                },
                {
                  "type": "chat_gpt_local_businesses_element",
                  "title": "Mottley Kitchen",
                  "description": "Cozy breakfast‑lunch café with bookstore vibe, rooftop deck, quiet even when busy—nice for work/study.",
                  "address": "402 E 140th St (Willis Ave), Bronx, NY 10454",
                  "phone": "+19293082099",
                  "reviews_count": 27,
                  "url": "http://www.mottleykitchen.com?utm_source=chatgpt.com",
                  "domain": "www.mottleykitchen.com",
                  "rating": {
                    "rating_type": "Max5",
                    "value": 4.4,
                    "votes_count": 27,
                    "rating_max": 5
                  }
                },
                {
                  "type": "chat_gpt_local_businesses_element",
                  "title": "Boogie Down Grind",
                  "description": "Charming café with unique subway‑car design, cozy and quiet with background music and community atmosphere.",
                  "address": "868 Hunts Point Ave, Bronx, NY 10474",
                  "phone": "+17189868548",
                  "reviews_count": 12,
                  "url": null,
                  "domain": null,
                  "rating": {
                    "rating_type": "Max5",
                    "value": 3.9,
                    "votes_count": 12,
                    "rating_max": 5
                  }
                }
              ]
            },
            {
              "type": "chat_gpt_navigation_list",
              "rank_group": 1,
              "rank_absolute": 5,
              "title": "Further reading on Einstein",
              "sources": [
                {
                  "type": "chat_gpt_source",
                  "title": "March 14, 1879: Mr. Big",
                  "snippet": null,
                  "domain": "www.wired.com",
                  "url": "https://www.wired.com/2007/03/march-14-1879-mr-big?utm_source=chatgpt.com",
                  "thumbnail": "https://media.wired.com/photos/615e2b8ce78a8cd913bbaa76/16:9/w_1280,c_limit/wired_bug.jpg",
                  "source_name": null,
                  "publication_date": "2007-03-14 16:00:00 +00:00",
                  "markdown": null
                },
                {
                  "type": "chat_gpt_source",
                  "title": "The Valiant Swabian",
                  "snippet": null,
                  "domain": "www.newyorker.com",
                  "url": "https://www.newyorker.com/magazine/2007/04/02/the-valiant-swabian?utm_source=chatgpt.com",
                  "thumbnail": "https://media.newyorker.com/photos/5909308aebe912338a371892/16:9/w_1280,c_limit/070402_r16064b_p646.jpg",
                  "source_name": null,
                  "publication_date": "2007-03-26 04:00:00 +00:00",
                  "markdown": null
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}

Use cases

Identifying new terms to target in organic search

Imagine you’re an SEO manager researching how to improve your brand’s AI visibility around the keyword “AI content optimization.” You run a request via the LLM Scraper endpoint with force_web_search enabled and review the fan_out_queries array. It shows a list of queries ChatGPT used in web search, like “AI SEO best practices” and “LLM content scoring”. This data allows you to identify fresh keyword clusters to target, and align your SEO strategy with how AI systems actually explore your topic.

Expanding content visibility for AI-driven answers

Let’s say you’re an SEO analyst helping a client from the fashion grow their brand presence in AI results. You’re exploring ChatGPT output for industry rank for “sustainable clothing.” After checking the fan_out_queries data, you notice that ChatGPT expands the topic with searches such as “ethical clothing certifications,” “eco-friendly fabrics,” and “slow fashion brands.” Using these insights, you can plan new articles and optimize for these specific terms in organic search, improving your chances of being surfaced in AI responses.

Ready to explore how this works with your use case? Check out the LLM Scraper API docs for detailed examples and field descriptions, and start uncovering the keywords AI models really use to search the web.

Embed DataForSeo widget on your website


Embed code:
Preview: