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

# Simple company search

## Autocomplete company

Fast, lightweight search for companies by name. This endpoint is optimized for autocomplete functionality in user interfaces, returning quick results as users type. It searches both current and historical company names, making it perfect for implementing search-as-you-type features. Returns basic company information including ID, name, and register details.

**Cost:** 1 credit per request


## OpenAPI

````yaml GET /v1/autocomplete/company
openapi: 3.1.0
info:
  title: OpenRegister API
  version: 2.5.0
  description: >
    API for accessing comprehensive company data from official registers.

    This API provides access to company information, shareholder data, financial
    reports, and contact details.
servers:
  - url: https://api.openregister.de
    description: Production
security:
  - BearerAuth: []
paths:
  /v1/autocomplete/company:
    get:
      tags:
        - v1
      summary: Autocomplete company search
      operationId: autocompleteCompany
      parameters:
        - name: query
          in: query
          required: true
          description: |
            Text search query to find companies by name.
            Example: "Descartes Technologies UG"
          schema:
            type: string
      responses:
        '200':
          description: Successful search operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CompanyAutocompleteResponse'
        '400':
          description: Bad Request - Invalid parameters provided
        '401':
          description: Unauthorized - Authentication required
        '402':
          description: Payment Required - Insufficient credits for this request
        '429':
          description: Too Many Requests - Rate limit exceeded
        '500':
          description: >-
            Internal Server Error - An error occurred while processing the
            request
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import Openregister from 'openregister';


            const client = new Openregister({
              apiKey: process.env['OPENREGISTER_API_KEY'], // This is the default and can be omitted
            });


            const response = await client.search.autocompleteCompaniesV1({
            query: 'query' });


            console.log(response.results);
        - lang: Python
          source: |-
            import os
            from openregister import Openregister

            client = Openregister(
                api_key=os.environ.get("OPENREGISTER_API_KEY"),  # This is the default and can be omitted
            )
            response = client.search.autocomplete_companies_v1(
                query="query",
            )
            print(response.results)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/oregister/openregister-go\"\n\t\"github.com/oregister/openregister-go/option\"\n)\n\nfunc main() {\n\tclient := openregister.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tresponse, err := client.Search.AutocompleteCompaniesV1(context.TODO(), openregister.SearchAutocompleteCompaniesV1Params{\n\t\tQuery: \"query\",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", response.Results)\n}\n"
        - lang: CLI
          source: |-
            openregister search autocomplete-companies-v1 \
              --api-key 'My API Key' \
              --query query
components:
  schemas:
    CompanyAutocompleteResponse:
      type: object
      properties:
        results:
          type: array
          description: |
            List of companies matching the search criteria.
          items:
            $ref: '#/components/schemas/CompanySearchResponseItem'
      required:
        - results
    CompanySearchResponseItem:
      type: object
      properties:
        company_id:
          type: string
          description: |
            Unique company identifier.
            Example: DE-HRB-F1103-267645
        name:
          type: string
          description: |
            Official registered company name.
            Example: "Max Mustermann GmbH"
        country:
          type: string
          description: >
            Country where the company is registered using ISO 3166-1 alpha-2
            code.

            Example: "DE" for Germany
          nullable: true
        register_number:
          type: string
          description: |
            Registration number in the company register.
            Example: "230633"
        register_type:
          $ref: '#/components/schemas/CompanyRegisterType'
          description: |
            Type of company register.
            Example: "HRB" for Commercial Register B
        register_court:
          type: string
          description: |
            Court where the company is registered.
            Example: "Berlin (Charlottenburg)"
        active:
          type: boolean
          description: |
            Company status - true if active, false if inactive.
        legal_form:
          $ref: '#/components/schemas/CompanyLegalForm'
          description: |
            Legal form of the company.
            Example: "gmbh" for Gesellschaft mit beschränkter Haftung
        address:
          description: >
            Current registered address of the company, taken from the search
            index.
          nullable: true
          allOf:
            - $ref: '#/components/schemas/CompanySearchAddress'
        purpose:
          type: string
          description: >
            Current official business purpose of the company, taken from the
            search index.
          nullable: true
      required:
        - company_id
        - name
        - country
        - register_number
        - register_type
        - register_court
        - active
        - legal_form
        - address
        - purpose
    CompanyRegisterType:
      type: string
      description: >
        Type of company register where the entity is recorded.

        Common types:

        - HRB: Commercial Register B (limited liability companies, stock
        corporations)

        - HRA: Commercial Register A (partnerships, sole proprietorships)

        - PR: Partnership Register

        - GnR: Cooperative Register

        - VR: Association Register
      enum:
        - HRB
        - HRA
        - PR
        - GnR
        - VR
    CompanyLegalForm:
      type: string
      description: >
        Legal form of the company.

        Common German legal forms:

        - gmbh: Gesellschaft mit beschränkter Haftung (Limited Liability
        Company)

        - ag: Aktiengesellschaft (Stock Corporation)

        - ug: Unternehmergesellschaft (Entrepreneurial Company with limited
        liability)

        - ohg: Offene Handelsgesellschaft (General Partnership)

        - kg: Kommanditgesellschaft (Limited Partnership)

        - ev: Eingetragener Verein (Registered Association)
      enum:
        - ag
        - eg
        - ek
        - ev
        - ewiv
        - foreign
        - gbr
        - ggmbh
        - gmbh
        - kg
        - kgaa
        - unknown
        - llp
        - municipal
        - ohg
        - se
        - ug
    CompanySearchAddress:
      type: object
      properties:
        street:
          description: |
            Street name and number.
            Example: "Musterstraße 1"
          type: string
        city:
          description: |
            City or locality name.
            Example: "Berlin"
          type: string
        postal_code:
          description: |
            Postal or ZIP code.
            Example: "10117"
          type: string
        country:
          description: |
            Country of the address using ISO 3166-1 alpha-2 code.
            Example: "DE" for Germany
          type: string
        extra:
          description: |
            Additional address information such as c/o or attention line.
            Example: "c/o Max Mustermann"
          type: string
        formatted_value:
          description: |
            Complete address formatted as a single string.
            Example: "Musterstraße 1, 10117 Berlin"
          type: string
      required:
        - city
        - country
        - formatted_value
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: |
        API Key Authentication
        Provide your API key as a Bearer token in the Authorization header.

````