Query fan-out insights
When you setinclude.searchQueries to true, the API reveals the actual query fan-out that ChatGPT used internally to generate its response.
Enabling
include.searchQueries adds +2 credits to your request cost.What you get
ThesearchQueries field in the response contains an array of the specific searches ChatGPT performed to gather information:
Use cases for query fan-out
Understand ChatGPT's interpretation
Understand ChatGPT's interpretation
See how ChatGPT interprets and breaks down your prompt into specific search queries. This reveals what aspects of your prompt ChatGPT considers most relevant.
Optimize your prompts
Optimize your prompts
Analyze which searches ChatGPT performs to improve your prompt engineering. If the search queries don’t match your intent, refine your prompts accordingly.
Research and benchmarking
Research and benchmarking
Study ChatGPT’s information gathering strategy for AI research and competitive analysis. Compare how different prompts lead to different search patterns.
Quality assurance
Quality assurance
Verify that ChatGPT is searching for the right information to answer your query. Identify cases where the search queries might miss important context.
How to enable
Add theinclude.searchQueries parameter to your request:
Raw response access
Enableinclude.rawResponse to access the complete streaming response payload that ChatGPT generates during the response process.
Enabling
include.rawResponse adds +2 credits to your request cost.What you get
TherawResponse field contains an array of ChatGPT’s streamed response events, providing low-level access to the complete response generation process:
Use cases for raw response
Advanced debugging
Advanced debugging
Access the complete streaming payload to debug issues with response parsing or identify unexpected behavior in ChatGPT’s output.
Response timing analysis
Response timing analysis
Understand the timing of response generation by analyzing the streaming events. This can help you optimize timeout settings and user experience.
Low-level metadata access
Low-level metadata access
Access response metadata that may not be available in the parsed JSON structure. Useful for advanced integrations and custom processing.
Research and development
Research and development
Study the complete response structure for AI research projects or to develop custom parsing logic for specific use cases.
How to enable
Add theinclude.rawResponse parameter to your request:
Raw response data is useful for debugging but typically not needed for standard API usage. The parsed JSON structure provides all the information you need for most use cases.
Combining advanced features
You can enable both advanced features simultaneously to get comprehensive insights:When you enable both features, the total additional cost is +4 credits (+2 for
searchQueries + 2 for rawResponse).Credit usage summary
Understand the credit costs for advanced features:| Feature | Additional Cost | What You Get |
|---|---|---|
| Base request | 5 credits | Complete ChatGPT response with text, shopping cards, and metadata |
include.searchQueries | +2 credits | Query fan-out insights showing ChatGPT’s internal searches |
include.rawResponse | +2 credits | Complete streaming response payload for debugging |
| Both features | +4 credits | Full access to query insights and raw response data |
When to use advanced features
Consider enabling these features when:- Developing and testing: Use both features during development to understand how ChatGPT processes your prompts
- Debugging issues: Enable
rawResponsewhen you encounter unexpected behavior or parsing problems - Optimizing prompts: Use
searchQueriesto refine your prompts based on ChatGPT’s search patterns - Research projects: Both features provide valuable data for AI research and competitive analysis
- Production monitoring: Selectively enable for sample requests to monitor quality and performance