> ## Documentation Index
> Fetch the complete documentation index at: https://developers.ambersearch.de/llms.txt
> Use this file to discover all available pages before exploring further.

# Web search

> Perform a web search using the provided queries and parameters.

This endpoint allows searching the web with specified queries, sites, and other options.


<RequestExample>
  ```bash cURL theme={null}
  curl -X POST "https://customerName.ambersearch.de/api/beta/web_search" \
  -H "Authorization: Bearer ambrs-exampletoken" \
  -H "Content-Type: application/json" \
  -d '{
      "queries": ["latest developments in AI"],
      "sites": ["techcrunch.com", "wired.com"],
      "count": 5,
      "mode": "search"
  }'
  ```

  ```python Python theme={null}
  import requests

  response = requests.post(
      "https://customerName.ambersearch.de/api/beta/web_search",
      headers = {
          "Authorization": "Bearer ambrs-exampletoken"
      },
      json = {
          "queries": ["latest developments in AI"],
          "sites": ["techcrunch.com", "wired.com"],
          "count": 5,
          "mode": "context"
      }
  )
  print(response.json())
  ```

  ```javascript Javascript theme={null}
  const axios = require("axios");

  axios
      .post(
          "https://customerName.ambersearch.de/api/beta/web_search",
          {
              queries: ["latest developments in AI"],
              sites: ["techcrunch.com", "wired.com"],
              count: 5,
              mode: "perplexity",
          },
          {
              headers: {
                  Authorization: "Bearer ambrs-exampletoken",
              },
          },
      )
      .then((res) => console.log(res.data));
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  [
      {
          "url": "https://techcrunch.com/category/artificial-intelligence",
          "metadata": {
              "title": "AI News & Artificial Intelligence | TechCrunch",
              "description": "Read the latest on artificial intelligence and machine learning tech, the companies that are building them, and the ethical issues AI raises today."
          },
          "content": "News coverage on artificial intelligence and machine learning tech, the companies building them, and the ethical issues AI raises today. This encompasses generative AI, including large language models, text-to-image and text-to-video models; speech recognition and generation; and predictive analytics."
      },
      {
          "url": "https://techcrunch.com/2026/01/02/in-2026-ai-will-move-from-hype-to-pragmatism",
          "metadata": {
              "title": "In 2026, AI will move from hype to pragmatism | TechCrunch",
              "description": "That’s why many researchers believe the next big leap will come from world models: AI systems that learn how things move and interact in 3D spaces so they can make predictions and take actions."
          },
          "content": "Today, many researchers think the AI industry is beginning to exhaust the limits of scaling laws and will once again transition into an age of research. Yann LeCun, Meta’s former chief AI scientist, has long argued against the overreliance on scaling, and stressed the need to develop better architectures. In 2026, here's what you can expect from the AI industry: new architectures, smaller models, world models, reliable agents, physical AI, and products designed for real-world use. That’s why many researchers believe the next big leap will come from world models: AI systems that learn how things move and interact in 3D spaces so they can make predictions and take actions. Signs that 2026 will be a big year for world models are multiplying. LeCun left Meta to start his own world model lab and is reportedly seeking a $5 billion valuation. Google’s DeepMind has been plugging away at Genie and in August launched its latest model that builds real-time interactive general-purpose world models. The focus is already shifting away from building ever-larger language models and toward the harder work of making AI usable. In practice, that involves deploying smaller models where they fit, embedding intelligence into physical devices, and designing systems that integrate cleanly into human workflows."
      },
      {
          "url": "https://techcrunch.com/tag/generative-ai",
          "metadata": {
              "title": "Generative AI news and analysis | TechCrunch",
              "description": "TechCrunch covers the latest news and analysis in Generative AI (GenAI). Read the latest on startups and founders building artificial intelligence tools."
          },
          "content": "TechCrunch covers the latest news and analysis in Generative AI (GenAI). Read the latest on startups and founders building artificial intelligence tools."
      },
      {
          "url": "https://techcrunch.com/2025/05/29/inside-the-ai-revolution-top-insights-and-breakthroughs-from-our-partners-at-techcrunch-sessions-ai",
          "metadata": {
              "title": "Inside the AI revolution: Top insights and breakthroughs from our partners at TechCrunch Sessions: AI | TechCrunch",
              "description": "Discover how AI-powered conversational tools now help Toyota technicians instantly access complex repair data — boosting productivity and dealership efficiency through smarter, faster workflows. Don’t miss “Building Richer and More Scalable GenAI Applications for Startups and Developers” from 2:25 p.m."
          },
          "content": "This high-energy event brings together founders, investors, and technologists to explore how AI is transforming industries — from the pitch deck to full-scale deployment. We’re proud to spotlight our partners — not just for their support, but also for the expertise they bring to the stage. Their sessions offer a front-row view into the latest developments in AI and are a must-attend for anyone looking to stay ahead in this fast-evolving space. Discover how AI-powered conversational tools now help Toyota technicians instantly access complex repair data — boosting productivity and dealership efficiency through smarter, faster workflows."
      }
  ]
  ```
</ResponseExample>

You can use the `deep_search` parameter to enable a more comprehensive search that includes the full content of web pages, rather than just snippets. This can provide more detailed results but may take longer to process.

## Web search modes

The optional `mode` parameter selects which underlying search engine handles the request:

| Mode               | Description                                                                                                                                                                                                       |
| ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `search` (default) | Runs a standard Brave web search and crawls the resulting pages for their full content.                                                                                                                           |
| `context`          | Uses Brave's LLM Context API to return content optimized for grounding an LLM response, without crawling individual pages. The first result contains a synthesized summary, followed by grounded source snippets. |
| `perplexity`       | Uses the Perplexity Search API to return results.                                                                                                                                                                 |

All modes return the same response shape (a list of results with `url`, `metadata`, and `content`).

If `mode` is omitted, the tenant's configured default is used, falling back to `search` if no default is set.


## OpenAPI

````yaml post /api/beta/web_search
openapi: 3.1.0
info:
  title: amber
  version: v0.1.46
servers:
  - url: https://{customerDomain}.ambersearch.de
    variables:
      customerDomain:
        default: customerDomain
security: []
paths:
  /api/beta/web_search:
    post:
      tags:
        - Public REST API
      summary: Web Search Public Api
      description: >-
        Perform a web search using the provided queries and parameters.


        This endpoint allows searching the web with specified queries, sites,
        and other options.
      operationId: Web Search
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebSearchPayload'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - Bearer: []
components:
  schemas:
    WebSearchPayload:
      properties:
        queries:
          items:
            type: string
          type: array
          title: Queries
          description: List of search queries
          examples:
            - - latest AI advancements
              - best programming languages in 2024
        count:
          type: integer
          minimum: 1
          title: Count
          description: Maximum number of results to return
          default: 10
          examples:
            - 10
        sites:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Sites
          description: List of specific sites to search
          examples:
            - - example.com
              - anotherexample.com
        timeout:
          type: integer
          minimum: 1
          title: Timeout
          description: Timeout for the search in seconds
          default: 10
          examples:
            - 10
        deep_search:
          type: boolean
          title: Deep Search
          description: Whether to perform a deep search
          default: false
          examples:
            - false
        mode:
          anyOf:
            - $ref: '#/components/schemas/WebSearchMode'
            - type: 'null'
          title: Mode
          description: >-
            Web search endpoint to use: search (Brave, streaming), context
            (Brave LLM context), or perplexity. Omit to use the tenant default.
          examples:
            - search
      type: object
      required:
        - queries
      title: WebSearchPayload
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    WebSearchMode:
      type: string
      enum:
        - search
        - context
        - perplexity
      title: WebSearchMode
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    Bearer:
      type: http
      scheme: bearer

````