Brave AI Answers API
Get Brave AI Answers data via REST or OpenAny MCP—with pay-per-use pricing and no subscription. Powered by LiteScrape, pass parameters such as country, language, q, and retrieve structured data including generated answer text, answer block text, reference indexes, source reference index, and source title for cited research views, and conversational discovery.
- Selected price
- $0.00015 / callPublished pricing
- Sellers / APIs
- 1 / 1
- Requests · 30d
- 0Selected implementation · last 30 days
- Success rate · 30d
- —No requests in this period
Brave AI Answers API
Prepare your request, then continue with your agent.
Selected price
$0.00015 / call
- Provider
- API
- Pricing
On this page
Overview
Brave AI Answers API
POST q for a new answer or q with the latest continuation_token for a follow-up. answer and text_blocks reference indexed sources in references; omitted preferences can carry over from the conversation token.
Quick Facts
| Fact | Value |
|---|---|
| Access | OpenAny REST |
| Authentication | OpenAny API key in the Authorization header |
| Core inputs | JSON body requires q; optional body fields: continuation_token, country, language, lat, location, lon, safeSearch, units_of_measurement. Optional query parameter: timeout (greater than 0, at most 90 seconds). |
| Selected implementation | litescrape · Brave AI Mode |
| Billing | See the pricing area for the selected implementation and request options |
What You Can Build
- Cited research views: Connect answer blocks to their indexed source references.
- Conversational discovery: Continue a conversation with the latest returned token.
Returned Data
| Field | Meaning |
|---|---|
answer |
Generated answer text. |
text_blocks[].snippet |
Answer block text. |
text_blocks[].reference_indexes[] |
Reference indices associated with a text block. |
references[].index |
Source reference index. |
references[].title |
Source title. |
references[].link |
Source URL. |
follow_up_questions[] |
Suggested follow-up question. |
continuation_token |
Opaque token for continuing the same conversation. |
Quick Start
- Set OPENANY_API_KEY to your OpenAny API key.
- Review the selected implementation and pricing, then adapt the request below to your target.
- Check the HTTP response and business result before reading optional fields.
curl --request POST \
https://api.openany.si/v1/agent-apis/litescrape/api/brave/ai-mode \
-H "Authorization: Bearer ${OPENANY_API_KEY}" \
-H "Content-Type: application/json" \
--data-raw '{"country":"us","language":"en","q":"How do rainbows form?","safeSearch":"moderate","units_of_measurement":"us"}'
Request and Response Examples
The response example is a documentation reference and may be abbreviated. The documented request is a calling template; use the published contract and returned response for the selected implementation.
Published Brave AI Answers API implementation contract.
Pricing and Billing
The pricing area reflects the selected API implementation. Review its billing unit and any request-dependent rules before calling; a source service's public availability does not determine OpenAny billing.
Frequently Asked Questions
Related APIs
Playground
Run sends a real API request. Charges follow the published API contract.
Sellers
| Seller | Pricing | Requests · 30d | Performance | Access |
|---|---|---|---|---|
litescrapeCurrent Brave AI Mode · POST · View API reference | $0.00015 / call | 0 | —successP50— |
- Unit price
- $0.00015
Statistics use persisted gateway logs from the last 30 days up to now, including today.
Success rate = successful requests / all requests;
P50 = median latency of successful requests.
Prices reflect the published API contract. Contract revision: 4. Price update time: not supplied.
Total $0.015
API
- Method
- POST
- Endpoint
https://api.openany.si/v1/agent-apis/litescrape/api/brave/ai-mode- Content type
- application/json
- Authentication
Authorization: Bearer $OPENANY_API_KEY
Input parameters
Fields in this listing; additional options and input encoding can vary by provider.
| Parameter | Location | Type | Required | Description |
|---|---|---|---|---|
q | JSON request bodybody | string | Yes | Question for Brave AI Mode. Required for both a new conversation and each follow-up. minLength: 1 · maxLength: 2048 |
timeout | URL query parametersquery | number | No | Total request execution budget in seconds, greater than 0 and at most 90. Supply in the query string for GET or POST. page_timeout cannot extend this budget. maximum: 90 |
continuation_token | JSON request bodybody | string | null | No | Token from the previous response. Send with a new q to continue that conversation. Omitted preferences carry over from the token; supplied preferences override them. Use the latest token returned by each successful response. Treat this token as a conversation credential and keep it private. Prefer JSON POST for follow-ups. Tokens expire after one hour and require the same API key and endpoint; omit the token to start again. |
country | JSON request bodybody | string | No | Two-letter country preference, or all for all regions. Brave determines regional availability. pattern: ^(?:[a-z]{2}|all)$ |
language | JSON request bodybody | string | No | Search language preference such as en, de or de-de. Brave also considers the language of your question when generating its answer. pattern: ^[a-z]{2}(?:-[a-z]{2})?$ |
lat | JSON request bodybody | number | null | No | Latitude from -90 to 90. Supply with lon; explicit coordinates take precedence over location. |
location | JSON request bodybody | string | null | No | City or postal code from the location catalog, such as Berlin, Germany or Austin, Texas, United States. Qualify ambiguous names with a state or country. Unknown locations fail; lat and lon take precedence when supplied together. On follow-ups, a supplied location replaces inherited coordinates. Send location: null in JSON to clear an inherited location. Resolved coordinates are returned in search_parameters. |
lon | JSON request bodybody | number | null | No | Longitude from -180 to 180. Supply with lat. |
safeSearch | JSON request bodybody | string | No | Adult-content filtering preference: off, moderate or strict. enum: "off", "moderate", "strict" |
units_of_measurement | JSON request bodybody | string | No | Unit preference: us for US customary units or metric for metric units. enum: "us", "metric" |
Required markers inside a nested object or variant apply when that object or variant is used.
Response structure
answerstringcontinuation_tokenstringfollow_up_questionsstring[]referencesobject[]indexintegerlinkstringtitlestring
search_metadataobjectbrave_ai_mode_urlstringcreated_atstringidstringjson_endpointstringprocessed_atstringstatusstringtotal_time_takennumber
search_parametersobjectcountrystringlanguagestringqstringsafeSearchstringunits_of_measurementstring
submit_feedback_for_this_response_herestringtext_blocksobject[]reference_indexesinteger[]snippetstringtypestring
Agent integration
Copy the resource contract without sharing an API key.
Error handling
| Status | Next step |
|---|---|
400 | Check the offering and request fields. |
401 / 403 | Verify your credentials and access permissions. |
402 | Inspect the selected access mode and returned payment requirements. |
429 | Respect the returned rate limit and retry guidance. |
5xx | Inspect the error and usage record before retrying a paid operation. |
Examples
Official example
Example from the provider's documentation. Field values in your results will differ.
Prepare your environment
Use a terminal with cURL installed.
Use an OpenAny API key with shared-balance access. Confirm availability and price before running; a call may charge your balance.
Set the key in your terminal using the hidden prompt below. Keep its value out of source files and logs.
Terminal · macOS / Linuxprintf 'OpenAny API key: ' read -r -s OPENANY_API_KEY export OPENANY_API_KEY printf '\n'Run the request
Paste the complete command below into your terminal.
Values to replace before running 2
Review these request fields before running. Keep the published provider and request method unchanged.
timeout- Total request execution budget in seconds, greater than 0 and at most 90. Supply in the query string for GET or POST. page_timeout cannot extend this budget.
body- Get Brave AI answers with citations.
Terminal · cURLcurl \ 'https://api.openany.si/v1/agent-apis/litescrape/api/brave/ai-mode' \ -X POST \ -H "Authorization: Bearer $OPENANY_API_KEY" \ -H 'Content-Type: application/json' \ --data-raw '{ "country": "us", "language": "en", "q": "How do rainbows form?", "safeSearch": "moderate", "units_of_measurement": "us" }'Check the response
Sample response · Documented HTTP 200
Sample response{ "answer": "Rainbows form when sunlight is refracted, reflected and dispersed by water droplets.", "continuation_token": "<opaque token returned by a successful request>", "follow_up_questions": [ "Why are the colors in that order?" ], "references": [ { "index": 1, "link": "https://www.nesdis.noaa.gov/about/k-12-education/optical-phenomena/what-causes-rainbow", "title": "What Causes a Rainbow?" } ], "search_metadata": { "brave_ai_mode_url": "https://search.brave.com/ask?q=How+do+rainbows+form%3F", "created_at": "2026-10-09T12:00:00+00:00", "id": "brave-ai-example", "json_endpoint": "https://api.litescrape.com/api/brave/ai-mode", "processed_at": "2026-10-09T12:00:05+00:00", "status": "Success", "total_time_taken": 5.0 }, "search_parameters": { "country": "us", "language": "en", "q": "How do rainbows form?", "safeSearch": "moderate", "units_of_measurement": "us" }, "submit_feedback_for_this_response_here": "https://ecll-litescrape-v3--site-api-web.modal.run/api/feedback/example-not-a-valid-token", "text_blocks": [ { "reference_indexes": [ 1 ], "snippet": "Rainbows form when sunlight is refracted, reflected and dispersed by water droplets.", "type": "text" } ] }