> ## Documentation Index
> Fetch the complete documentation index at: https://test-62a57ffd.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Suggestions



## OpenAPI

````yaml api-reference/openapi.json get /v1/suggest/search
openapi: 3.1.0
info:
  title: Brave Search Products API
  description: |

    Product APIs exposed by Brave Search.

    You will be able to:

    * **Web Search**
  termsOfService: http://localhost:10000/terms-of-use/
  contact:
    name: Brave Search API
    url: http://localhost:10000/contact/
    email: search-api@brave.com
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  version: 1.0.0
  x-logo:
    url: >-
      https://cdn.search.brave.com/docs/681607ea86f83e9e04d242342a18f73f83f37137f5cd5246753f7a7a5beaca32-brave-logo-home-dark.svg
servers:
  - url: /res
    description: Default server
security:
  - ApiKeyAuth: []
tags:
  - name: web
    description: Get search results from the web
    x-displayName: Web Search
    x-mint:
      title: Web Search API
      description: Get search results from the web
  - name: news
    description: Get search results from the news
    x-displayName: News Search
  - name: videos
    description: Get search results from the videos
    x-displayName: Videos Search
  - name: images
    description: Get search results from the images
    x-displayName: Images Search
  - name: summarizer
    description: Get summarized search results
    x-displayName: AI Search
  - name: other
    description: Other API services
    x-displayName: Other
paths:
  /v1/suggest/search:
    get:
      tags:
        - other
      summary: Suggestions
      operationId: search_suggest_v1_suggest_search_get
      parameters:
        - name: q
          in: query
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 400
            title: The user's suggest search query term.
            description: >-
              The user's suggest search query term. Query can not be empty. The
              max query length is 400 characters, and the word limit is 50.
          description: >-
            The user's suggest search query term. Query can not be empty. The
            max query length is 400 characters, and the word limit is 50.
        - name: lang
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/Language-Input'
            description: >-
              The suggest search language preference, where potentially the
              results could come from. The 2 or more character language code for
              which the suggest search results are provided. This is a just a
              hint for calculating suggest responses.
            default: en
          description: >-
            The suggest search language preference, where potentially the
            results could come from. The 2 or more character language code for
            which the suggest search results are provided. This is a just a hint
            for calculating suggest responses.
        - name: country
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/SearchCountry'
            description: >-
              The suggest search query country, where potentially the results
              could come from. The country string is limited to 2 character
              country codes of supported countries. This is a just a hint for
              calculating suggest responses.
            default: US
          description: >-
            The suggest search query country, where potentially the results
            could come from. The country string is limited to 2 character
            country codes of supported countries. This is a just a hint for
            calculating suggest responses.
        - name: count
          in: query
          required: false
          schema:
            type: integer
            maximum: 20
            minimum: 1
            description: >-
              The number of suggestion search results returned in response. The
              actual number of results delivered may be less than requested.
              Minimum is 1, maximum is 20. The default is 5.
            default: 5
            title: Count
          description: >-
            The number of suggestion search results returned in response. The
            actual number of results delivered may be less than requested.
            Minimum is 1, maximum is 20. The default is 5.
        - name: rich
          in: query
          required: false
          schema:
            type: boolean
            description: >-
              Whether to enhance suggestions with rich results. This requires a
              paid autosuggest subscription.
            default: false
            title: Rich
          description: >-
            Whether to enhance suggestions with rich results. This requires a
            paid autosuggest subscription.
          examples:
            Include rich suggestions:
              value: true
            Exclude rich suggestions:
              value: false
        - name: x-subscription-token
          in: header
          required: true
          schema:
            type: string
            title: Subscription token
            description: The subscription token that was generated for the product.
            examples:
              - BSAgdIxiH0OLq6fnx6F-xp8Yplv4uOp
          description: The subscription token that was generated for the product.
        - name: api-version
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: API version
            description: >-
              The API version to use.                 This is denoted by the
              format `YYYY-MM-DD`.                 Default is the latest that is
              available.
          description: >-
            The API version to use.                 This is denoted by the
            format `YYYY-MM-DD`.                 Default is the latest that is
            available.
        - name: accept
          in: header
          required: false
          schema:
            $ref: '#/components/schemas/Accept'
            title: Media type
            description: The default supported media type is application/json.
            examples:
              - application/json
            default: application/json
          description: The default supported media type is application/json.
        - name: cache-control
          in: header
          required: false
          schema:
            anyOf:
              - $ref: '#/components/schemas/CacheControl'
              - type: 'null'
            title: Cache control
            description: >-
              Brave Search will return cached content by
              default.                 To prevent caching set the Cache-Control
              header to no-cache.                 This is currently done as best
              effort.
          description: >-
            Brave Search will return cached content by default.                
            To prevent caching set the Cache-Control header to
            no-cache.                 This is currently done as best effort.
        - name: user-agent
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: User agent
            description: >-
              The user agent originating the request.                 Brave
              search can utilize the user agent to provide a
              different                 experience depending on the device as
              described by the string.                 The user agent should
              follow the commonly used browser agent                 strings on
              each platform. For more information on curating user
              agents,                 see [RFC
              9110](https://www.rfc-editor.org/rfc/rfc9110.html#name-user-agent).
            examples:
              - >-
                **Android** Mozilla/5.0 (Linux; Android 12) AppleWebKit/537.36
                (KHTML, like Gecko) Chrome/103.0.5060.71 Mobile Safari/537.36
              - >-
                **iOS** Mozilla/5.0 (iPhone; CPU iPhone OS 15_5 like Mac OS X)
                AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/103.0.5060.63
                Mobile/15E148 Safari/604.1
              - >-
                **macOS** Mozilla/5.0 (Macintosh; Intel Mac OS X 12_4)
                AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0
                Safari/537.36
              - >-
                **Windows** Mozilla/5.0 (Windows NT 10.0; Win64; x64)
                AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0
                Safari/537.36
          description: >-
            The user agent originating the request.                 Brave search
            can utilize the user agent to provide a different                
            experience depending on the device as described by the
            string.                 The user agent should follow the commonly
            used browser agent                 strings on each platform. For
            more information on curating user agents,                 see [RFC
            9110](https://www.rfc-editor.org/rfc/rfc9110.html#name-user-agent).
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuggestSearchApiResponse'
        '404':
          content:
            application/json:
              examples:
                SUBSCRIPTION_NOT_FOUND:
                  summary: Missing subscription.
                  value:
                    type: ErrorResponse
                    errors:
                      - id: 5d832250-9396-4f6e-b84a-2a1fe524cd7d
                        code: SUBSCRIPTION_NOT_FOUND
                        detail: No subscription found.
                        status: 404
                        meta:
                          component: subscriptions
                    time: 1663072993
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Not Found
        '422':
          content:
            application/json:
              examples:
                SUBSCRIPTION_TOKEN_INVALID:
                  summary: Invalid subscription token.
                  value:
                    type: ErrorResponse
                    errors:
                      - id: 5d832250-9396-4f6e-b84a-2a1fe524cd7d
                        code: SUBSCRIPTION_TOKEN_INVALID
                        detail: The provided subscription token is invalid.
                        status: 422
                        meta:
                          component: authentication
                    time: 1663072993
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unprocessable Entity
        '429':
          content:
            application/json:
              examples:
                RATE_LIMITED:
                  summary: Rate limited.
                  value:
                    type: ErrorResponse
                    errors:
                      - id: 5d832250-9396-4f6e-b84a-2a1fe524cd7d
                        code: RATE_LIMITED
                        detail: Request rate limit exceeded for plan.
                        status: 429
                        meta:
                          component: rate_limiter
                    time: 1663072993
                QUOTA_LIMITED:
                  summary: Quota limited.
                  value:
                    type: ErrorResponse
                    errors:
                      - id: 5d832250-9396-4f6e-b84a-2a1fe524cd7d
                        code: QUOTA_LIMITED
                        detail: Request quota limit exceeded for plan.
                        status: 429
                        meta:
                          component: rate_limiter
                    time: 1663072993
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Too Many Requests
components:
  schemas:
    Language-Input:
      type: string
      enum:
        - ar
        - eu
        - bn
        - bg
        - ca
        - zh-hans
        - zh-hant
        - hr
        - cs
        - da
        - nl
        - en
        - en-gb
        - et
        - fi
        - fr
        - gl
        - de
        - el
        - gu
        - he
        - hi
        - hu
        - is
        - it
        - jp
        - kn
        - ko
        - lv
        - lt
        - ms
        - ml
        - mr
        - nb
        - pl
        - pt-br
        - pt-pt
        - pa
        - ro
        - ru
        - sr
        - sk
        - sl
        - es
        - sv
        - ta
        - te
        - th
        - tr
        - uk
        - vi
      title: Language
    SearchCountry:
      type: string
      enum:
        - AR
        - AU
        - AT
        - BE
        - BR
        - CA
        - CL
        - DK
        - FI
        - FR
        - DE
        - GR
        - HK
        - IN
        - ID
        - IT
        - JP
        - KR
        - MY
        - MX
        - NL
        - NZ
        - 'NO'
        - CN
        - PL
        - PT
        - PH
        - RU
        - SA
        - ZA
        - ES
        - SE
        - CH
        - TW
        - TR
        - GB
        - US
        - ALL
      title: SearchCountry
    Accept:
      type: string
      enum:
        - application/json
        - '*/*'
      title: Accept
    CacheControl:
      type: string
      enum:
        - no-cache
      const: no-cache
      title: CacheControl
    SuggestSearchApiResponse:
      properties:
        type:
          type: string
          enum:
            - suggest
          const: suggest
          title: Type
          default: suggest
        query:
          $ref: '#/components/schemas/app__models__products__search__v1__query__Query'
          description: Suggest search query string. Only the original query is returned.
        results:
          items:
            $ref: '#/components/schemas/SuggestResult'
          type: array
          title: Results
          description: The list of suggestions for the given query.
          default: []
      type: object
      required:
        - query
      title: SuggestSearchApiResponse
    ErrorResponse:
      properties:
        type:
          type: string
          title: Type
          default: ErrorResponse
        error:
          $ref: '#/components/schemas/ErrorModel'
        time:
          type: integer
          title: Time
          default: 0
      type: object
      required:
        - error
      title: ErrorResponse
    app__models__products__search__v1__query__Query:
      properties:
        original:
          type: string
          title: Original
          description: The original query that was requested.
        show_strict_warning:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Show Strict Warning
          description: Whether to show a warning that strict safesearch filtered results.
        altered:
          anyOf:
            - type: string
            - type: 'null'
          title: Altered
          description: The altered query by the spellchecker.
        cleaned:
          anyOf:
            - type: string
            - type: 'null'
          title: Cleaned
          description: The cleaned normalized query.
        safesearch:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Safesearch
          description: Whether safesearch is active.
        is_navigational:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Navigational
          description: >-
            Whether the query is navigational (user wants to go to a specific
            site).
        is_geolocal:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Geolocal
          description: Whether the query has local intent.
        local_decision:
          anyOf:
            - type: string
            - type: 'null'
          title: Local Decision
          description: The local search decision for the query.
        local_locations_idx:
          anyOf:
            - type: integer
            - type: 'null'
          title: Local Locations Idx
          description: Index of the local location result.
        is_trending:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Trending
          description: Whether the query is a trending topic.
        is_news_breaking:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is News Breaking
          description: Whether the query is related to breaking news.
        ask_for_location:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Ask For Location
          description: Whether to prompt the user for their location.
        language:
          anyOf:
            - $ref: >-
                #/components/schemas/app__models__products__search__v1__language__Language
            - type: 'null'
          description: The detected language of the query.
        spellcheck_off:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Spellcheck Off
          description: Whether spellcheck is disabled for this query.
        country:
          anyOf:
            - type: string
            - type: 'null'
          title: Country
          description: The country code for the query.
        bad_results:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Bad Results
          description: Whether the results are considered low quality.
        should_fallback:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Should Fallback
          description: Whether to fallback to alternative ranking.
        lat:
          anyOf:
            - type: string
            - type: 'null'
          title: Lat
          description: The latitude for location-based queries.
        long:
          anyOf:
            - type: string
            - type: 'null'
          title: Long
          description: The longitude for location-based queries.
        postal_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Postal Code
          description: The postal code for location-based queries.
        city:
          anyOf:
            - type: string
            - type: 'null'
          title: City
          description: The city for location-based queries.
        header_country:
          anyOf:
            - type: string
            - type: 'null'
          title: Header Country
          description: The country from request headers.
        more_results_available:
          anyOf:
            - type: boolean
            - type: 'null'
          title: More Results Available
          description: Whether more results are available for pagination.
        state:
          anyOf:
            - type: string
            - type: 'null'
          title: State
          description: The state/region for location-based queries.
        custom_location_label:
          anyOf:
            - type: string
            - type: 'null'
          title: Custom Location Label
          description: A custom label for the location.
        reddit_cluster:
          anyOf:
            - type: string
            - type: 'null'
          title: Reddit Cluster
          description: Reddit cluster identifier for discussion results.
        summary_key:
          anyOf:
            - type: string
            - type: 'null'
          title: Summary Key
          description: Key to retrieve AI-generated summary for the query.
        search_operators:
          anyOf:
            - $ref: '#/components/schemas/SearchOperators'
            - type: 'null'
          description: Search operators that were detected and applied to the query.
      type: object
      required:
        - original
      title: Query
    SuggestResult:
      properties:
        query:
          type: string
          title: Query
          description: Suggested query completion.
        is_entity:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Entity
          description: Whether the suggested enriched query is an entity.
        title:
          anyOf:
            - type: string
            - type: 'null'
          title: Title
          description: The suggested query enriched title.
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: The suggested query enriched description.
        img:
          anyOf:
            - type: string
            - type: 'null'
          title: Img
          description: The suggested query enriched image URL.
      type: object
      required:
        - query
      title: SuggestResult
    ErrorModel:
      properties:
        id:
          type: string
          title: Id
        status:
          type: integer
          title: Status
        code:
          $ref: '#/components/schemas/ErrorCode'
        detail:
          anyOf:
            - type: string
            - type: 'null'
          title: Detail
        meta:
          anyOf:
            - type: object
            - type: 'null'
          title: Meta
      type: object
      required:
        - id
        - status
        - code
      title: ErrorModel
    app__models__products__search__v1__language__Language:
      properties:
        main:
          type: string
          title: Main
      type: object
      required:
        - main
      title: Language
    SearchOperators:
      properties:
        applied:
          type: boolean
          title: Applied
          description: Whether search operators were applied to the query.
          default: false
        cleaned_query:
          anyOf:
            - type: string
            - type: 'null'
          title: Cleaned Query
          description: The query after search operators have been processed.
        sites:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Sites
          description: 'List of site domains extracted from site: operators.'
      type: object
      title: SearchOperators
    ErrorCode:
      type: string
      enum:
        - INTERNAL
        - INVALID_ID
        - UNAUTHORIZED
        - RESOURCE_NOT_ALLOWED
        - FORBIDDEN
        - VALIDATION
        - INVALID_PASSWORD
        - INVALID_EMAIL
        - INVALID_NAME
        - INVALID_COMPANY
        - INVALID_VAT_NUMBER
        - INVALID_DESCRIPTION
        - INVALID_USAGE
        - INVALID_INVOICE_NOTES
        - INVALID_PURCHASE_ORDER
        - PASSWORD_REUSED
        - PASSWORD_BREACHED
        - INVALID_TIME_RANGE
        - USER_ALREADY_EXISTS
        - USER_INACTIVE
        - RESET_PASSWORD_BAD_TOKEN
        - USER_NOT_FOUND
        - LOGIN_BAD_CREDENTIALS
        - LOGIN_USER_LOCKED_OUT
        - LOGIN_USER_NOT_VERIFIED
        - LOGIN_INVALID_MFA_CHALLENGE
        - VERIFY_USER_BAD_TOKEN
        - VERIFY_USER_ALREADY_VERIFIED
        - PLAN_NOT_FOUND
        - PLAN_ALREADY_EXISTS
        - PLAN_ALREADY_PUBLIC
        - PLAN_ALREADY_ALLOWED
        - STRIPE_CUSTOMER_NOT_EXISTS
        - STRIPE_SUBSCRIPTION_NOT_EXISTS
        - PRODUCT_NOT_FOUND
        - API_VERSION_NOT_FOUND
        - PRODUCT_ALREADY_EXISTS
        - OPTION_NOT_FOUND
        - OPTION_ALREADY_EXISTS
        - OPTION_NOT_IN_PLAN
        - SUBSCRIPTION_TOKEN_LIMIT
        - SUBSCRIPTION_TOKEN_INVALID
        - SUBSCRIPTION_TOKEN_INACTIVE
        - SUBSCRIPTION_TOKEN_DEACTIVATED
        - SUBSCRIPTION_TOKEN_NOT_FOUND
        - SUBSCRIPTION_ALREADY_EXISTS
        - SUBSCRIPTION_NOT_FOUND
        - ACTIVITY_SESSION_NOT_FOUND
        - ORGANIZATION_NOT_FOUND
        - ORGANIZATION_NOT_MEMBER
        - NO_PLANS_SUBSCRIBED
        - QUOTA_LIMITED
        - RATE_LIMITED
        - USAGE_LIMIT_EXCEEDED
        - USAGE_LIMIT_NOT_FOUND
        - USAGE_LIMIT_ALREADY_EXISTS
        - RESOURCE_NOT_SUBSCRIBED
        - CONTENT_TYPE_NOT_SUPPORTED
        - AGGREGATION_NOT_SUPPORTED
        - TIME_GRANULARITY_NOT_SUPPORTED
        - CURRENCY_NOT_FOUND
        - CURRENCY_ALREADY_EXISTS
        - CSRF_VERIFICATION
        - INVALID_GOGGLE_URL
        - INVALID_URL
        - INVALID_DOMAIN
        - INVALID_RESULT_FILTER
        - CONTENT_URL_LIMIT_EXCEEDED
        - TOS_NOT_FOUND
        - ADDENDUM_NOT_FOUND
        - REDACTION_NOT_FOUND
        - REDACTION_ALREADY_EXISTS
        - ADDENDUM_ALREADY_EXISTS
        - TOS_ALREADY_EXISTS
        - QUERY_NOT_FOUND
        - EMAIL_DOMAIN_IN_BLOCKLIST_NOT_FOUND
        - EMAIL_DOMAIN_IN_BLOCKLIST_ALREADY_EXISTS
        - EMAIL_DOMAIN_NOT_ALLOWED
        - INVALID_TOTP_TOKEN
        - EMAIL_MFA_SENT_EXCEEDED
        - EMAIL_MFA_NOT_SENT
        - AUTHENTICATOR_MFA_ALREADY_EXISTS
        - AUTHENTICATOR_MFA_NOT_FOUND
        - MFA_FAIL_TOO_MANY_ATTEMPTS
        - INVALID_RECOVERY_CODE
        - MFA_TOKEN_NOT_FOUND
        - PAYMENT_METHOD_NOT_FOUND
        - PAYMENT_METHOD_ALREADY_EXISTS
        - ROLE_NOT_FOUND
        - USER_ALREADY_MEMBER
        - ORGANIZATION_INVITATION_ALREADY_EXISTS
        - INVALID_ORGANIZATION_INVITATION
        - ORGANIZATION_INVITATION_NOT_FOUND
        - COMPLIANCE_NOT_FOUND
        - AWS_MARKETPLACE_TOKEN_INVALID
        - AWS_MARKETPLACE_TOKEN_EXPIRED
        - AWS_MARKETPLACE_CUSTOMER_RESOLUTION_FAILED
        - AWS_MARKETPLACE_PRODUCT_NOT_FOUND
        - AWS_MARKETPLACE_CREDENTIALS_MISSING
        - AWS_MARKETPLACE_API_ERROR
        - EMAIL_CHANGE_BAD_TOKEN
        - EMAIL_CHANGE_INVALID_MFA_CHALLENGE
        - EMAIL_CHANGE_MFA_FAIL_TOO_MANY_ATTEMPTS
        - EMAIL_CHANGE_RATE_LIMITED
        - EMAIL_CHANGE_INVALID_PASSWORD
      title: ErrorCode
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-subscription-token
      description: The subscription token that was generated for the product.

````