Apus supports Brave Search API as a web_search provider.

Get an API key

  1. Create a Brave Search API account at https://brave.com/search/api/
  2. In the dashboard, choose the Search plan and generate an API key.
  3. Store the key in config or set BRAVE_API_KEY in the Gateway environment.

Config example

{
  plugins: {
    entries: {
      brave: {
        config: {
          webSearch: {
            apiKey: "BRAVE_API_KEY_HERE",
            mode: "web", // or "llm-context"
            baseUrl: "https://api.search.brave.com", // optional proxy/base URL override
          },
        },
      },
    },
  },
  tools: {
    web: {
      search: {
        provider: "brave",
        maxResults: 5,
        timeoutSeconds: 30,
      },
    },
  },
}

Provider-specific Brave search settings live under plugins.entries.brave.config.webSearch.*; this is the canonical config path.

webSearch.mode controls the Brave transport:

webSearch.baseUrl can point Brave requests at a trusted Brave-compatible proxy or gateway. Apus appends /res/v1/web/search or /res/v1/llm/context to the configured base URL and keeps the base URL in the cache key. Public endpoints must use https://; http:// is accepted only for trusted loopback or private-network proxy hosts.

Tool parameters

query string

Search query.

count number

Number of results to return (1–10).

country string

2-letter ISO country code (e.g. US, DE).

language string

ISO 639-1 language code for search results (e.g. en, de, fr).

search_lang string

Brave search-language code (e.g. en, en-gb, zh-hans).

ui_lang string

ISO language code for UI elements.

freshness 'day' | 'week' | 'month' | 'year'

Time filter — day is 24 hours.

date_after string

Only results published after this date (YYYY-MM-DD).

date_before string

Only results published before this date (YYYY-MM-DD).

Examples:

// Country and language-specific search
await web_search({
  query: "renewable energy",
  country: "DE",
  language: "de",
});

// Recent results (past week)
await web_search({
  query: "AI news",
  freshness: "week",
});

// Date range search
await web_search({
  query: "AI developments",
  date_after: "2024-01-01",
  date_before: "2024-06-30",
});

Notes

Related