OpenAny
Get API keyAPI Key
APIScrapers

brave logo
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
USE THIS API

Brave AI Answers API

Prepare your request, then continue with your agent.

Selected price

$0.00015 / call

Provider
API
Pricing
Connect your agent
On this page

Overview

Overview
Brave AI Answers API

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

  1. Set OPENANY_API_KEY to your OpenAny API key.
  2. Review the selected implementation and pricing, then adapt the request below to your target.
  3. Check the HTTP response and business result before reading optional fields.
bash
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

View FAQ

Related APIs

Playground

Run sends a real API request. Charges follow the published API contract.

Request parameters
body*object

body

Get Brave AI answers with citations.
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.

Sample response

Run a request to see the actual response. Published samples are in Examples.

Response result

Sellers

SellerPricingRequests · 30dPerformanceAccess
litescrapeCurrent
Brave AI Mode · POST · View API reference
$0.00015 / call0
—successP50—
Selected implementation traffic · 11/3/2026 – 12/3/2026 (UTC)
Selected pricing · litescrapeUSD / call
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.

calls

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
View request and response examples

Input parameters

Fields in this listing; additional options and input encoding can vary by provider.

ParameterLocationTypeRequiredDescription
qJSON request bodybodystringYes

Question for Brave AI Mode. Required for both a new conversation and each follow-up.

minLength: 1 · maxLength: 2048

timeoutURL query parametersquerynumberNo

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_tokenJSON request bodybodystring | nullNo

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.

countryJSON request bodybodystringNo

Two-letter country preference, or all for all regions. Brave determines regional availability.

pattern: ^(?:[a-z]{2}|all)$

languageJSON request bodybodystringNo

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})?$

latJSON request bodybodynumber | nullNo

Latitude from -90 to 90. Supply with lon; explicit coordinates take precedence over location.

locationJSON request bodybodystring | nullNo

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.

lonJSON request bodybodynumber | nullNo

Longitude from -180 to 180. Supply with lat.

safeSearchJSON request bodybodystringNo

Adult-content filtering preference: off, moderate or strict.

enum: "off", "moderate", "strict"

units_of_measurementJSON request bodybodystringNo

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

Inferred from examples
  • answerstring
  • continuation_tokenstring
  • follow_up_questionsstring[]
  • referencesobject[]
    • indexinteger
    • linkstring
    • titlestring
  • search_metadataobject
    • brave_ai_mode_urlstring
    • created_atstring
    • idstring
    • json_endpointstring
    • processed_atstring
    • statusstring
    • total_time_takennumber
  • search_parametersobject
    • countrystring
    • languagestring
    • qstring
    • safeSearchstring
    • units_of_measurementstring
  • submit_feedback_for_this_response_herestring
  • text_blocksobject[]
    • reference_indexesinteger[]
    • snippetstring
    • typestring

Agent integration

Copy the resource contract without sharing an API key.

Download MDView API Markdown

Error handling

StatusNext step
400Check the offering and request fields.
401 / 403Verify your credentials and access permissions.
402Inspect the selected access mode and returned payment requirements.
429Respect the returned rate limit and retry guidance.
5xxInspect 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.

  1. 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 / Linux
    printf 'OpenAny API key: '
    read -r -s OPENANY_API_KEY
    export OPENANY_API_KEY
    printf '\n'
  2. 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 · cURL
    curl \
      '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"
    }'
  3. 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"
        }
      ]
    }

Common questions

How do I continue a conversation?

Send a new q with the latest continuation_token. Tokens expire after one hour and require the same API key and endpoint; omit the token to start again and keep it private as a conversation credential.

How do citations connect to the answer?

Match text_blocks reference_indexes to references index values and retain the associated source links. A cited answer is generated text; consult the linked source when checking a claim.

How do location preferences carry over?

lat and lon must be supplied together and take precedence over location. On follow-ups, a supplied location replaces inherited coordinates; location:null clears an inherited location in JSON.

Do language and units change the question?

language is a search-language preference and the answer also considers the question’s language. units_of_measurement selects us or metric; country accepts a two-letter preference or all.

Where should I set the request timeout?

Set timeout in the query string, including for POST requests. It must be greater than 0 and at most 90 seconds; page_timeout cannot extend this total execution budget.

Can I add arbitrary parameters to the JSON body?

Use the body fields exposed by this implementation. Its JSON schema rejects additional properties; query parameters such as timeout belong outside the JSON body.

Use Brave AI Answers API with your agent

Inspect endpoint contracts and confirm availability and pricing before a paid call.