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

# Search companies

> Free-text company search for the dashboard's global search, backed by OpenSearch. Matches an exact
`companyId` or `domain`, then the company name (whole words, prefix, and a fuzzy fallback), ranked
by relevance and capped at 25 hits. Use GET /companies for paginated browsing and filtering.

Declared before GET /companies/{companyId} on purpose — tsoa registers routes in declaration order,
so the reverse would make `/companies/search` resolve as a company whose id is literally "search".



## OpenAPI

````yaml https://api.gleap.io/api-docs.json get /companies/search
openapi: 3.0.0
info:
  title: gleap-server
  version: 14.0.0
  contact: {}
servers:
  - url: https://api.gleap.io/v3
security: []
paths:
  /companies/search:
    get:
      tags:
        - Company
      summary: Search companies
      description: >-
        Free-text company search for the dashboard's global search, backed by
        OpenSearch. Matches an exact

        `companyId` or `domain`, then the company name (whole words, prefix, and
        a fuzzy fallback), ranked

        by relevance and capped at 25 hits. Use GET /companies for paginated
        browsing and filtering.


        Declared before GET /companies/{companyId} on purpose — tsoa registers
        routes in declaration order,

        so the reverse would make `/companies/search` resolve as a company whose
        id is literally "search".
      operationId: Search
      parameters:
        - in: header
          name: project
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/CompanySearchHit'
                type: array
      security:
        - jwt: []
components:
  schemas:
    CompanySearchHit:
      properties:
        id:
          type: string
        companyId:
          type: string
        name:
          type: string
        domain:
          type: string
        plan:
          type: string
        value:
          type: number
          format: double
        lastSeenAt:
          type: string
      required:
        - id
      type: object
      additionalProperties: false
  securitySchemes:
    jwt:
      type: http
      scheme: bearer
      bearerFormat: JWT

````