---
title: "Search the web using the Brave Search"
method: POST
path: "/webSearch"
---

# Search the web using the Brave Search

`POST /webSearch`

Search the web using the Brave Search (with a query upto 20 results per toolcall)

## Request body

- object
  - `body` object — Body of the webSearch sls call
    - `arguments` object, required — Configuration object containing all web search parameters.
      - `q` string, required — The search query (max 400 characters, 50 words).
      - `country` string — 2-letter country code. ( useful for news or local searches)
      - `search_lang` string — Search language.
      - `ui_lang` string — UI language.
      - `count` integer — Number of results (1-20).
      - `offset` integer — Offset for pagination (0-9).
      - `safesearch` 'off' | 'moderate' | 'strict' — Safe search level.
      - `freshness` union — Freshness of results.
        - 'pd' | 'pw' | 'pm' | 'py' — Predefined freshness periods
        - string — Custom date range in format 'YYYY-MM-DDtoYYYY-MM-DD'
      - `text_decorations` boolean — Include decoration markers.
      - `spellcheck` boolean — Enable spellchecking.
      - `result_filter` string — Comma-separated list of result types.
      - `goggles` string[] — Goggle definitions for custom re-ranking.
      - `units` 'metric' | 'imperial' — Units for measurements.
      - `extra_snippets` boolean — Include up to 5 additional, alternative excerpts.
      - `summary` boolean — Enable summary key generation for use with summarizer.

## Response `200`

Successful response

- object
  - `type` 'search', required — Always 'search'
  - `discussions` object — Optional discussions results
  - `faq` object — Optional FAQ results
  - `infobox` object — Optional infobox results
  - `locations` object — Optional location results
  - `mixed` object — Optional mixed results
  - `news` object — Optional news results
  - `query` object, required — Query information
  - `rich_data` object — Optional rich data
  - `web` object — Optional web search results
  - `videos` object — Optional video results

## Other responses

- `400` — Bad Request - Invalid parameters
- `401` — Unauthorized - Invalid or missing API key
- `429` — Too Many Requests - Rate limit exceeded
- `500` — Internal Server Error

---

[API](https://skmtc.net/microfox-ai/apis/brave-search.md) · [All operations](https://skmtc.net/microfox-ai/apis/brave-search/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/microfox-ai/brave-search/versions/2284eaa411cf/schema)
