Skip to content
Scrappa Get API key

Brave Search API

Brave Search API documentation for developers who need Brave web results in JSON. Scrappa's GET /api/brave/search endpoint scrapes search.brave.com HTML through an approved proxy layer and returns organic results, related searches, and related questions.

Brave Search API for web results

Use this endpoint when you want independent Brave Search coverage instead of Google results. It is a proxy-backed HTML scrape of Brave Search, not the official Brave Search API and not a Google Search alias.

How to call the Brave Search API

Send a GET request to /api/brave/search with a required query parameter and your Scrappa API key in the x-api-key header. The q alias is also accepted. Optional parameters include language, page, and include_html.

Response fields

The response includes organic_results with position, title, link, snippet, and source, plus related_searches, related_questions, results_count, and a top-level source of brave.

Run this endpoint

Brave Search API 1 credit/request

Endpoint

GET https://scrappa.co/api/brave/search
Request preview GET
https://scrappa.co/api/brave/search
Auth header x-api-key
Cost 1 credit/request
query = coffee shops
Response preview 200 OK
{
    "source": "brave",
    "engine_used": "brave",
    "results_count": 2,
    "organic_results": [
        {
            "link": "https://example.com/privacy-tools",
            "title": "Privacy Tools",
            "source": "example.com",
            "snippet": "A list of privacy tools and private search engines.",
            "position": 1,
            "redirect_link": "https://example.com/privacy-tools",
            "displayed_link": "example.com"
        },
...

Parameters

Start with the required fields, then add optional filters only when your use case needs them.

Runnable path

1 required parameter needed before sending a request.

4 optional filters available.

query string Required

The Brave search query string. Use this parameter for new integrations.

Example: privacy tools

Example value coffee shops
q string Optional

Alias for query. Prefer query for new integrations.

Example value coffee shops
language string Optional

Language filter for Brave results. Accepts named values or ISO 639-1 codes.

Values: english, deutsch, french, spanish, italian, portuguese, dutch, russian, chinese, japanese, arabic, all, or en, de, fr, es, it, pt, nl, ru, zh, ja, ar

Default: all

Example value en
page string Optional

Result page number.

Range: 1-10

Default: 1

Example value 1
include_html string Optional

Include the raw Brave Search HTML in the JSON response for diagnostics.

Default: false

Example value example

Response Schema

Example response fields are illustrative; inspect the JSON before integrating.

Example response fields

Scan these fields before integrating.

source engine_used results_count organic_results related_searches related_questions search_information

Common organic_results fields

link title source snippet
JSON Response
200 OK
{
    "source": "brave",
    "engine_used": "brave",
    "results_count": 2,
    "organic_results": [
        {
            "link": "https://example.com/privacy-tools",
            "title": "Privacy Tools",
            "source": "example.com",
            "snippet": "A list of privacy tools and private search engines.",
            "position": 1,
            "redirect_link": "https://example.com/privacy-tools",
            "displayed_link": "example.com"
        },
        {
            "link": "https://example.org/private-search",
            "title": "Private Search Engines",
            "source": "example.org",
            "snippet": "Compare independent search engines that do not track users.",
            "position": 2,
            "redirect_link": "https://example.org/private-search",
            "displayed_link": "example.org"
        }
    ],
    "related_searches": [
        {
            "link": "https://search.brave.com/search?q=private+search+engines",
            "query": "private search engines"
        }
    ],
    "related_questions": [
        {
            "question": "What are privacy tools?"
        }
    ],
    "search_information": {
        "query_displayed": "privacy tools"
    }
}

Errors

Handle these documented responses before retrying or showing customer-facing failures.

422

Validation Error

The query is missing, or a language, page, or include_html parameter failed validation.

{
    "errors": {
        "query": [
            "The query field is required."
        ]
    },
    "message": "The request validation failed"
}
503

Brave Temporarily Unavailable

The upstream service is temporarily unavailable. Please retry shortly.

{
    "error": "Brave Search is temporarily unavailable. Please retry shortly.",
    "service": "BraveSearchService",
    "retryable": true,
    "error_code": "brave_upstream_unavailable",
    "failed_stage": "upstream_request"
}

Generate Code with AI

Copy a ready-made prompt with all the endpoint details, parameters, and example responses. Paste it into ChatGPT, Claude, or any AI assistant to instantly generate working code.

Try It Live

Test this endpoint in our interactive playground with real data.