Discover/Brave API
live

Brave APIask.brave.com

Query Brave's AI answer engine via 2 endpoints. Get AI-generated answers with cited sources, web results, and autocomplete suggestions with entity data.

Endpoint health
verified 2h ago
suggest
ask
2/2 passing latest checkself-healing
Endpoints
2
Updated
2h ago

What is the Brave API?

The Brave Ask API exposes 2 endpoints that give you access to Brave's AI answer engine and its autocomplete suggestion system. The ask endpoint returns a Markdown-formatted AI-generated answer, cited sources with URLs and snippets, and the underlying web results used for generation. The suggest endpoint delivers ranked query completions, including entity-enriched results with names, descriptions, categories, and images.

Try it
The search query or partial query to get suggestions for.
Two-letter country code for localizing suggestions (e.g. us, gb, de, fr).
api.parse.bot/scraper/0f327506-6891-4ea0-b754-24e85f0b5c73/<endpoint>
Ready to send
Fill in the parameters and hit sign in to send to see live response data here.
Call it over HTTPgrab a free API key at signup
curl -X GET 'https://api.parse.bot/scraper/0f327506-6891-4ea0-b754-24e85f0b5c73/suggest?query=python+programming&country=us' \
  -H 'X-API-Key: $PARSE_API_KEY'
Python SDK · recommended

Typed, relational, agent-ready

A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.

  • Fully typed · autocompletes
  • Objects link to objects
  • Typed errors & pagination

Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:

uv add parse-sdk
uv run parse init
uv run parse add --marketplace ask-brave-com-api

uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.

"""Walkthrough: Brave Ask SDK — autocomplete suggestions and AI answers."""
from parse_apis.ask_brave_com_api import BraveAsk, QueryRequired

client = BraveAsk()

# Get autocomplete suggestions for a partial query
for suggestion in client.suggestions.search(query="machine learning", limit=5):
    print(suggestion.query, suggestion.is_entity)

# Ask a question and get an AI-generated answer with sources
answer = client.answers.create(query="What is the capital of France?")
print(answer.answer[:200])
print(f"Sources: {len(answer.sources)}, Web results: {len(answer.web_results)}")

# Access individual source details
for source in answer.sources[:3]:
    print(source.title, source.url)

# Handle invalid input
try:
    client.answers.create(query="")
except QueryRequired as e:
    print(f"Error: {e}")

print("exercised: suggestions.search / answers.create / source attributes / error handling")
All endpoints · 2 totalmissing one? ·

Retrieve autocomplete suggestions for a partial or full query. Returns ranked suggestions including entity-enriched results (with name, description, category, and image) alongside plain query completions.

Input
ParamTypeDescription
queryrequiredstringThe search query or partial query to get suggestions for.
countrystringTwo-letter country code for localizing suggestions (e.g. us, gb, de, fr).
Response
{
  "type": "object",
  "fields": {
    "query": "string",
    "suggestions": "array of suggestion objects with query, is_entity, and optional name/description/category/image"
  },
  "sample": {
    "data": {
      "query": "python programming",
      "suggestions": [
        {
          "name": "Python (programming language)",
          "image": "https://imgs.search.brave.com/...",
          "query": "python programming",
          "category": "programming",
          "is_entity": true,
          "description": "general-purpose programming language"
        },
        {
          "query": "python programming for beginners",
          "is_entity": false
        }
      ]
    },
    "status": "success"
  }
}

About the Brave API

Endpoints

The ask endpoint accepts a query string plus optional country and language parameters. Each call returns a answer field in Markdown format, a sources array where each entry carries a url, title, and snippet, a web_results array with the title, url, and description of each page consulted, and a conversation_id string. Every invocation starts a fresh conversation — there is no multi-turn state carried between calls via this API.

The suggest endpoint takes the same query input and an optional country code. It returns a suggestions array where each object includes a query string and an is_entity boolean. Entity results also carry name, description, category, and image fields, making them useful for disambiguation UI or knowledge-panel-style previews.

Localization

Both endpoints accept a country parameter (two-letter ISO code such as us, gb, or de) to bias results toward a specific region. The ask endpoint additionally accepts a language code (e.g. en, fr, es) to control the language of the AI-generated answer and sources returned.

Response Shape Notes

The ask endpoint's answer field is plain Markdown, so consuming applications can render it directly or strip formatting as needed. The sources and web_results arrays are separate: sources are the references explicitly cited in the answer, while web_results is the broader set of pages consulted during generation. The suggest endpoint's entity entries are only present when the input matches a recognized named entity — plain completions omit name, description, category, and image.

Reliability & maintenanceVerified

The Brave API is a managed, monitored endpoint for ask.brave.com — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when ask.brave.com changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.

This isn't an official ask.brave.com API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.

Last verified
2h ago
Latest check
2/2 endpoints passing
Maintenance
Monitored & self-healing
Will this API break when the source site changes?+
It's built not to. Every endpoint is health-checked on a schedule with automated test probes. When the source site changes and a check fails, the API is automatically queued for repair and re-verified — that's the self-healing layer. Each API page shows when its endpoints were last verified. And because marketplace APIs are shared, any fix reaches everyone using it.
Is this an official API from the source site?+
No — Parse APIs are independent, managed REST wrappers over publicly available data. That is the point: where a site has no official API (or only a limited one), Parse gives you a maintained, monitored endpoint for that data and keeps it working as the site changes — so you get a stable contract over a source that never promised one.
Can I fix or extend this API myself if I need a new endpoint or field?+
Yes — and you don't have to wait on us. This API was generated by the Parse agent, which stays attached. Describe the change in plain English ("add an endpoint that returns reviews", "fix the price field") in the revise box on the API page or via the revise_api MCP tool, and the agent rebuilds it against the live site in minutes. Contributing the change back to the public API is free.
What happens if I call an endpoint that has an issue?+
Errors are machine-readable: a bad call returns a clean status with the list of available endpoints and a repair hint, so an agent (or you) can recover or trigger a fix instead of failing silently. Confirmed failures feed the automatic repair queue.
Common use cases
  • Build a research assistant that returns cited answers and lets users follow source URLs directly from the sources array.
  • Power a search bar autocomplete that shows entity cards (name, category, image) for recognized named entities alongside plain query completions.
  • Generate topic summaries from the answer field and supplement them with the web_results list for further reading links.
  • Localize AI answers for regional audiences by passing country and language parameters to the ask endpoint.
  • Seed a Q&A knowledge base by storing conversation_id, answer, and sources fields for audit and review workflows.
  • Filter suggest results by is_entity to build an entity-disambiguation picker that displays category and description metadata.
Pricing & limitsSee full pricing →
TierPriceCredits/monthRate limit
Free$0/mo1005 req/min
Hobby$30/mo1,00020 req/min
Developer$100/mo5,000100 req/min

One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.

Frequently asked questions
Does Brave offer an official developer API for its search or AI products?+
Yes. Brave publishes the Brave Search API at https://api.search.brave.com, which covers web search, image search, and news. The Parse Brave Ask API targets the AI answer engine at ask.brave.com specifically, which is a separate product from the Brave Search API.
What does the `ask` endpoint return beyond the AI-generated answer?+
In addition to the answer field (Markdown text), the response includes a sources array of explicitly cited references — each with url, title, and snippet — a web_results array of pages consulted during generation with title, url, and description, and a conversation_id string identifying the session.
Can I continue a conversation across multiple `ask` calls using the `conversation_id`?+
Not currently. Each ask call creates a new conversation and returns a conversation_id, but the API does not accept a prior conversation_id as input to continue a thread. You can fork this API on Parse and revise it to add a multi-turn endpoint that threads follow-up questions.
Does the `suggest` endpoint always return entity fields like `name`, `description`, and `image`?+
No. Entity fields are only present on suggestion objects where is_entity is true — that is, when the query matches a recognized named entity. Plain query completions return only the query string and is_entity: false. The country parameter can shift which entities are recognized.
Does the API support fetching image or video search results through Brave Ask?+
Not currently. The API covers AI-generated text answers via the ask endpoint and query suggestions via the suggest endpoint. Image or video results are not part of the response shape. You can fork this API on Parse and revise it to add an endpoint targeting image or video search results.
Page content last updated . Spec covers 2 endpoints from ask.brave.com.
Related APIs in Developer ToolsSee all →
crt.sh API
Search for SSL/TLS certificates across public transparency logs by domain, fingerprint, serial number, or public key, and retrieve detailed certificate information including issuer, validity dates, and certificate chain details. Monitor certificate issuance for domains you care about to track security changes and detect unauthorized certificates.
artificialanalysis.ai API
Compare and rank LLM models and providers across performance benchmarks, then dive into detailed specifications for any model to find the best fit for your needs. Discover performance metrics for specialized AI systems handling speech, images, and video, plus benchmark data for different hardware configurations.
python.org API
Access comprehensive Python release information including downloads, versions, and supported operating systems, plus stay updated with the latest Python news and events. Search across Python.org's resources and browse release files, details, and the FTP index all in one place.
nvidia.com API
nvidia.com API
lucide.dev API
Browse and download thousands of Lucide icons with instant search and category filtering to find exactly what you need. Get SVG files and metadata for each icon to integrate them seamlessly into your projects.
alienvault.com API
Search and analyze global threat intelligence data including indicators of compromise, threat pulses, and adversary profiles from the Open Threat Exchange community. Monitor recent security alerts and access detailed information about threats and adversaries to strengthen your cybersecurity defenses.
httpbin.org API
Test HTTP requests and inspect what data your client is sending, including your IP address, headers, user agent, and generated UUIDs. Use it to verify how servers receive and process your requests during development and debugging.
namecheap.com API
Search for available domain names, check their registration status, and browse TLD pricing across different extensions. Discover discounted domains on the marketplace and explore hosting bundles to find the perfect combination for your website needs.