Skip to main content

Overview

The basic response format is returned when analysis_mode is set to "basic" or omitted (default). This mode provides streamlined search results with citations, summaries, and metadata.

Response Structure

query
string
required
The original search query that was executed
analysis_mode
string
required
The analysis mode used for this search. Always "basic" for basic responses
results
array
required
Array of search result objects (max length determined by max_results parameter)
citations
array
required
Array of citation URLs referenced in the search results
citation_metadata
array
required
Array of citation metadata objects corresponding to each citation URL. See the citation_metadata structure in the Result Object above.
summary
string
required
Brief overview of the search findings
total_results
number
required
The total number of results returned (equal to results.length)
search_time
string
required
ISO8601 timestamp of when the search was completed (e.g., "2025-06-24T12:00:00.000Z")
source
string
required
The source identifier for this response. Always "grok-live-search" for successful basic mode searches.

Example Response

{
  "query": "latest AI developments",
  "analysis_mode": "basic",
  "results": [
    {
      "title": "Major Breakthrough in AI Research",
      "snippet": "Researchers announce significant advances in natural language processing that could transform how AI systems understand context and nuance in human communication.",
      "url": "https://example.com/ai-breakthrough",
      "source": "grok-live-search",
      "published_date": "2025-06-24",
      "author": "Dr. Jane Smith",
      "citation_url": "https://example.com/ai-breakthrough",
      "citation_index": 0,
      "citation_metadata": {
        "index": 0,
        "url": "https://example.com/ai-breakthrough",
        "domain": "example.com",
        "protocol": "https:",
        "is_secure": true,
        "path": "/ai-breakthrough"
      }
    },
    {
      "title": "AI Safety Guidelines Updated",
      "snippet": "Leading AI organizations collaborate on new safety standards to ensure responsible development and deployment of artificial intelligence systems.",
      "url": "https://news.example.org/ai-safety",
      "source": "grok-live-search",
      "published_date": "2025-06-23",
      "citation_url": "https://news.example.org/ai-safety",
      "citation_index": 1,
      "citation_metadata": {
        "index": 1,
        "url": "https://news.example.org/ai-safety",
        "domain": "news.example.org",
        "protocol": "https:",
        "is_secure": true,
        "path": "/ai-safety"
      }
    }
  ],
  "citations": [
    "https://example.com/ai-breakthrough",
    "https://news.example.org/ai-safety"
  ],
  "citation_metadata": [
    {
      "index": 0,
      "url": "https://example.com/ai-breakthrough",
      "domain": "example.com",
      "protocol": "https:",
      "is_secure": true,
      "path": "/ai-breakthrough"
    },
    {
      "index": 1,
      "url": "https://news.example.org/ai-safety",
      "domain": "news.example.org",
      "protocol": "https:",
      "is_secure": true,
      "path": "/ai-safety"
    }
  ],
  "summary": "Recent developments in AI include major breakthroughs in natural language processing and updated safety guidelines from leading organizations.",
  "total_results": 2,
  "search_time": "2025-06-24T12:00:00.000Z",
  "source": "grok-live-search"
}

Fallback Response

When JSON parsing fails or the response format is unexpected, a fallback response is generated:
{
  "query": "search query",
  "analysis_mode": "basic",
  "results": [
    {
      "title": "Search results for: search query",
      "snippet": "Raw response content (truncated to 500 characters)...",
      "url": "https://first-citation.com",
      "source": "grok-live-search",
      "published_date": "2025-06-24",
      "citation_url": "https://first-citation.com",
      "citation_index": 0,
      "citation_metadata": {
        "index": 0,
        "url": "https://first-citation.com",
        "domain": "first-citation.com",
        "protocol": "https:",
        "is_secure": true,
        "path": "/"
      }
    }
  ],
  "citations": ["https://first-citation.com"],
  "citation_metadata": [
    {
      "index": 0,
      "url": "https://first-citation.com",
      "domain": "first-citation.com",
      "protocol": "https:",
      "is_secure": true,
      "path": "/"
    }
  ],
  "summary": "Live search results from Grok",
  "total_results": 1,
  "search_time": "2025-06-24T12:00:00.000Z",
  "source": "grok-live-search"
}

Notes

  • The results array length never exceeds the max_results parameter (default: 10, max: 20)
  • All dates are in ISO8601 format
  • Citation metadata is automatically extracted from URLs when available
  • If URL parsing fails, the citation_metadata.error field will contain the error message
  • The snippet field is always truncated to a maximum of 500 characters

Build docs developers (and LLMs) love