Monitor Grok Responses
curl --request POST \
--url https://api.cloro.dev/v1/monitor/grok \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "What are the best laptops for programming?",
"country": "US",
"include": {
"markdown": false,
"html": false,
"rawResponse": false
},
"state": "CA"
}
'import requests
url = "https://api.cloro.dev/v1/monitor/grok"
payload = {
"prompt": "What are the best laptops for programming?",
"country": "US",
"include": {
"markdown": False,
"html": False,
"rawResponse": False
},
"state": "CA"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
prompt: 'What are the best laptops for programming?',
country: 'US',
include: {markdown: false, html: false, rawResponse: false},
state: 'CA'
})
};
fetch('https://api.cloro.dev/v1/monitor/grok', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.cloro.dev/v1/monitor/grok",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'prompt' => 'What are the best laptops for programming?',
'country' => 'US',
'include' => [
'markdown' => false,
'html' => false,
'rawResponse' => false
],
'state' => 'CA'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.cloro.dev/v1/monitor/grok"
payload := strings.NewReader("{\n \"prompt\": \"What are the best laptops for programming?\",\n \"country\": \"US\",\n \"include\": {\n \"markdown\": false,\n \"html\": false,\n \"rawResponse\": false\n },\n \"state\": \"CA\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.cloro.dev/v1/monitor/grok")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"prompt\": \"What are the best laptops for programming?\",\n \"country\": \"US\",\n \"include\": {\n \"markdown\": false,\n \"html\": false,\n \"rawResponse\": false\n },\n \"state\": \"CA\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cloro.dev/v1/monitor/grok")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"prompt\": \"What are the best laptops for programming?\",\n \"country\": \"US\",\n \"include\": {\n \"markdown\": false,\n \"html\": false,\n \"rawResponse\": false\n },\n \"state\": \"CA\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"result": {
"text": "Based on current information and real-time web search, here are excellent laptop options for programming...",
"html": "https://storage.cloro.dev/results/c45a5081-808d-4ed3-9c86-e4baf16c8ab8/page-1.html",
"sources": [
{
"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": [
"best laptops for programming 2026",
"top developer laptops 2026"
],
"model": "grok-4-auto",
"markdown": "Based on current information and real-time web search, here are excellent laptop options for programming...",
"rawResponse": [
"<unknown>"
]
}
}{
"success": false,
"error": "Request validation failed",
"details": [
{
"field": "prompt",
"message": "Prompt cannot be empty"
}
]
}{
"error": {
"code": "MISSING_API_KEY",
"message": "Missing or invalid API key",
"timestamp": "2025-01-15T12:00:00.000Z"
}
}{
"error": {
"code": "INSUFFICIENT_PERMISSIONS",
"message": "Insufficient permissions",
"details": {
"requiredScopes": [
"read:monitor",
"write:monitor"
]
},
"timestamp": "2025-01-15T12:00:00.000Z"
}
}{
"error": {
"code": "RESOURCE_NOT_FOUND",
"message": "Route not found",
"details": {
"id": "/v1/invalid-endpoint"
},
"timestamp": "2025-01-15T12:00:00.000Z"
}
}{
"error": {
"code": "RESOURCE_CONFLICT",
"message": "Resource conflict",
"timestamp": "2025-01-15T12:00:00.000Z"
}
}{
"error": {
"code": "CONCURRENT_LIMIT_EXCEEDED",
"message": "Concurrent limit exceeded",
"details": {
"limit": 10
},
"timestamp": "2025-01-15T12:00:00.000Z"
}
}{
"success": false,
"error": "Request was canceled"
}{
"success": false,
"error": "Maximum retries exceeded"
}{
"error": {
"code": "EXTERNAL_SERVICE_ERROR",
"message": "External service error: OpenAI",
"details": {
"service": "OpenAI"
},
"timestamp": "2025-01-15T12:00:00.000Z"
}
}Grok
Extract Grok
Extract structured data from Grok — answer text and cited sources, including X/Twitter references — for any prompt across supported regions
POST
/
v1
/
monitor
/
grok
Monitor Grok Responses
curl --request POST \
--url https://api.cloro.dev/v1/monitor/grok \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "What are the best laptops for programming?",
"country": "US",
"include": {
"markdown": false,
"html": false,
"rawResponse": false
},
"state": "CA"
}
'import requests
url = "https://api.cloro.dev/v1/monitor/grok"
payload = {
"prompt": "What are the best laptops for programming?",
"country": "US",
"include": {
"markdown": False,
"html": False,
"rawResponse": False
},
"state": "CA"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
prompt: 'What are the best laptops for programming?',
country: 'US',
include: {markdown: false, html: false, rawResponse: false},
state: 'CA'
})
};
fetch('https://api.cloro.dev/v1/monitor/grok', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.cloro.dev/v1/monitor/grok",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'prompt' => 'What are the best laptops for programming?',
'country' => 'US',
'include' => [
'markdown' => false,
'html' => false,
'rawResponse' => false
],
'state' => 'CA'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.cloro.dev/v1/monitor/grok"
payload := strings.NewReader("{\n \"prompt\": \"What are the best laptops for programming?\",\n \"country\": \"US\",\n \"include\": {\n \"markdown\": false,\n \"html\": false,\n \"rawResponse\": false\n },\n \"state\": \"CA\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.cloro.dev/v1/monitor/grok")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"prompt\": \"What are the best laptops for programming?\",\n \"country\": \"US\",\n \"include\": {\n \"markdown\": false,\n \"html\": false,\n \"rawResponse\": false\n },\n \"state\": \"CA\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cloro.dev/v1/monitor/grok")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"prompt\": \"What are the best laptops for programming?\",\n \"country\": \"US\",\n \"include\": {\n \"markdown\": false,\n \"html\": false,\n \"rawResponse\": false\n },\n \"state\": \"CA\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"result": {
"text": "Based on current information and real-time web search, here are excellent laptop options for programming...",
"html": "https://storage.cloro.dev/results/c45a5081-808d-4ed3-9c86-e4baf16c8ab8/page-1.html",
"sources": [
{
"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": [
"best laptops for programming 2026",
"top developer laptops 2026"
],
"model": "grok-4-auto",
"markdown": "Based on current information and real-time web search, here are excellent laptop options for programming...",
"rawResponse": [
"<unknown>"
]
}
}{
"success": false,
"error": "Request validation failed",
"details": [
{
"field": "prompt",
"message": "Prompt cannot be empty"
}
]
}{
"error": {
"code": "MISSING_API_KEY",
"message": "Missing or invalid API key",
"timestamp": "2025-01-15T12:00:00.000Z"
}
}{
"error": {
"code": "INSUFFICIENT_PERMISSIONS",
"message": "Insufficient permissions",
"details": {
"requiredScopes": [
"read:monitor",
"write:monitor"
]
},
"timestamp": "2025-01-15T12:00:00.000Z"
}
}{
"error": {
"code": "RESOURCE_NOT_FOUND",
"message": "Route not found",
"details": {
"id": "/v1/invalid-endpoint"
},
"timestamp": "2025-01-15T12:00:00.000Z"
}
}{
"error": {
"code": "RESOURCE_CONFLICT",
"message": "Resource conflict",
"timestamp": "2025-01-15T12:00:00.000Z"
}
}{
"error": {
"code": "CONCURRENT_LIMIT_EXCEEDED",
"message": "Concurrent limit exceeded",
"details": {
"limit": 10
},
"timestamp": "2025-01-15T12:00:00.000Z"
}
}{
"success": false,
"error": "Request was canceled"
}{
"success": false,
"error": "Maximum retries exceeded"
}{
"error": {
"code": "EXTERNAL_SERVICE_ERROR",
"message": "External service error: OpenAI",
"details": {
"service": "OpenAI"
},
"timestamp": "2025-01-15T12:00:00.000Z"
}
}Grok is temporarily unavailableGrok has blocked anonymous access for the time being. Requests to this endpoint will fail.
Overview
The Grok endpoint extracts structured data from Grok with real-time web sources with enhanced metadata. Unlike other AI search providers, Grok provides extra contextual information for each source including preview text, creator details, site information, and image URLs.Web search enabledThis endpoint uses Grok’s default interface, which always performs web searches for all requests to provide real-time information with source citations.
Request parameters
Uses common parameters. Endpoint-specific options:include.rawResponse(boolean): Include raw streaming response events. Defaults tofalse
Response objects
The response includes the following sections. See each subpage for the full schema.| Section | Description |
|---|---|
| Sources | Sources with preview text, creator details, site information, and image URLs |
Response schema
Includes 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 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) |
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Request parameters for monitoring Grok responses
The prompt to send to Grok
Required string length:
1 - 10000Example:
"What are the best laptops for programming?"
Country/region code for localized response
Example:
"US"
Optional flags for including additional response formats
Show child attributes
Show child attributes
State code for sub-country geo-targeting (e.g., "CA"). Only valid with country "US".
Required string length:
2Pattern:
^[A-Z]{2}$Example:
"CA"
Was this page helpful?
⌘I