Statistics Poland (GUS) Variables API

The Variables API from Statistics Poland (GUS) — 4 operation(s) for variables.

GitHub OpenAPI

Operations 4

GET /variables/metadata Metadane / Metadata #
GET /variables/{id} Zmienna o zadanym Id / Variable with selected Id #
GET /variables Lista zmiennych / Variables list #
GET /variables/search Wyszukiwanie zmiennych wg warunków/ Search variables with condition #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/stat-gov-pl:stat-gov-pl-variables-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

stat-gov-pl-variables-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Stat Gov Pl Variables API
  version: v1
  x-refined-note:
  - x-source differs across the merged source definitions and was not carried
  description: 'Operations tagged Variables across 2 of this provider''s published API definitions: stat-gov-pl-bdl-openapi.json, stat-gov-pl-bdl-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: /api/v1
- url: https://bdl.stat.gov.pl/api/v1
tags:
- name: Variables
paths:
  /variables/metadata:
    get:
      tags:
      - Variables
      summary: Metadane / Metadata
      parameters:
      - name: lang
        in: query
        description: Oczekiwany język odpowiedzi - opcjonalny (jeśli podano parametr, nagłówek "Accept-Language" jest ignorowany) / Expected response conent language - optional (if parameter specified, request header "Accept-Language" is ignored)
        schema:
          enum:
          - pl
          - en
          type: enum
      - name: format
        in: query
        description: Oczekiwany format odpowiedzi - opcjonalny (jeśli podano parametr, nagłówek "Accept" jest ignorowany) / Expected response content type - optional (if parameter specified, request header "Accept" is ignored)
        schema:
          enum:
          - json
          - jsonapi
          - xml
          type: enum
      - name: Accept-Language
        in: header
        description: Oczekiwany język odpowiedzi - opcjonalny (jeśli podano parametr "lang", nagłówek "Accept-Language" zostanie ignorowany) / Expected response conent language - optional (if "lang" parameter is specified, the "Accept-Language" header will be ignored)
        schema:
          enum:
          - pl
          - en
          type: enum
      - name: Accept
        in: header
        description: Oczekiwany format odpowiedzi - opcjonalny (jeśli podano parametr "format", nagłówek "Accept" zostanie zignorowany) / Expected response content type - optional (if the "format" parameter is specified, the "Accept" header will be ignored)
        schema:
          enum:
          - application/json
          - application/vnd.api+json
          - application/xml
          type: enum
      - name: If-None-Match
        in: header
        description: Nagłówek warunkowego żadania If-None-Match (entity tag)/Conditional Requests header If-None-Match (entity tag)
        schema:
          type: string
      - name: If-Modified-Since
        in: header
        description: Nagłówek warunkowego żadania If-Modified-Since/Conditional Requests header If-Modified-Since
        schema:
          type: string
      responses:
        '200':
          description: Success
          headers:
            ETag:
              description: Entity tag
              schema:
                type: string
            Date:
              description: Server date and time
              schema:
                type: string
            X-Rate-Limit-Limit:
              description: Rate limit limit
              schema:
                type: string
            X-Rate-Limit-Remaining:
              description: Rate limit remaining
              schema:
                type: string
            X-Rate-Limit-Reset:
              description: Rate limit reset
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Metadata'
            application/xml:
              schema:
                $ref: '#/components/schemas/Metadata'
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/Metadata'
        '429':
          $ref: '#/components/schemas/LimitResponseMessage'
      operationId: getVariablesMetadata
      x-operation-id-source: derived
    servers:
    - url: /api/v1
  /variables/{id}:
    get:
      tags:
      - Variables
      summary: Zmienna o zadanym Id / Variable with selected Id
      parameters:
      - name: id
        in: path
        description: Id zmiennej / Variable Id
        required: true
        schema:
          type: integer
          format: int32
      - name: lang
        in: query
        description: Oczekiwany język odpowiedzi - opcjonalny (jeśli podano parametr, nagłówek "Accept-Language" jest ignorowany) / Expected response conent language - optional (if parameter specified, request header "Accept-Language" is ignored)
        schema:
          enum:
          - pl
          - en
          type: enum
      - name: format
        in: query
        description: Oczekiwany format odpowiedzi - opcjonalny (jeśli podano parametr, nagłówek "Accept" jest ignorowany) / Expected response content type - optional (if parameter specified, request header "Accept" is ignored)
        schema:
          enum:
          - json
          - jsonapi
          - xml
          type: enum
      - name: Accept-Language
        in: header
        description: Oczekiwany język odpowiedzi - opcjonalny (jeśli podano parametr "lang", nagłówek "Accept-Language" zostanie ignorowany) / Expected response conent language - optional (if "lang" parameter is specified, the "Accept-Language" header will be ignored)
        schema:
          enum:
          - pl
          - en
          type: enum
      - name: Accept
        in: header
        description: Oczekiwany format odpowiedzi - opcjonalny (jeśli podano parametr "format", nagłówek "Accept" zostanie zignorowany) / Expected response content type - optional (if the "format" parameter is specified, the "Accept" header will be ignored)
        schema:
          enum:
          - application/json
          - application/vnd.api+json
          - application/xml
          type: enum
      - name: If-None-Match
        in: header
        description: Nagłówek warunkowego żadania If-None-Match (entity tag)/Conditional Requests header If-None-Match (entity tag)
        schema:
          type: string
      - name: If-Modified-Since
        in: header
        description: Nagłówek warunkowego żadania If-Modified-Since/Conditional Requests header If-Modified-Since
        schema:
          type: string
      responses:
        '500':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseMessage'
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/ErrorResponseMessage'
            application/xml:
              schema:
                $ref: '#/components/schemas/ErrorResponseMessage'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseMessage'
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/ErrorResponseMessage'
            application/xml:
              schema:
                $ref: '#/components/schemas/ErrorResponseMessage'
        '200':
          description: Success
          headers:
            ETag:
              description: Entity tag
              schema:
                type: string
            Date:
              description: Server date and time
              schema:
                type: string
            X-Rate-Limit-Limit:
              description: Rate limit limit
              schema:
                type: string
            X-Rate-Limit-Remaining:
              description: Rate limit remaining
              schema:
                type: string
            X-Rate-Limit-Reset:
              description: Rate limit reset
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VariableDetails'
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/VariableDetails'
            application/xml:
              schema:
                $ref: '#/components/schemas/VariableDetails'
        '429':
          $ref: '#/components/schemas/LimitResponseMessage'
      operationId: getVariablesById
      x-operation-id-source: derived
    servers:
    - url: /api/v1
  /variables:
    get:
      tags:
      - Variables
      summary: Lista zmiennych / Variables list
      parameters:
      - name: subject-id
        in: query
        description: Id tematu / Subject Id
        schema:
          type: string
      - name: level
        in: query
        description: Poziom / Level
        schema:
          type: integer
          format: int32
      - name: year
        in: query
        description: Lista lat / Years list
        schema:
          type: array
          items:
            type: integer
            format: int32
      - name: page
        in: query
        description: Indeks strony / Page index
        schema:
          type: integer
          format: int32
          default: 0
      - name: page-size
        in: query
        description: Rozmiar strony / Page size
        schema:
          type: integer
          format: int32
          default: 10
      - name: sort
        in: query
        description: Oczekiwana kolejność / Desired order
        schema:
          enum:
          - Id
          - -Id
          - Id,SubjectId
          - Id,-SubjectId
          - -Id,SubjectId
          - -Id,-SubjectId
          - SubjectId
          - -SubjectId
          - SubjectId,Id
          - SubjectId,-Id
          - -SubjectId,Id
          - -SubjectId,-Id
          type: enum
      - name: lang
        in: query
        description: Oczekiwany język odpowiedzi - opcjonalny (jeśli podano parametr, nagłówek "Accept-Language" jest ignorowany) / Expected response conent language - optional (if parameter specified, request header "Accept-Language" is ignored)
        schema:
          enum:
          - pl
          - en
          type: enum
      - name: format
        in: query
        description: Oczekiwany format odpowiedzi - opcjonalny (jeśli podano parametr, nagłówek "Accept" jest ignorowany) / Expected response content type - optional (if parameter specified, request header "Accept" is ignored)
        schema:
          enum:
          - json
          - jsonapi
          - xml
          type: enum
      - name: Accept-Language
        in: header
        description: Oczekiwany język odpowiedzi - opcjonalny (jeśli podano parametr "lang", nagłówek "Accept-Language" zostanie ignorowany) / Expected response conent language - optional (if "lang" parameter is specified, the "Accept-Language" header will be ignored)
        schema:
          enum:
          - pl
          - en
          type: enum
      - name: Accept
        in: header
        description: Oczekiwany format odpowiedzi - opcjonalny (jeśli podano parametr "format", nagłówek "Accept" zostanie zignorowany) / Expected response content type - optional (if the "format" parameter is specified, the "Accept" header will be ignored)
        schema:
          enum:
          - application/json
          - application/vnd.api+json
          - application/xml
          type: enum
      - name: If-None-Match
        in: header
        description: Nagłówek warunkowego żadania If-None-Match (entity tag)/Conditional Requests header If-None-Match (entity tag)
        schema:
          type: string
      - name: If-Modified-Since
        in: header
        description: Nagłówek warunkowego żadania If-Modified-Since/Conditional Requests header If-Modified-Since
        schema:
          type: string
      responses:
        '500':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseMessage'
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/ErrorResponseMessage'
            application/xml:
              schema:
                $ref: '#/components/schemas/ErrorResponseMessage'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseMessage'
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/ErrorResponseMessage'
            application/xml:
              schema:
                $ref: '#/components/schemas/ErrorResponseMessage'
        '200':
          description: Success
          headers:
            ETag:
              description: Entity tag
              schema:
                type: string
            Date:
              description: Server date and time
              schema:
                type: string
            X-Rate-Limit-Limit:
              description: Rate limit limit
              schema:
                type: string
            X-Rate-Limit-Remaining:
              description: Rate limit remaining
              schema:
                type: string
            X-Rate-Limit-Reset:
              description: Rate limit reset
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VariableList'
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/VariableList'
            application/xml:
              schema:
                $ref: '#/components/schemas/VariableList'
        '429':
          $ref: '#/components/schemas/LimitResponseMessage'
      operationId: getVariables
      x-operation-id-source: derived
    servers:
    - url: /api/v1
  /variables/search:
    get:
      tags:
      - Variables
      summary: Wyszukiwanie zmiennych wg warunków/ Search variables with condition
      parameters:
      - name: subject-id
        in: query
        description: Id tematu nadrzędnego / Parent's subject Id
        schema:
          type: string
      - name: name
        in: query
        description: Tekst w polach N1...N5 / Text in N1... N5 fields
        schema:
          type: string
      - name: level
        in: query
        description: Poziom / Level
        schema:
          type: integer
          format: int32
      - name: year
        in: query
        description: Lista lat / Years list
        schema:
          type: array
          items:
            type: integer
            format: int32
      - name: page
        in: query
        description: Indeks strony / Page index
        schema:
          type: integer
          format: int32
          default: 0
      - name: page-size
        in: query
        description: Rozmiar strony / Page size
        schema:
          type: integer
          format: int32
          default: 10
      - name: sort
        in: query
        description: Oczekiwana kolejność / Desired order
        schema:
          enum:
          - Id
          - -Id
          - Id,SubjectId
          - Id,-SubjectId
          - -Id,SubjectId
          - -Id,-SubjectId
          - SubjectId
          - -SubjectId
          - SubjectId,Id
          - SubjectId,-Id
          - -SubjectId,Id
          - -SubjectId,-Id
          type: enum
      - name: lang
        in: query
        description: Oczekiwany język odpowiedzi - opcjonalny (jeśli podano parametr, nagłówek "Accept-Language" jest ignorowany) / Expected response conent language - optional (if parameter specified, request header "Accept-Language" is ignored)
        schema:
          enum:
          - pl
          - en
          type: enum
      - name: format
        in: query
        description: Oczekiwany format odpowiedzi - opcjonalny (jeśli podano parametr, nagłówek "Accept" jest ignorowany) / Expected response content type - optional (if parameter specified, request header "Accept" is ignored)
        schema:
          enum:
          - json
          - jsonapi
          - xml
          type: enum
      - name: Accept-Language
        in: header
        description: Oczekiwany język odpowiedzi - opcjonalny (jeśli podano parametr "lang", nagłówek "Accept-Language" zostanie ignorowany) / Expected response conent language - optional (if "lang" parameter is specified, the "Accept-Language" header will be ignored)
        schema:
          enum:
          - pl
          - en
          type: enum
      - name: Accept
        in: header
        description: Oczekiwany format odpowiedzi - opcjonalny (jeśli podano parametr "format", nagłówek "Accept" zostanie zignorowany) / Expected response content type - optional (if the "format" parameter is specified, the "Accept" header will be ignored)
        schema:
          enum:
          - application/json
          - application/vnd.api+json
          - application/xml
          type: enum
      - name: If-None-Match
        in: header
        description: Nagłówek warunkowego żadania If-None-Match (entity tag)/Conditional Requests header If-None-Match (entity tag)
        schema:
          type: string
      - name: If-Modified-Since
        in: header
        description: Nagłówek warunkowego żadania If-Modified-Since/Conditional Requests header If-Modified-Since
        schema:
          type: string
      responses:
        '500':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseMessage'
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/ErrorResponseMessage'
            application/xml:
              schema:
                $ref: '#/components/schemas/ErrorResponseMessage'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseMessage'
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/ErrorResponseMessage'
            application/xml:
              schema:
                $ref: '#/components/schemas/ErrorResponseMessage'
        '200':
          description: Success
          headers:
            ETag:
              description: Entity tag
              schema:
                type: string
            Date:
              description: Server date and time
              schema:
                type: string
            X-Rate-Limit-Limit:
              description: Rate limit limit
              schema:
                type: string
            X-Rate-Limit-Remaining:
              description: Rate limit remaining
              schema:
                type: string
            X-Rate-Limit-Reset:
              description: Rate limit reset
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VariableList'
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/VariableList'
            application/xml:
              schema:
                $ref: '#/components/schemas/VariableList'
        '429':
          $ref: '#/components/schemas/LimitResponseMessage'
      operationId: getVariablesSearch
      x-operation-id-source: derived
    servers:
    - url: /api/v1
components:
  schemas:
    Version:
      type: object
      properties:
        id:
          type:
          - string
          - 'null'
          description: Pełny numer wersji / Full version number
        major:
          type: integer
          description: Numer główny wersji / The main version number
          format: int32
        minor:
          type: integer
          description: Numer dodatkowy wersji / The additional version number
          format: int32
        modificationDate:
          type: string
          description: Data ostatniej modyfikacji / Date of the last modification
          format: date-time
        deprecated:
          type:
          - string
          - 'null'
          description: Data wycofania / Date of the deprecation
          format: date-time
      additionalProperties: false
      description: Reprezentacja wersji API BDL / Representation of the API BDL version
    LimitResponseMessage:
      type: object
      properties:
        result:
          type:
          - string
          - 'null'
          description: Opis błędu / Error result
        reason:
          type:
          - string
          - 'null'
          description: Opis przyczyny błędu / Error reason description
      additionalProperties: false
      description: Definicja błędu limitu / Limit error definition
    Variable:
      type: object
      properties:
        metadata:
          $ref: '#/components/schemas/Metadata'
        version:
          $ref: '#/components/schemas/Version'
        id:
          type: integer
          description: Identyfikator cechy / Variable identifier
          format: int32
        subjectId:
          type:
          - string
          - 'null'
          description: Identyfikator tematu / Subject identifier
        n1:
          type:
          - string
          - 'null'
          description: Nazwa pierwszego wymiaru / The name of the first dimension
        n2:
          type:
          - string
          - 'null'
          description: Nazwa drugiego wymiaru / The name of the second dimension
        n3:
          type:
          - string
          - 'null'
          description: Nazwa trzeciego wymiaru / The name of the third dimension
        n4:
          type:
          - string
          - 'null'
          description: Nazwa czwartego wymiaru / The name of the fourth dimension
        n5:
          type:
          - string
          - 'null'
          description: Nazwa piątego wymiaru / The name of the fifth dimension
        level:
          type: integer
          description: Poziom agregacji cechy / Variable agregate level
          format: int32
        measureUnitId:
          type: integer
          description: Identyfikator jednostki miary / Measure unit identifier
          format: int32
        measureUnitName:
          type:
          - string
          - 'null'
          description: Nazwa jednostki miary / Measure unit name
      additionalProperties: false
      description: Reprezentacja cechy / Variable representation
    ErrorMessage:
      type: object
      properties:
        result:
          type:
          - string
          - 'null'
          description: Opis błędu / Error result
        reason:
          type:
          - string
          - 'null'
          description: Opis przyczyny błędu / Error reason description
        solution:
          type:
          - string
          - 'null'
          description: Rozwiązanie problemu / Error solution
        code:
          type:
          - integer
          - 'null'
          description: Kod błędu / Error code
          format: int32
        help:
          type:
          - string
          - 'null'
          description: Link do pomocy / Help link
      additionalProperties: false
      description: Komunikat błędu / Error message
    VariableList:
      type: object
      properties:
        totalRecords:
          type:
          - integer
          - 'null'
          description: ''
          format: int32
        page:
          type:
          - integer
          - 'null'
          description: ''
          format: int32
        pageSize:
          type:
          - integer
          - 'null'
          description: ''
          format: int32
        links:
          $ref: '#/components/schemas/PageLinks'
        results:
          type:
          - array
          - 'null'
          items:
            $ref: '#/components/schemas/Variable'
          description: ''
        metadata:
          $ref: '#/components/schemas/Metadata'
        version:
          $ref: '#/components/schemas/Version'
      additionalProperties: false
      description: Lista cech / List of the variables
    ErrorResponseMessage:
      type: object
      properties:
        errors:
          type:
          - array
          - 'null'
          items:
            $ref: '#/components/schemas/ErrorMessage'
          description: Lista błedów / Erros list
      additionalProperties: false
      description: Definicja listy błędów / Errors list definition
    Metadata:
      type: object
      properties:
        id:
          type:
          - string
          - 'null'
          description: Id metadanych / Matadata's id
        title:
          type:
          - string
          - 'null'
          description: Nazwa zasobu / Resource name
        url:
          type:
          - string
          - 'null'
          description: Url zasobu / Resource Url
        provider:
          type:
          - string
          - 'null'
          description: Dostawca zasobu / Resource provider
        modificationDate:
          type: string
          description: Data ostatniej modyfikacji / Last modification date
          format: date-time
        description:
          type:
          - string
          - 'null'
          description: Opis zasobu / Resource description
        keywords:
          type:
          - string
          - 'null'
          description: Słowa kluczowe / Describing keywords
        temporalCoverage:
          type:
          - string
          - 'null'
          description: ''
        language:
          type:
          - string
          - 'null'
          description: Języki prezentowania zasobu / Resource's languages
        updatePeriod:
          type:
          - string
          - 'null'
          description: Częstotliwość aktualizacji / Update frequency
        contentType:
          type:
          - string
          - 'null'
          description: Typ treści / Content type
      additionalProperties: false
      description: Definicja metadanych zasobu / Resource metadata definition
    PageLinks:
      type: object
      properties:
        firstPage:
          type:
          - string
          - 'null'
          description: Pierwsza strona / First page
        prevPage:
          type:
          - string
          - 'null'
          description: Poprzednia strona / Previous page
        self:
          type:
          - string
          - 'null'
          description: Bieżąca strona / Current page
        nextPage:
          type:
          - string
          - 'null'
          description: Następna strona / Next page
        lastPage:
          type:
          - string
          - 'null'
          description: Ostatnia strona / Last page
      additionalProperties: false
      description: Linki do stron wyników / Result page links
    VariableDetails:
      type: object
      properties:
        metadata:
          $ref: '#/components/schemas/Metadata'
        version:
          $ref: '#/components/schemas/Version'
        id:
          type: integer
          description: Identyfikator cechy / Variable identifier
          format: int32
        subjectId:
          type:
          - string
          - 'null'
          description: Identyfikator tematu / Subject identifier
        n1:
          type:
          - string
          - 'null'
          description: Nazwa pierwszego wymiaru / The name of the first dimension
        n2:
          type:
          - string
          - 'null'
          description: Nazwa drugiego wymiaru / The name of the second dimension
        n3:
          type:
          - string
          - 'null'
          description: Nazwa trzeciego wymiaru / The name of the third dimension
        n4:
          type:
          - string
          - 'null'
          description: Nazwa czwartego wymiaru / The name of the fourth dimension
        n5:
          type:
          - string
          - 'null'
          description: Nazwa piątego wymiaru / The name of the fifth dimension
        level:
          type: integer
          description: Poziom agregacji cechy / Variable agregate level
          format: int32
        measureUnitId:
          type: integer
          description: Identyfikator jednostki miary / Measure unit identifier
          format: int32
        measureUnitName:
          type:
          - string
          - 'null'
          description: Nazwa jednostki miary / Measure unit name
        description:
          type:
          - string
          - 'null'
          description: Opis cechy / Variable description
        years:
          type:
          - array
          - 'null'
          items:
            type: integer
            format: int32
          description: Lata obowiązywania cechy / Years of variable validity
      additionalProperties: false
      description: Szczegółowa reprezentacja cechy / Detailed representation of the variable
x-refined-from:
- stat-gov-pl-bdl-openapi.json
- stat-gov-pl-bdl-openapi.yml