> ## Documentation Index
> Fetch the complete documentation index at: https://cloro.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Extract Grok

> Extract structured data from Grok about your brand, products, or any topic across various regions

<Warning>
  **Grok is temporarily unavailable**

  Grok has blocked anonymous access for the time being. Requests to this endpoint will fail.
</Warning>

## Overview

The Grok endpoint extracts structured data from Grok with real-time web [sources with enhanced metadata](/api-reference/endpoint/grok/sources). Unlike other AI search providers, Grok provides extra contextual information for each source including preview text, creator details, site information, and image URLs.

<Info>
  **Web search enabled**

  This endpoint uses Grok's default interface, which always performs web searches for all requests to provide real-time information with source citations.
</Info>

## Request parameters

Uses [common parameters](/guides/making-requests/sync#common-parameters).

**Endpoint-specific options:**

* `include.rawResponse` (boolean): Include raw streaming response events. Defaults to `false`

## Response objects

The response includes the following sections. See each subpage for the full schema.

| Section                                         | Description                                                                  |
| ----------------------------------------------- | ---------------------------------------------------------------------------- |
| [Sources](/api-reference/endpoint/grok/sources) | Sources with preview text, creator details, site information, and image URLs |

## Response schema

Includes [common response fields](/guides/making-requests/sync#common-response-fields) plus:

| Field                  | Type      | Description                                                                            |
| ---------------------- | --------- | -------------------------------------------------------------------------------------- |
| `result.text`          | string    | Grok's response text                                                                   |
| `result.html`          | string    | Response formatted in HTML (included when `include.html` is true)                      |
| `result.sources`       | array     | Array of web [sources](/api-reference/endpoint/grok/sources) with enhanced metadata    |
| `result.searchQueries` | string\[] | Array of search queries Grok used to gather information                                |
| `result.model`         | string    | The model identifier used to generate the response (e.g., "grok-4-auto")               |
| `result.markdown`      | string    | Response formatted in Markdown (included when `include.markdown` is true)              |
| `result.rawResponse`   | array     | Array of Grok's streamed response events (included when `include.rawResponse` is true) |


## OpenAPI

````yaml api-reference/openapi.json POST /v1/monitor/grok
openapi: 3.1.0
info:
  title: cloro
  description: API for monitoring AI responses across different providers and regions
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.cloro.dev
    description: Production server
security:
  - bearerAuth: []
paths:
  /v1/monitor/grok:
    post:
      summary: Monitor Grok Responses
      description: >-
        Extract structured data from Grok about your brand, products, or any
        topic across various regions
      operationId: monitorGrok
      requestBody:
        description: Request parameters for monitoring Grok responses
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GrokMonitorRequest'
        required: true
      responses:
        '200':
          description: successful Grok monitoring response
          headers:
            X-Concurrent-Limit:
              description: Maximum number of concurrent requests allowed
              schema:
                type: integer
                example: 10
            X-Concurrent-Current:
              description: Current number of concurrent requests
              schema:
                type: integer
                example: 3
            X-Concurrent-Remaining:
              description: Number of remaining concurrent slots available
              schema:
                type: integer
                example: 7
            X-Credits-Remaining:
              description: Number of credits remaining in user account
              schema:
                type: integer
                example: 4
            X-Credits-Charged:
              description: Number of credits charged for this request
              schema:
                type: integer
                example: 3
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GrokMonitorResponse'
        '400':
          description: Bad Request - Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
        '401':
          description: Unauthorized - Authentication error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthenticationError'
        '403':
          description: Forbidden - Insufficient permissions or credits
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
        '404':
          description: Not Found - Route not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
        '409':
          description: Conflict - Resource conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConflictError'
        '429':
          description: Too Many Requests
          headers:
            X-Concurrent-Limit:
              description: Maximum number of concurrent requests allowed
              schema:
                type: integer
                example: 10
            X-Concurrent-Current:
              description: Current number of concurrent requests
              schema:
                type: integer
                example: 11
            X-Concurrent-Remaining:
              description: Number of remaining concurrent slots available
              schema:
                type: integer
                example: 0
            X-Credits-Remaining:
              description: Number of credits remaining in user account
              schema:
                type: integer
                example: 4
            X-Credits-Charged:
              description: Number of credits charged for this request
              schema:
                type: integer
                example: 0
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConcurrentLimitError'
        '499':
          description: Client Closed Request - Request was canceled
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CanceledError'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
        '502':
          description: Bad Gateway - External service error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExternalServiceError'
components:
  schemas:
    GrokMonitorRequest:
      required:
        - prompt
        - country
      type: object
      properties:
        prompt:
          description: The prompt to send to Grok
          type: string
          minLength: 1
          maxLength: 10000
          example: What are the best laptops for programming?
        country:
          description: Country/region code for localized response
          type: string
          example: US
        include:
          description: Optional flags for including additional response formats
          type: object
          properties:
            markdown:
              description: Include markdown-formatted response in the result
              type: boolean
              default: false
              example: true
            html:
              description: Include HTML-formatted response in the result
              type: boolean
              default: false
              example: true
            rawResponse:
              description: Include raw streaming response events
              type: boolean
              default: false
              example: true
          default:
            markdown: false
            html: false
            rawResponse: false
          additionalProperties: false
        state:
          $ref: '#/components/schemas/StateParameter'
      additionalProperties: false
    GrokMonitorResponse:
      required:
        - success
        - result
      type: object
      properties:
        success:
          type: boolean
          example: true
        result:
          description: Grok response data
          type: object
          properties:
            text:
              type: string
              description: Grok's response text
              example: >-
                Based on current information and real-time web search, here are
                excellent laptop options for programming...
            html:
              type: string
              format: uri
              description: A URL to the full HTML of the response.
              example: >-
                https://storage.cloro.dev/results/c45a5081-808d-4ed3-9c86-e4baf16c8ab8/page-1.html
            sources:
              type: array
              description: >-
                Array of sources referenced in the response with enhanced
                metadata
              items:
                type: object
                properties:
                  position:
                    type: number
                    description: The position index of the source in the response
                    example: 1
                  url:
                    type: string
                    description: The URL of the source
                    example: https://example.com/article
                  label:
                    type: string
                    description: The display label for the source
                    example: Tech Source
                  description:
                    type: string
                    description: A description of the source content
                    example: In-depth laptop guide for developers
                  preview:
                    type: string
                    description: Preview text snippet from the source
                    example: >-
                      When choosing a laptop for programming, consider RAM,
                      processor, storage...
                  searchEngineText:
                    type: string
                    description: Search engine display text
                    example: Best Programming Laptops 2025
                  siteName:
                    type: string
                    description: Website name
                    example: Tech Reviews
                  metadataTitle:
                    type: string
                    description: Source metadata title
                    example: Complete Guide to Development Laptops
                  creator:
                    type: string
                    description: Content creator/author
                    example: John Doe
                  image:
                    type: string
                    format: uri
                    description: Source image URL
                    example: https://example.com/preview.jpg
                  favicon:
                    type: string
                    format: uri
                    description: Website favicon URL
                    example: https://example.com/favicon.ico
              example:
                - position: 1
                  url: https://techcrunch.com/programming-laptops
                  label: TechCrunch
                  description: Best laptops for coding and development
                  preview: >-
                    When looking for a programming laptop, prioritize RAM and
                    processor power...
                  searchEngineText: Top Development Laptops 2025
                  siteName: TechCrunch
                  metadataTitle: Ultimate Guide to Programming Laptops
                  creator: Tech Team
                  image: https://techcrunch.com/preview.jpg
                  favicon: https://techcrunch.com/favicon.ico
            searchQueries:
              type: array
              items:
                type: string
              description: >-
                Array of search queries Grok used to gather information for the
                response
              example:
                - best laptops for programming 2026
                - top developer laptops 2026
            model:
              type: string
              nullable: true
              description: The model identifier used to generate the response
              example: grok-4-auto
            markdown:
              type: string
              description: >-
                Grok's response formatted in Markdown (included when
                include.markdown is true)
              example: >-
                Based on current information and real-time web search, here are
                excellent laptop options for programming...
            rawResponse:
              type: array
              description: >-
                Raw upstream provider stream captured during the request. Each
                item is one chunk from the provider's wire protocol (SSE event,
                batchexecute frame, etc.). Format is provider-specific,
                undocumented, and may change without notice — use it for
                debugging or to access data not yet surfaced in the structured
                fields above.
              items: {}
    ValidationError:
      type: object
      properties:
        success:
          type: boolean
          example: false
        error:
          type: string
          example: Request validation failed
        details:
          type: array
          items:
            type: object
            properties:
              field:
                type: string
                example: prompt
              message:
                type: string
                example: Prompt cannot be empty
    AuthenticationError:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - MISSING_API_KEY
                - INVALID_API_KEY_FORMAT
                - INVALID_OR_EXPIRED_API_KEY
              example: MISSING_API_KEY
            message:
              type: string
              example: Missing or invalid API key
            timestamp:
              type: string
              format: date-time
              example: '2025-01-15T12:00:00.000Z'
    ForbiddenError:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - INSUFFICIENT_PERMISSIONS
                - INSUFFICIENT_CREDITS
              example: INSUFFICIENT_PERMISSIONS
            message:
              type: string
              example: Insufficient permissions
            details:
              type: object
              properties:
                requiredScopes:
                  type: array
                  items:
                    type: string
                  example:
                    - read:monitor
                    - write:monitor
              required: []
            timestamp:
              type: string
              format: date-time
              example: '2025-01-15T12:00:00.000Z'
    NotFoundError:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: RESOURCE_NOT_FOUND
            message:
              type: string
              example: Route not found
            details:
              type: object
              properties:
                id:
                  type: string
                  example: /v1/invalid-endpoint
            timestamp:
              type: string
              format: date-time
              example: '2025-01-15T12:00:00.000Z'
    ConflictError:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: RESOURCE_CONFLICT
            message:
              type: string
              example: Resource conflict
            timestamp:
              type: string
              format: date-time
              example: '2025-01-15T12:00:00.000Z'
    ConcurrentLimitError:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: CONCURRENT_LIMIT_EXCEEDED
            message:
              type: string
              example: Concurrent limit exceeded
            details:
              type: object
              properties:
                limit:
                  type: number
                  example: 10
            timestamp:
              type: string
              format: date-time
              example: '2025-01-15T12:00:00.000Z'
    CanceledError:
      type: object
      properties:
        success:
          type: boolean
          example: false
        error:
          type: string
          example: Request was canceled
    InternalError:
      type: object
      oneOf:
        - properties:
            success:
              type: boolean
              example: false
            error:
              type: string
              example: Maximum retries exceeded
        - properties:
            error:
              type: object
              properties:
                code:
                  type: string
                  example: INTERNAL_SERVER_ERROR
                message:
                  type: string
                  example: Internal server error
                timestamp:
                  type: string
                  format: date-time
                  example: '2025-01-15T12:00:00.000Z'
    ExternalServiceError:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: EXTERNAL_SERVICE_ERROR
            message:
              type: string
              example: 'External service error: OpenAI'
            details:
              type: object
              properties:
                service:
                  type: string
                  example: OpenAI
            timestamp:
              type: string
              format: date-time
              example: '2025-01-15T12:00:00.000Z'
    StateParameter:
      description: >-
        State code for sub-country geo-targeting (e.g., "CA"). Only valid with
        country "US".
      type: string
      example: CA
      minLength: 2
      maxLength: 2
      pattern: ^[A-Z]{2}$
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````