Brave

Brave AI Mode

Retrieve a Brave AI Mode answer and its sources. Send a new query with next_page_token to continue the conversation, keeping localization settings unchanged. Public proof and AI streaming can require up to 40 seconds on CPU-constrained runtimes.

post/v1/brave/ai-mode

Request

  • Base URL: https://api.prismcrawl.com
  • URL: https://api.prismcrawl.com/v1/brave/ai-mode
  • Auth: API key in header x-api-key

Request body

querystring required

Text to search for on the selected service. At most 8,192 UTF-8 bytes.

device'desktop' | 'mobile' | 'tablet'

Device presentation for the source request.

htmlboolean

Return the encoded original response rather than parsed JSON.

zero_traceboolean

Do not archive source or parsed response artifacts.

country'ar' | 'au' | 'at' | 'be' | 'br' | 'ca' | 'cl' | 'cn' | 'dk' | 'fi' | 'fr' | 'de' | 'gr' | 'hk' | 'in' | 'id' | 'it' | 'jp' | 'kr' | 'my' | 'mx' | 'nl' | 'nz' | 'no' | 'pl' | 'pt' | 'ph' | 'ru' | 'sa' | 'sg' | 'za' | 'es' | 'se' | 'ch' | 'tw' | 'tr' | 'gb' | 'us'

Two-letter country or storefront code, such as us or gb.

language'az' | 'bg' | 'br' | 'ca' | 'cs' | 'cy' | 'da' | 'de' | 'el' | 'en' | 'es' | 'et' | 'eu' | 'fi' | 'fr' | 'gl' | 'hr' | 'hu' | 'id' | 'it' | 'ja' | 'ka' | 'ko' | 'lt' | 'lv' | 'ms' | 'nb' | 'nl' | 'pl' | 'pt' | 'ro' | 'ru' | 'sk' | 'sl' | 'sq' | 'sr' | 'sv' | 'sw' | 'th' | 'tr' | 'uk' | 'vi' | 'zh'

Provider-supported language code, such as en.

safe'off' | 'moderate' | 'strict'

Provider safe-search filtering.

units_of_measurement'metric' | 'us'

Metric or US customary units in the answer.

next_page_tokenstring

Copy the opaque next_page_token from the previous response using the same account, search parameters, device, and result limit. Tokens expire after one hour; restart pagination if rejected or expired.

locationstring

Named geographic search origin; mutually exclusive with coordinates. Resend the same name when continuing a conversation.

output'json' | 'html' | 'md' | 'null' nullable

Response content format. md returns Markdown in data.content with data.format=md; the JSON success/request envelope remains. Accept: text/markdown also selects Markdown unless output or html=true is explicit. html is an alias for html=true and retains the existing Brotli/Base64 source format.

json_restrictorstring nullable

Select fields within data.content for JSON or Markdown. Supports comma-separated paths, non-negative array indices, half-open slices [0:3] (either bound may be omitted), [] and .{nested,subqueries}. Up to128 selections and16 levels. Missing fields are omitted; selected declared fields retain their zero defaults. The request envelope and credit headers remain. Include next_page_token when pagination is needed. Incompatible with HTML output. This changes response presentation only; tracing-enabled history retains the complete JSON result.

no_cacheboolean nullable

Accepted for compatibility. Searches are always fetched without a result cache for either value; normal successful-request billing applies.

Example request

{
  "json_restrictor": "results[].{title,url},has_next_page,next_page_token"
}

Response

Request completed. One credit is charged, including recognized empty or unavailable source results and source inventory changes discovered after a valid continuation is fetched. These completed responses may preserve verified partial results; operational failures remain errors.

successtrue required
request_idstring uuid required

Changes

No recorded changes to this operation across all 2 revisions of this API.