{"openapi":"3.1.0","info":{"title":"Brave Search via Locus MPP","version":"1.0.0","description":"Independent web search — web, news, images, videos, AI answers, and LLM context. Privacy-first search from a large independent index.","contact":{"email":"api@paywithlocus.com"},"x-guidance":"Use the documented POST operations for Brave Search. Send JSON matching each requestBody schema. Unpaid public x402 requests return an x402 v2 payment challenge; retry the same body with PAYMENT-SIGNATURE and the returned x-locus-request-id."},"x-agentcash-guidance":{"llmsTxtUrl":"https://beta.paywithlocus.com/mpp/brave.md"},"x-service-info":{"categories":["search"],"docs":{"homepage":"https://brave.com/search","apiReference":"https://api.search.brave.com/app/#/documentation","llms":"https://beta.paywithlocus.com/mpp/brave.md"}},"paths":{"/brave/web-search":{"post":{"operationId":"brave_web_search","summary":"Web Search","description":"Search the web from Brave's large independent index. Returns web results, discussions, FAQ, infobox, news, and videos.","tags":["Search"],"security":[],"x-payment-info":{"intent":"charge","method":"tempo","amount":"35000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"$0.035"},"parameters":[{"name":"x-locus-request-id","in":"header","required":false,"description":"UUID returned by the initial 402. Echo it on the paid retry and later recovery attempts.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"q":{"type":"string","description":"Search query (max 400 chars, 50 words)"},"count":{"type":"number","description":"Results to return (1-20, default 20)"},"offset":{"type":"number","description":"Page offset (0-9)"},"country":{"type":"string","description":"2-letter country code (default: US)"},"search_lang":{"type":"string","description":"Language code (default: en)"},"freshness":{"type":"string","description":"\"pd\" (24h), \"pw\" (7d), \"pm\" (31d), \"py\" (365d), or date range"},"safesearch":{"type":"string","description":"\"off\", \"moderate\" (default), \"strict\""},"result_filter":{"type":"string","description":"Comma-separated: web, news, videos, discussions, faq, infobox"},"summary":{"type":"boolean","description":"Enable summary generation"}},"required":["q"],"additionalProperties":true},"example":{"q":"x402 discovery"}}}},"responses":{"200":{"description":"Successful response with PAYMENT-RESPONSE and durable request receipt"},"202":{"description":"The supplied request ID is already in progress"},"400":{"description":"Invalid request"},"402":{"description":"Payment Required"},"409":{"description":"Request ID conflict or terminal failed request"}}}},"/brave/news-search":{"post":{"operationId":"brave_news_search","summary":"News Search","description":"Search news content from a large independent index.","tags":["Search"],"security":[],"x-payment-info":{"intent":"charge","method":"tempo","amount":"35000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"$0.035"},"parameters":[{"name":"x-locus-request-id","in":"header","required":false,"description":"UUID returned by the initial 402. Echo it on the paid retry and later recovery attempts.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"q":{"type":"string","description":"Search query"},"count":{"type":"number","description":"Results (1-50, default 20)"},"freshness":{"type":"string","description":"\"pd\", \"pw\", \"pm\", \"py\", or date range"},"country":{"type":"string","description":"Country code"}},"required":["q"],"additionalProperties":true},"example":{"q":"x402 discovery"}}}},"responses":{"200":{"description":"Successful response with PAYMENT-RESPONSE and durable request receipt"},"202":{"description":"The supplied request ID is already in progress"},"400":{"description":"Invalid request"},"402":{"description":"Payment Required"},"409":{"description":"Request ID conflict or terminal failed request"}}}},"/brave/image-search":{"post":{"operationId":"brave_image_search","summary":"Image Search","description":"Find images from a large independent index.","tags":["Search"],"security":[],"x-payment-info":{"intent":"charge","method":"tempo","amount":"35000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"$0.035"},"parameters":[{"name":"x-locus-request-id","in":"header","required":false,"description":"UUID returned by the initial 402. Echo it on the paid retry and later recovery attempts.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"q":{"type":"string","description":"Search query"},"count":{"type":"number","description":"Results (1-200, default 50)"},"safesearch":{"type":"string","description":"\"off\" or \"strict\" (default)"}},"required":["q"],"additionalProperties":true},"example":{"q":"x402 discovery"}}}},"responses":{"200":{"description":"Successful response with PAYMENT-RESPONSE and durable request receipt"},"202":{"description":"The supplied request ID is already in progress"},"400":{"description":"Invalid request"},"402":{"description":"Payment Required"},"409":{"description":"Request ID conflict or terminal failed request"}}}},"/brave/video-search":{"post":{"operationId":"brave_video_search","summary":"Video Search","description":"Search video content from a large independent index.","tags":["Search"],"security":[],"x-payment-info":{"intent":"charge","method":"tempo","amount":"35000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"$0.035"},"parameters":[{"name":"x-locus-request-id","in":"header","required":false,"description":"UUID returned by the initial 402. Echo it on the paid retry and later recovery attempts.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"q":{"type":"string","description":"Search query"},"count":{"type":"number","description":"Results (1-50, default 20)"},"freshness":{"type":"string","description":"\"pd\", \"pw\", \"pm\", \"py\", or date range"}},"required":["q"],"additionalProperties":true},"example":{"q":"x402 discovery"}}}},"responses":{"200":{"description":"Successful response with PAYMENT-RESPONSE and durable request receipt"},"202":{"description":"The supplied request ID is already in progress"},"400":{"description":"Invalid request"},"402":{"description":"Payment Required"},"409":{"description":"Request ID conflict or terminal failed request"}}}},"/brave/llm-context":{"post":{"operationId":"brave_llm_context","summary":"LLM Context","description":"Pre-extracted web content optimized for AI agents, LLM grounding, and RAG pipelines.","tags":["Search"],"security":[],"x-payment-info":{"intent":"charge","method":"tempo","amount":"35000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"$0.035"},"parameters":[{"name":"x-locus-request-id","in":"header","required":false,"description":"UUID returned by the initial 402. Echo it on the paid retry and later recovery attempts.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"q":{"type":"string","description":"Search query"},"maximum_number_of_tokens":{"type":"number","description":"Max tokens (1024-32768, default 8192)"},"maximum_number_of_urls":{"type":"number","description":"Max URLs (1-50, default 20)"},"freshness":{"type":"string","description":"\"pd\", \"pw\", \"pm\", \"py\", or date range"}},"required":["q"],"additionalProperties":true},"example":{"q":"x402 discovery"}}}},"responses":{"200":{"description":"Successful response with PAYMENT-RESPONSE and durable request receipt"},"202":{"description":"The supplied request ID is already in progress"},"400":{"description":"Invalid request"},"402":{"description":"Payment Required"},"409":{"description":"Request ID conflict or terminal failed request"}}}},"/brave/answers":{"post":{"operationId":"brave_answers","summary":"AI Answers","description":"AI-generated answers backed by real-time web search and verifiable sources. OpenAI-compatible chat format.","tags":["Search"],"security":[],"x-payment-info":{"intent":"charge","method":"tempo","amount":"85000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"$0.085"},"parameters":[{"name":"x-locus-request-id","in":"header","required":false,"description":"UUID returned by the initial 402. Echo it on the paid retry and later recovery attempts.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"messages":{"type":"array","items":{"type":"object","additionalProperties":true},"description":"Chat messages array [{role, content}]"},"model":{"type":"string","description":"\"brave\" or \"brave-pro\" (default)"},"stream":{"type":"boolean","description":"Stream response (default: false)"},"max_completion_tokens":{"type":"number","description":"Max output tokens"}},"required":["messages"],"additionalProperties":true},"example":{"messages":[{"role":"user","content":"Hello from x402"}]}}}},"responses":{"200":{"description":"Successful response with PAYMENT-RESPONSE and durable request receipt"},"202":{"description":"The supplied request ID is already in progress"},"400":{"description":"Invalid request"},"402":{"description":"Payment Required"},"409":{"description":"Request ID conflict or terminal failed request"}}}}}}