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

# Wyszukiwanie firm i osób

> Wyszukiwanie firm lub osób po nazwie (dopasowanie rozmyte z rankingiem podobieństwa) albo po dokładnym identyfikatorze (KRS, NIP, PESEL). Parametr `type` przełącza tryb na `company` lub `person`. Dla wyników typu osoba zwracane są dodatkowo skrócone informacje o powiązanych spółkach. Nie liczy się do żadnej puli.



## OpenAPI

````yaml /openapi.json get /v1/search
openapi: 3.1.0
info:
  title: krdata API
  description: >

    krdata udostępnia dane z polskich rejestrów gospodarczych (KRS, CRBR, KRZ,
    MSiG, biała lista VAT)

    w postaci jednego, spójnego API.


    Uwierzytelnianie odbywa się przez klucz API przekazywany w nagłówku
    `x-api-key`.

    Limity zapytań oraz dzienne pule (PDF, WPV, raporty) wynikają z wybranego
    abonamentu —

    szczegóły zwraca endpoint `GET /v1/usage/summary`.
  version: 0.1.0
servers:
  - url: https://api.krdata.pl
    description: Production
security: []
paths:
  /v1/search:
    get:
      tags:
        - Search
      summary: Wyszukiwanie firm i osób
      description: >-
        Wyszukiwanie firm lub osób po nazwie (dopasowanie rozmyte z rankingiem
        podobieństwa) albo po dokładnym identyfikatorze (KRS, NIP, PESEL).
        Parametr `type` przełącza tryb na `company` lub `person`. Dla wyników
        typu osoba zwracane są dodatkowo skrócone informacje o powiązanych
        spółkach. Nie liczy się do żadnej puli.
      operationId: search
      parameters:
        - name: type
          in: query
          required: true
          schema:
            enum:
              - company
              - person
            type: string
            title: Type
        - name: q
          in: query
          required: true
          schema:
            type: string
            minLength: 2
            maxLength: 200
            title: Q
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 25
            minimum: 1
            default: 10
            title: Limit
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SearchResult'
                title: Response Search
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    SearchResult:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        kind:
          type: string
          title: Kind
        name:
          type: string
          title: Name
        identifiers:
          anyOf:
            - $ref: '#/components/schemas/Identifiers'
            - type: 'null'
        score:
          anyOf:
            - type: number
            - type: 'null'
          title: Score
        company_count:
          anyOf:
            - type: integer
            - type: 'null'
          title: Company Count
        top_companies:
          anyOf:
            - items:
                $ref: '#/components/schemas/PersonSearchCompany'
              type: array
            - type: 'null'
          title: Top Companies
      type: object
      required:
        - id
        - kind
        - name
      title: SearchResult
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    Identifiers:
      properties:
        krs:
          anyOf:
            - type: string
            - type: 'null'
          title: Krs
        nip:
          anyOf:
            - type: string
            - type: 'null'
          title: Nip
        regon:
          anyOf:
            - type: string
            - type: 'null'
          title: Regon
        registry_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Registry Type
      type: object
      title: Identifiers
    PersonSearchCompany:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        krs:
          anyOf:
            - type: string
            - type: 'null'
          title: Krs
        name:
          type: string
          title: Name
      type: object
      required:
        - id
        - name
      title: PersonSearchCompany
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: x-api-key

````