{"uid":"cap_bS-3hWgnMCBBrq1PZIOTo","slug":"grok-web-search-via-locus-x402-03492e65","name":"Grok Web Search via Locus x402","description":"xAI models — chat, web/X search, code execution, image generation/editing, and text-to-speech.","url":"https://grok.x402.paywithlocus.com/grok/web-search","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"model":{"type":"string"},"messages":{"type":"array","items":{"type":"object","required":["role"],"properties":{"name":{"type":"string"},"role":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","required":["type"],"properties":{"text":{"type":"string"},"type":{"type":"string"},"image_url":{"type":"object","required":["url"],"properties":{"url":{"type":"string"}},"additionalProperties":true}},"additionalProperties":true}},{"type":"null"}]},"tool_calls":{"type":"array","items":{"type":"object","additionalProperties":true}},"tool_call_id":{"type":"string"}},"additionalProperties":true}},"max_turns":{"type":"number"},"max_tokens":{"type":"number"},"temperature":{"type":"number"},"max_tool_calls":{"type":"number"},"search_parameters":{"type":"object","additionalProperties":true}}},"responseSchema":{"type":"json","example":{"data":{},"payment":{"scheme":"exact","settledUsdc":"0.001000","authorizedMaxUsdc":"0.001000"},"request":{"id":"00000000-0000-4000-8000-000000000000","statusUrl":"/requests/00000000-0000-4000-8000-000000000000"},"success":true}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_DzhWywt2WZS1T5eV9N4OO","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Performs real-time web search using xAI's Grok models, returning AI-synthesized answers grounded in live web results, paid per-call via x402 micropayment.","exampleAgentPrompt":"Search the web using Grok (grok-4.5) to find the latest information on quantum computing breakthroughs in 2025, limit to 500 output tokens and only search from nature.com and science.org.","exampleUseCases":[{"title":"Real-time news research with domain filtering","prompt":"Use Grok to search the web for the latest developments in the US-China trade negotiations, limit results to sources from reuters.com and apnews.com only, use grok-4.5 and give me up to 600 tokens of summary."},{"title":"Fact-checking a recent claim","prompt":"I need to verify whether the WHO declared a new health emergency in the last 30 days — search the web with Grok (grok-4.5-latest, 400 tokens max) and tell me what you find."},{"title":"Competitive market research","prompt":"Search the web with Grok grok-4.3 to find recent analyst reports on Nvidia's GPU market share in 2025, exclude twitter.com and reddit.com from results, and summarize in up to 800 tokens."}],"resultDescription":"Returns a JSON object containing the AI-generated answer synthesized from live web search results, payment details (settled and authorized USDC amounts), a unique request ID, and a status URL for tracking the request. The data field contains the Grok model's response grounded in real-time web content.","failureModes":["Insufficient x402 payment or payment failure — request rejected before processing","Invalid model ID provided — endpoint only accepts metered model IDs, not multi-agent variants","max_tokens not specified — required for metered x402, will error if missing","max_tool_calls exceeds range of 1–10 — rejected with validation error","Domain filter lists exceed 5 entries each — search_parameters ignored or rejected","Rate limiting or xAI upstream unavailability — 5xx error propagated","Malformed messages array — missing role or content fields cause parsing errors"],"whenToPreferThis":"Choose this endpoint when you need Grok AI to search the live web and synthesize an answer in real time, especially when you want domain-level control over which sources are searched (allowed/excluded domains). Prefer it over generic chat endpoints when freshness of information matters. It is particularly strong for questions about current events, recent publications, or time-sensitive facts. The x402 micropayment model at $0.001 USDC per call makes it cost-effective for high-frequency agent workflows that need grounded, up-to-date answers rather than relying solely on model training data.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T06:34:03.961Z","isFirstParty":false}