Statistics Poland (GUS) 1 Variable API

The _1Variable API from Statistics Poland (GUS) — 4 operation(s) for _1variable.

GitHub OpenAPI

Operations 4

GET /api/variable/variable-sections-periods Get a list of variables with sections and periods #
GET /api/variable/variable-section-position Get a list of available dimensions and dimension positions for a specific… #
GET /api/variable/variable-data-section Get data for a specific variables in the specific disaggregations and period… #
GET /api/variable/variable-meta Get a full set of metadata for a specific variable #

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-1variable-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-1variable-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Stat Gov Pl 1 Variable API
  version: en
  x-refined-note:
  - x-source differs across the merged source definitions and was not carried
  description: 'Operations tagged _1Variable across 2 of this provider''s published API definitions: stat-gov-pl-sdp-openapi.json, stat-gov-pl-sdp-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api-sdp.stat.gov.pl
tags:
- name: _1Variable
paths:
  /api/variable/variable-sections-periods:
    get:
      tags:
      - _1Variable
      summary: Get a list of variables with sections and periods
      description: ''
      parameters:
      - name: page-size
        in: query
        description: Data page size, maximum value 5000.
        schema:
          type: integer
          format: int32
        example: 50
      - name: page
        in: query
        description: Data page number.
        schema:
          type: integer
          format: int32
        example: 0
      - name: lang
        in: query
        description: Language selection, available values "pl" and "en".
        schema:
          type: string
          default: pl
      responses:
        '200':
          description: Data found.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/dane-zmienne-przekroje-okresy-page'
            text/csv:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/dane-zmienne-przekroje-okresy-page'
        '400':
          description: The server was unable to process the request.
        '401':
          description: Invalid API key or key has expired.
        '404':
          description: The requested resource was not found.
      security:
      - ApiKeyAuth: []
      operationId: getApiVariableVariableSectionsPeriods
      x-operation-id-source: derived
  /api/variable/variable-section-position:
    get:
      tags:
      - _1Variable
      summary: Get a list of available dimensions and dimension positions for a specific…
      description: ''
      parameters:
      - name: id-przekroj
        in: query
        description: cross-section id
        schema:
          type: integer
          format: int32
        example: 739
      - name: lang
        in: query
        description: Language selection, available values "pl" and "en".
        schema:
          type: string
          default: pl
      responses:
        '200':
          description: Data found.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/wymiary-pozycje-przekroj-1-1-0'
            text/csv:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/wymiary-pozycje-przekroj-1-1-0'
        '400':
          description: The server was unable to process the request.
        '401':
          description: Invalid API key or key has expired.
        '404':
          description: The requested resource was not found.
      security:
      - ApiKeyAuth: []
      operationId: getApiVariableVariableSectionPosition
      x-operation-id-source: derived
  /api/variable/variable-data-section:
    get:
      tags:
      - _1Variable
      summary: Get data for a specific variables in the specific disaggregations and period…
      description: ''
      parameters:
      - name: id-zmienna
        in: query
        description: section id
        schema:
          type: integer
          format: int32
        example: 305
      - name: id-przekroj
        in: query
        description: cross-section id
        schema:
          type: integer
          format: int32
        example: 739
      - name: id-rok
        in: query
        description: year id
        schema:
          type: integer
          format: int32
        example: 2023
      - name: id-okres
        in: query
        description: peroid id
        schema:
          type: integer
          format: int32
        example: 257
      - name: page-size
        in: query
        description: Data page size, maximum value 5000.
        schema:
          type: integer
          format: int32
        example: 50
      - name: page
        in: query
        description: Data page number.
        schema:
          type: integer
          format: int32
        example: 0
      - name: lang
        in: query
        description: Language selection, available values "pl" and "en".
        schema:
          type: string
          default: pl
      responses:
        '200':
          description: Data found.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/dane-przekroje-zmienna-page'
            text/csv:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/dane-przekroje-zmienna-page'
        '400':
          description: The server was unable to process the request.
        '401':
          description: Invalid API key or key has expired.
        '404':
          description: The requested resource was not found.
      security:
      - ApiKeyAuth: []
      operationId: getApiVariableVariableDataSection
      x-operation-id-source: derived
  /api/variable/variable-meta:
    get:
      tags:
      - _1Variable
      summary: Get a full set of metadata for a specific variable
      description: ''
      parameters:
      - name: id-zmiennej
        in: query
        description: section id
        schema:
          type: integer
          format: int32
        example: 305
      - name: lang
        in: query
        description: Language selection, available values "pl" and "en".
        schema:
          type: string
          default: pl
      responses:
        '200':
          description: Data found.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/metryczka'
            text/csv:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/metryczka'
        '400':
          description: The server was unable to process the request.
        '401':
          description: Invalid API key or key has expired.
        '404':
          description: The requested resource was not found.
      security:
      - ApiKeyAuth: []
      operationId: getApiVariableVariableMeta
      x-operation-id-source: derived
components:
  schemas:
    zestawy:
      type: object
      properties:
        id-zestaw:
          type: integer
          description: id_zestaw
          format: int64
          example: 680
        symbol-zestaw:
          type: string
          description: symbol_zestaw
          example: MC PESEL 02
        nazwa-zestaw:
          type: string
          description: nazwa_zestaw
          example: dane o liczbie i cechach osób zmieniających miejsce pobytu stałego w kraju
        id-gestor:
          type: integer
          description: id_gestor
          format: int64
          example: 186
        nazwa-gestor:
          type: string
          description: nazwa_gestor
          example: Kancelaria Prezesa Rady Ministrów
      additionalProperties: false
    dane-przekroje-zmienna-page:
      type: object
      properties:
        page-number:
          type: integer
          description: page_number
          format: int32
          example: 1
        page-size:
          type: integer
          description: page_size
          format: int32
          example: 1
        page-count:
          type: integer
          description: page_count
          format: int32
          example: 8000
        data:
          type:
          - array
          - 'null'
          items:
            $ref: '#/components/schemas/dane-przekroje-zmienna'
      additionalProperties: false
    wyjasnienia-metodologiczne:
      type: object
      properties:
        wyjasnienia-metodologiczne-tresc:
          type: string
          description: wyjasnienia_metodologiczne
        notki:
          type: array
          items:
            $ref: '#/components/schemas/notki'
      additionalProperties: false
    dane-zmienne-przekroje-okresy:
      type: object
      properties:
        rownumber:
          type: integer
          description: rowNumber
          format: int64
          example: 1
        id-zmienna:
          type: integer
          description: id_zmienna
          format: int32
          example: 581
        nazwa-zmienna:
          type:
          - string
          - 'null'
          description: nazwa_zmienna
          example: "\n\tPracujący według BAEL\n"
        id-przekroj:
          type: integer
          description: id_przekroj
          format: int32
        nazwa-przekroj:
          type:
          - string
          - 'null'
          description: nazwa_przekroj
          example: Polska; Rodzaj organizacji non-profit; Klasy zatrudnienia
        id-okres:
          type: integer
          description: id_okres
          format: int32
          example: 1
      additionalProperties: false
    badania:
      type: object
      properties:
        id-badanie:
          type: integer
          description: id_badanie
          format: int64
          example: 40
        symbol-badanie:
          type: string
          description: symbol_badanie
          example: 1.21.07
        temat-badanie:
          type: string
          description: temat_badanie
          example: Bilanse stanu i struktury ludności według cech demograficznych
        badanie-cel:
          type: string
          description: badanie_cel
          example: "Celem badania jest dostarczenie informacji dotyczących zmiany liczby ludności oraz podstawowych struktur (płeć, wiek, rozmieszczenie terytorialne) z uwagi na konieczność obserwacji tempa i kierunków rozwoju wybranych grup ludności w powiązaniu ze zmianami w systemie szkolnictwa, rynku pracy czy starzenia się ludności. \nDane o liczbie i strukturze ludności Polski przedstawiające stan w określonym momencie w układzie przestrzennym są jednymi z podstawowych informacji statystycznych, do których odnosi się wiele innych informacji z życia społecznego i gospodarczego, np.: dochody ludności, spożycie, produkcja, efekty gospodarki mieszkaniowej, infrastruktura, usługi medyczne, poziom edukacji."
      additionalProperties: false
    jednostki:
      type: object
      properties:
        id-jednostka:
          type: integer
          description: id_jednostka
          format: int64
          example: 593
        nazwa-jednostki:
          type: string
          description: nazwa_jednostki
          example: GUS - Departament Badań Demograficznych
      additionalProperties: false
    czestotliwosci:
      type: object
      properties:
        id-czestotliwosc:
          type: integer
          description: id_czestotliwosc
          format: int32
          example: 1
        nazwa-czestotliwosc:
          type: string
          description: nazwa_czestotliwosc
          example: Rok
      additionalProperties: false
    przekroje:
      type: object
      properties:
        id-przekroj:
          type: integer
          description: id_przekroj
          format: int32
          example: 50
        nazwa-przekroj:
          type: string
          description: nazwa_przekroj
          example: Polska, województwa, powiaty; Charakter miejscowości; Płeć; Wiek - pojedyncze roczniki
        szereg-czasowy:
          type: string
          description: szereg_czasowy
          example: 2010 - 2020
        id-czestotliwosc:
          type: integer
          format: int32
        nazwa-czestotliwosc:
          type: string
          description: nazwa_czestotliwosc
          example: Rok
        aktualizacja-ostatnia:
          type: string
          description: aktualizacja_ostatnia
          example: '2020-07-22'
        aktualizacja-kolejna:
          type: string
          description: aktualizacja_kolejna
          example: '2021-12-31'
      additionalProperties: false
    akty-prawne:
      type: object
      properties:
        id-akt:
          type: integer
          description: id_akt
          format: int64
          example: 324
        tytul-akt:
          type: string
          description: tytul_akt
          example: ustawa z dnia 24 września 2010 r. o ewidencji ludności
        adres-publikacyjny:
          type: string
          description: adres_publikacyjny
          example: (Dz. U. z 2021 r. poz. 510, z późn. zm.)
        inne-publikacje:
          type: string
          description: inne_publikacje
          example: inne publikacje...
      additionalProperties: false
    dane-przekroje-zmienna:
      type: object
      properties:
        rownumber:
          type: integer
          description: rowNumber
          format: int64
          example: 1
        id-zmienna:
          type: integer
          description: id_zmienna
          format: int32
          example: 581
        id-przekroj:
          type: integer
          description: id_przekroj
          format: int32
          example: 50
        id-wymiar-1:
          type: integer
          description: id_wymiar_1
          format: int32
          example: 10
        id-pozycja-1:
          type: integer
          description: id_pozycja_1
          format: int64
          example: 33617
        id-wymiar-2:
          type: integer
          description: id_wymiar_2
          format: int32
          example: 3
        id-pozycja-2:
          type: integer
          description: id_pozycja_2
          format: int64
          example: 6655092
        id-wymiar-3:
          type: integer
          description: id_wymiar_3
          format: int32
          example: 1
        id-pozycja-3:
          type: integer
          description: id_pozycja_3
          format: int64
          example: 6648208
        id-wymiar-4:
          type: integer
          description: id_wymiar_4
          format: int32
          example: 115
        id-pozycja-4:
          type: integer
          description: id_pozycja_4
          format: int64
          example: 6702863
        id-wymiar-5:
          type: integer
          description: id_wymiar_5
          format: int32
          example: 0
        id-pozycja-5:
          type: integer
          description: id_pozycja_5
          format: int64
          example: 0
        id-wymiar-6:
          type: integer
          description: id_wymiar_6
          format: int32
          example: 0
        id-pozycja-6:
          type: integer
          description: id_pozycja_6
          format: int64
          example: 0
        id-wymiar-7:
          type: integer
          description: id_wymiar_7
          format: int32
          example: 0
        id-pozycja-7:
          type: integer
          description: id_pozycja_7
          format: int64
          example: 0
        id-wymiar-8:
          type: integer
          description: id_wymiar_8
          format: int32
          example: 0
        id-pozycja-8:
          type: integer
          description: id_pozycja_8
          format: int64
          example: 0
        id-wymiar-9:
          type: integer
          description: id_wymiar_9
          format: int32
          example: 0
        id-pozycja-9:
          type: integer
          description: id_pozycja_9
          format: int64
          example: 0
        id-wymiar-10:
          type: integer
          description: id_wymiar_10
          format: int32
          example: 0
        id-pozycja-10:
          type: integer
          description: id_pozycja_10
          format: int64
          example: 0
        id-wymiar-11:
          type: integer
          description: id_wymiar_11
          format: int32
          example: 0
        id-pozycja-11:
          type: integer
          description: id_pozycja_11
          format: int64
          example: 0
        id-wymiar-12:
          type: integer
          description: id_wymiar_12
          format: int32
          example: 0
        id-pozycja-12:
          type: integer
          description: id_pozycja_12
          format: int64
          example: 0
        id-wymiar-13:
          type: integer
          description: id_wymiar_13
          format: int32
          example: 0
        id-pozycja-13:
          type: integer
          description: id_pozycja_13
          format: int64
          example: 0
        id-wymiar-14:
          type: integer
          description: id_wymiar_14
          format: int32
          example: 0
        id-pozycja-14:
          type: integer
          description: id_pozycja_14
          format: int64
          example: 0
        id-wymiar-15:
          type: integer
          description: id_wymiar_15
          format: int32
          example: 0
        id-pozycja-15:
          type: integer
          description: id_pozycja_15
          format: int64
          example: 0
        id-okres:
          type: integer
          description: id_okres
          format: int32
          example: 282
        id-sposob-prezentacji-miara:
          type: integer
          description: iid_sposob_prezentacji_miarad
          format: int32
          example: 93
        id-daty:
          type: integer
          description: id_daty
          format: int32
          example: 2019
        id-brak-wartosci:
          type: integer
          description: id_brak_wartosci
          format: int32
          example: 253
        id-tajnosci:
          type: integer
          description: id_tajnosci
          format: int32
          example: 43
        id-flaga:
          type: integer
          description: id_flaga
          format: int32
          example: 33
        wartosc:
          type: number
          description: wartosc
          format: double
          example: 193802
        wartosc-opisowa:
          type: string
          description: wartosc_opisowa
          example: '0'
      additionalProperties: false
    wymiary-pozycje-przekroj-1-1-0:
      type: object
      properties:
        id-przekroj:
          type: integer
          format: int32
        id-wymiar:
          type: integer
          format: int32
        nazwa-wymiar:
          type: string
        id-pozycja:
          type: integer
          format: int64
        nazwa-pozycja:
          type: string
        symbol:
          type:
          - string
          - 'null'
        data-poczatku:
          type:
          - string
          - 'null'
        data-konca:
          type:
          - string
          - 'null'
      additionalProperties: false
    notki:
      type: object
      properties:
        id-notka:
          type: integer
          description: id_notka
          format: int64
          example: 1
        opis:
          type: string
          description: opis
          example: opis notki
      additionalProperties: false
    metryczka:
      type: object
      properties:
        id-zmienna:
          type: integer
          description: id_zmienna
          format: int64
          example: 581
        nazwa:
          type: string
          description: nazwa
          example: "\n\tLudność\n"
        nazwa-skrocona:
          type: string
          description: nazwa_skrocona
          example: Ludność
        tagi:
          type: array
          items:
            $ref: '#/components/schemas/tagi'
        pojecia:
          type: array
          items:
            $ref: '#/components/schemas/pojecia'
        wyjasnienia-metodologiczne:
          $ref: '#/components/schemas/wyjasnienia-metodologiczne'
        notki:
          type: array
          items:
            $ref: '#/components/schemas/notki'
        przekroje:
          type: array
          items:
            $ref: '#/components/schemas/przekroje'
        czestotliwosci:
          type: array
          items:
            $ref: '#/components/schemas/czestotliwosci'
          description: szereg_czasowy
        zestawy:
          type: array
          items:
            $ref: '#/components/schemas/zestawy'
        badania:
          type: array
          items:
            $ref: '#/components/schemas/badania'
        akty-prawne:
          type: array
          items:
            $ref: '#/components/schemas/akty-prawne'
        jednostki:
          type: array
          items:
            $ref: '#/components/schemas/jednostki'
      additionalProperties: false
    dane-zmienne-przekroje-okresy-page:
      type: object
      properties:
        page-number:
          type: integer
          description: page_number
          format: int32
          example: 1
        page-size:
          type: integer
          description: page_size
          format: int32
          example: 1
        page-count:
          type: integer
          description: page_count
          format: int32
          example: 8000
        data:
          type:
          - array
          - 'null'
          items:
            $ref: '#/components/schemas/dane-zmienne-przekroje-okresy'
      additionalProperties: false
    tagi:
      type: object
      properties:
        id-tag:
          type: integer
          description: id_tag
          format: int64
          example: 360
        nazwa-tag:
          type: string
          description: nazwa_tag
          example: mieszkańcy
      additionalProperties: false
    pojecia:
      type: object
      properties:
        id-pojecie:
          type: integer
          description: id_pojecie
          format: int64
          example: 3917
        nazwa-pojecie:
          type: string
          description: nazwa_pojecie
          example: "\n\tLudność\n"
        definicja:
          type: string
          description: definicja
          example: "\n\tOgół osób (ogółem lub według określonych cech) zamieszkałych na stałe w danej jednostce administracyjnej i rzeczywiście tam przebywających oraz osób przebywających czasowo ponad 3 miesiące w tej jednostce, których stałym miejscem zamieszkania jest inna gmina w kraju.\n"
        uwagi:
          type: string
          description: uwagi
          example: "\n\tLudność jest jedną z dwóch kategorii zamieszkania obok rezydentów opracowywaną przez GUS.\n"
        data-poczatku-pojecie:
          type: string
          description: data_poczatek
          example: "\n\tData początku obowiązywania\n"
        data-konca-pojecie:
          type: string
          description: data_koniec
          example: "\n\tData końca obowiązywania\n"
      additionalProperties: false
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      name: X-ClientId
      in: header
x-refined-from:
- stat-gov-pl-sdp-openapi.json
- stat-gov-pl-sdp-openapi.yml