> ## 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.

# Wyszukiwarka postępowań

> Postępowania z Biuletynu Zamówień Publicznych zbudowane z łańcucha ogłoszeń (ogłoszenie o zamówieniu, zmiany, wynik, wykonanie umowy), po jednym rekordzie na postępowanie (`tender_id`). Wspiera pełnotekstowe wyszukiwanie w tytule i nazwie zamawiającego (`q`), filtry statusu (`phase`: `open`, `evaluation`, `awarded`, `cancelled`, `partial`), kodów CPV (`cpv` – dział 2-cyfrowy lub pełny kod, wielokrotnie), województwa (`province`, kod NUTS2 np. `PL14`), miasta (`city`), rodzaju zamawiającego (`client_type`, także prefiks np. `1.1`), rodzaju (`order_type`) i trybu (`tender_type`) zamówienia, wadium (`wadium`), kryterium wyłącznie cenowego (`price_only`), zakresu dat publikacji (`from`, `to`) i terminu składania ofert (`deadline_from`, `deadline_to`), wartości umowy (`value_min`, `value_max`) oraz identyfikatora firmy jako zamawiającego lub wykonawcy (`nip`). Sortowanie: `sort=published_desc` (domyślnie), `deadline_asc`, `value_desc`. Każdy zwrócony rekord to jedna jednostka z puli zapytań. Parametr `q` przeszukuje tytuł, krótki opis przedmiotu zamówienia (4.2.2) i nazwę zamawiającego: wszystkie słowa muszą wystąpić, `*` na końcu słowa dopasowuje przedrostek (np. `budow*`), słowo z `-` na początku wyklucza (np. `-remont`).



## OpenAPI

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

    krdata udostępnia dane z polskich rejestrów gospodarczych (KRS, CRBR, KRZ,
    MSiG, RDF, 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 pule (RDF, 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/bzp/tenders:
    get:
      tags:
        - BZP
      summary: Wyszukiwarka postępowań
      description: >-
        Postępowania z Biuletynu Zamówień Publicznych zbudowane z łańcucha
        ogłoszeń (ogłoszenie o zamówieniu, zmiany, wynik, wykonanie umowy), po
        jednym rekordzie na postępowanie (`tender_id`). Wspiera pełnotekstowe
        wyszukiwanie w tytule i nazwie zamawiającego (`q`), filtry statusu
        (`phase`: `open`, `evaluation`, `awarded`, `cancelled`, `partial`),
        kodów CPV (`cpv` – dział 2-cyfrowy lub pełny kod, wielokrotnie),
        województwa (`province`, kod NUTS2 np. `PL14`), miasta (`city`), rodzaju
        zamawiającego (`client_type`, także prefiks np. `1.1`), rodzaju
        (`order_type`) i trybu (`tender_type`) zamówienia, wadium (`wadium`),
        kryterium wyłącznie cenowego (`price_only`), zakresu dat publikacji
        (`from`, `to`) i terminu składania ofert (`deadline_from`,
        `deadline_to`), wartości umowy (`value_min`, `value_max`) oraz
        identyfikatora firmy jako zamawiającego lub wykonawcy (`nip`).
        Sortowanie: `sort=published_desc` (domyślnie), `deadline_asc`,
        `value_desc`. Każdy zwrócony rekord to jedna jednostka z puli zapytań.
        Parametr `q` przeszukuje tytuł, krótki opis przedmiotu zamówienia
        (4.2.2) i nazwę zamawiającego: wszystkie słowa muszą wystąpić, `*` na
        końcu słowa dopasowuje przedrostek (np. `budow*`), słowo z `-` na
        początku wyklucza (np. `-remont`).
      operationId: bzp-tenders
      parameters:
        - name: q
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                minLength: 2
                maxLength: 200
              - type: 'null'
            title: Q
        - name: phase
          in: query
          required: false
          schema:
            anyOf:
              - enum:
                  - open
                  - evaluation
                  - awarded
                  - cancelled
                  - partial
                  - closed
                type: string
              - type: 'null'
            title: Phase
        - name: cpv
          in: query
          required: false
          schema:
            anyOf:
              - items:
                  type: string
                type: array
              - type: 'null'
            title: Cpv
        - name: province
          in: query
          required: false
          schema:
            anyOf:
              - items:
                  type: string
                type: array
              - type: 'null'
            title: Province
        - name: city
          in: query
          required: false
          schema:
            anyOf:
              - type: array
                items:
                  type: string
                maxItems: 80
              - type: 'null'
            title: City
        - name: client_type
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                maxLength: 12
              - type: 'null'
            title: Client Type
        - name: order_type
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                maxLength: 16
              - type: 'null'
            title: Order Type
        - name: tender_type
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                maxLength: 12
              - type: 'null'
            title: Tender Type
        - name: opening_type
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                maxLength: 48
              - type: 'null'
            title: Opening Type
        - name: wadium
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            title: Wadium
        - name: price_only
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            title: Price Only
        - name: nip
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                minLength: 10
                maxLength: 13
              - type: 'null'
            title: Nip
        - name: role
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                enum:
                  - authority
                  - winner
              - type: 'null'
            title: Role
        - name: from
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date
              - type: 'null'
            title: From
        - name: to
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date
              - type: 'null'
            title: To
        - name: deadline_from
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date
              - type: 'null'
            title: Deadline From
        - name: deadline_to
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date
              - type: 'null'
            title: Deadline To
        - name: value_min
          in: query
          required: false
          schema:
            anyOf:
              - type: number
                minimum: 0
              - type: string
                pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
              - type: 'null'
            title: Value Min
        - name: value_max
          in: query
          required: false
          schema:
            anyOf:
              - type: number
                minimum: 0
              - type: string
                pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
              - type: 'null'
            title: Value Max
        - name: sort
          in: query
          required: false
          schema:
            enum:
              - published_desc
              - deadline_asc
              - value_desc
            type: string
            default: published_desc
            title: Sort
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 100
            minimum: 1
            default: 20
            title: Limit
        - name: offset
          in: query
          required: false
          schema:
            type: integer
            minimum: 0
            default: 0
            title: Offset
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BzpTenderPage'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    BzpTenderPage:
      properties:
        items:
          items:
            $ref: '#/components/schemas/BzpTenderRow'
          type: array
          title: Items
        limit:
          type: integer
          title: Limit
        offset:
          type: integer
          title: Offset
        has_more:
          type: boolean
          title: Has More
      type: object
      required:
        - items
        - limit
        - offset
        - has_more
      title: BzpTenderPage
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    BzpTenderRow:
      properties:
        tender_id:
          type: string
          title: Tender Id
        opening_type:
          type: string
          title: Opening Type
        opening_notice_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Opening Notice Id
        bzp_number:
          anyOf:
            - type: string
            - type: 'null'
          title: Bzp Number
        title:
          anyOf:
            - type: string
            - type: 'null'
          title: Title
        organization_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Organization Name
        organization_nip:
          anyOf:
            - type: string
            - type: 'null'
          title: Organization Nip
        organization_city:
          anyOf:
            - type: string
            - type: 'null'
          title: Organization City
        organization_province:
          anyOf:
            - type: string
            - type: 'null'
          title: Organization Province
        company_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Company Id
        client_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Client Type
        order_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Order Type
        tender_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Tender Type
        is_below_eu:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Below Eu
        cpv:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Cpv
        cpv_divisions:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Cpv Divisions
        nuts3:
          anyOf:
            - type: string
            - type: 'null'
          title: Nuts3
        published_at:
          type: string
          format: date-time
          title: Published At
        deadline_original:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Deadline Original
        deadline:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Deadline
        deadline_changes:
          type: integer
          title: Deadline Changes
          default: 0
        status:
          type: string
          title: Status
        phase:
          type: string
          title: Phase
        result_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Result At
        awarded_value:
          anyOf:
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
            - type: 'null'
          title: Awarded Value
        winners:
          anyOf:
            - items:
                $ref: '#/components/schemas/BzpWinner'
              type: array
            - type: 'null'
          title: Winners
        winner_nips:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Winner Nips
        parts_count:
          anyOf:
            - type: integer
            - type: 'null'
          title: Parts Count
        price_only:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Price Only
        wadium_required:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Wadium Required
        criteria:
          anyOf:
            - items:
                $ref: '#/components/schemas/BzpCriterion'
              type: array
            - type: 'null'
          title: Criteria
        notices_count:
          type: integer
          title: Notices Count
        last_notice_at:
          type: string
          format: date-time
          title: Last Notice At
        role:
          anyOf:
            - type: string
              enum:
                - authority
                - winner
            - type: 'null'
          title: Role
      type: object
      required:
        - tender_id
        - opening_type
        - published_at
        - status
        - phase
        - notices_count
        - last_notice_at
      title: BzpTenderRow
    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
    BzpWinner:
      properties:
        name:
          type: string
          title: Name
        city:
          anyOf:
            - type: string
            - type: 'null'
          title: City
        nip:
          anyOf:
            - type: string
            - type: 'null'
          title: Nip
      type: object
      required:
        - name
      title: BzpWinner
    BzpCriterion:
      properties:
        name:
          type: string
          title: Name
        weight:
          anyOf:
            - type: number
            - type: 'null'
          title: Weight
      type: object
      required:
        - name
      title: BzpCriterion
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: x-api-key

````