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

# Find similar brands

> Returns brands from the corpus that look like one of your completed extractions, as the same result cards as [`POST /search`](/api-reference/endpoint/search-brands).

Runs synchronously. Consumes credits, refunded if the request fails. The submission must be completed and readable by the caller.

Neighbours are computed fresh on every call, so they can vary slightly between calls for the same submission.



## OpenAPI

````yaml api-reference/openapi.json GET /search/similar
openapi: 3.1.0
info:
  title: Taste Engine Design API
  version: 1.0.0
  description: >-
    Public REST API for the Taste Engine. Submit a URL, extract a structured
    design system from any website, search the brand corpus by aesthetic, and
    ground prompts in real brand profiles.


    All requests are authenticated with an API key sent in the `X-API-Key`
    header. Create one directly in the Engine dashboard at
    https://engine.tastelabs.com/app/api-keys.
  contact:
    name: Taste Engine Support
    email: support@thetaste.ai
servers:
  - url: https://api.tastelabs.com
    description: Production
security:
  - ApiKeyAuth: []
tags:
  - name: Account
    description: Identity of the authenticated API key holder.
  - name: Submissions
    description: >-
      Create and track extraction jobs, then retrieve the resulting design
      system.
  - name: Prompts
    description: Rewrite prompts grounded in an extracted brand profile.
  - name: Search
    description: >-
      Find brands in the curated corpus by describing an aesthetic, or by
      similarity to one of your own extractions.
  - name: Brand adherence
    description: >-
      Judge how well a page adheres to a reference site's brand: submit a pair
      of URLs, poll the job, then read the verdict.
paths:
  /search/similar:
    get:
      tags:
        - Search
      summary: Find similar brands
      description: >-
        Returns brands from the corpus that look like one of your completed
        extractions, as the same result cards as [`POST
        /search`](/api-reference/endpoint/search-brands).


        Runs synchronously. Consumes credits, refunded if the request fails. The
        submission must be completed and readable by the caller.


        Neighbours are computed fresh on every call, so they can vary slightly
        between calls for the same submission.
      operationId: findSimilarBrands
      parameters:
        - name: submission_id
          in: query
          required: true
          description: A completed submission of yours whose visual neighbours you want.
          schema:
            type: string
            minLength: 1
        - name: top_k
          in: query
          required: false
          description: Maximum number of results to return.
          schema:
            type: integer
            minimum: 1
            maximum: 30
            default: 18
      responses:
        '200':
          description: Brands visually similar to the submission.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimilarBrandsResults'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/InsufficientCredits'
        '404':
          description: No completed extraction for that submission.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                detail:
                  error: NOT_FOUND
                  message: No completed extraction for that submission.
        '500':
          $ref: '#/components/responses/InternalError'
        '502':
          $ref: '#/components/responses/SearchFailed'
components:
  schemas:
    SimilarBrandsResults:
      type: object
      properties:
        results:
          type: array
          description: Nearest visual neighbours, closest first.
          items:
            $ref: '#/components/schemas/BrandSearchCard'
    Error:
      type: object
      description: >-
        Standard error envelope for non-2xx responses: the machine-readable
        `error` code and the human-readable `message` are nested under `detail`.
        Validation errors (`422`) and search failures (`502`, `503`) shape
        `detail` differently; see those responses.
      properties:
        detail:
          type: object
          properties:
            error:
              type: string
              description: Machine-readable error code.
              examples:
                - UNAUTHORIZED
                - FORBIDDEN
                - NOT_FOUND
                - NOT_READY
            message:
              type: string
              description: Human-readable explanation of the error.
          required:
            - error
            - message
          additionalProperties: true
      required:
        - detail
    BrandSearchCard:
      type: object
      description: >-
        One ranked brand from the corpus. Ranking scores stay internal and are
        not part of the response.
      properties:
        url:
          type: string
          format: uri
          description: URL of the brand's page in the corpus.
        brand_name:
          type:
            - string
            - 'null'
          description: Brand name, when one was identified.
        identity_paragraph:
          type: string
          description: A short description of the brand's visual identity.
        match:
          type:
            - string
            - 'null'
          enum:
            - strong
            - good
            - related
            - null
          description: >-
            Confidence tier of the match. `null` when the search did not assign
            one, as on similarity results.
        reason:
          type:
            - string
            - 'null'
          description: >-
            One sentence on why this brand matched the query. `null` when the
            search did not assign one.
        badge:
          type:
            - string
            - 'null'
          enum:
            - discovery
            - null
          description: >-
            `discovery` marks a rotating exemplar of the style detected in the
            query, included so identical searches do not return an identical
            set. `null` otherwise.
        tags:
          type: array
          description: Descriptive tags for the brand, e.g. industry and page type.
          items:
            type: string
        palette:
          type:
            - object
            - 'null'
          description: >-
            Palette classification: `luminance`, `temperature`, `saturation`,
            `themes`, `aesthetic_codes`, `effects`, plus `primary` and
            `secondary` hex lists.
        typography:
          type:
            - object
            - 'null'
          description: >-
            Typography classification: `family_strategy`, `hierarchy`, and
            `character`.
        screenshot_url:
          type:
            - string
            - 'null'
          format: uri
          description: Full-page screenshot of the brand's page. Fetch it to see the brand.
      required:
        - url
        - identity_paragraph
  responses:
    Unauthorized:
      description: The API key is missing, invalid, or expired.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            detail:
              error: UNAUTHORIZED
              message: Bearer token or X-API-Key required
    InsufficientCredits:
      description: >-
        The account doesn't have enough credits to run the request. Only occurs
        when credit metering is enabled.
      content:
        application/json:
          schema:
            type: object
            required:
              - detail
            properties:
              detail:
                type: object
                required:
                  - error
                  - message
                properties:
                  error:
                    type: string
                    examples:
                      - INSUFFICIENT_CREDITS
                  message:
                    type: string
                  balance:
                    type: integer
                    description: The account's current credit balance.
                  required:
                    type: integer
                    description: Credits required to run this request.
          example:
            detail:
              error: INSUFFICIENT_CREDITS
              message: Not enough credits for this request.
              balance: 0
              required: 1
    InternalError:
      description: An unexpected server error occurred. The body is plain text.
      content:
        text/plain:
          example: Internal Server Error
    SearchFailed:
      description: >-
        The search could not be completed. The credit charge is refunded.
        `detail` is a plain string.
      content:
        application/json:
          schema:
            type: object
            properties:
              detail:
                type: string
          example:
            detail: Search failed.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: >-
        API key issued by the Taste Engine. Create one in the dashboard at
        https://engine.tastelabs.com/app/api-keys.

````