Brave Web API

The Web API from Brave — 1 operation(s) for web.

OpenAPI Specification

brave-browser-web-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Brave Search Images Web API
  description: The Brave Search API provides programmatic access to Brave's independent search index covering web, news, image, video, suggest, spellcheck, summarizer, and local POI endpoints. Requests authenticate via the X-Subscription-Token header issued through the Brave Search API dashboard.
  version: '1.0'
  contact:
    name: Brave Search API
    url: https://api-dashboard.search.brave.com/app/documentation
servers:
- url: https://api.search.brave.com/res/v1
  description: Production API
security:
- SubscriptionToken: []
tags:
- name: Web
paths:
  /web/search:
    get:
      summary: Web search
      description: Query Brave's web search index.
      operationId: webSearch
      tags:
      - Web
      parameters:
      - name: q
        in: query
        required: true
        schema:
          type: string
        description: Search query
      - name: count
        in: query
        schema:
          type: integer
          default: 20
          maximum: 20
      - name: offset
        in: query
        schema:
          type: integer
          default: 0
          maximum: 9
      - name: country
        in: query
        schema:
          type: string
        description: Two-character country code
      - name: search_lang
        in: query
        schema:
          type: string
        description: ISO 639-1 language code
      - name: ui_lang
        in: query
        schema:
          type: string
      - name: safesearch
        in: query
        schema:
          type: string
          enum:
          - false
          - moderate
          - strict
          default: moderate
      - name: freshness
        in: query
        schema:
          type: string
        description: pd, pw, pm, py or custom range
      - name: extra_snippets
        in: query
        schema:
          type: boolean
      - name: text_decorations
        in: query
        schema:
          type: boolean
      responses:
        '200':
          description: Search results
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebSearchResponse'
components:
  schemas:
    WebSearchResponse:
      type: object
      properties:
        query:
          type: object
          properties:
            original:
              type: string
            more_results_available:
              type: boolean
        web:
          type: object
          properties:
            results:
              type: array
              items:
                type: object
                properties:
                  title:
                    type: string
                  url:
                    type: string
                    format: uri
                  description:
                    type: string
                  age:
                    type: string
                  extra_snippets:
                    type: array
                    items:
                      type: string
        mixed:
          type: object
        infobox:
          type: object
        news:
          type: object
        videos:
          type: object
        type:
          type: string
  securitySchemes:
    SubscriptionToken:
      type: apiKey
      in: header
      name: X-Subscription-Token