Statistics Poland (GUS) Years API

The Years API from Statistics Poland (GUS) — 3 operation(s) for years.

GitHub OpenAPI

Operations 3

GET /years/metadata Metadane / Metadata #
GET /years/{id} Rok o wybranym Id / Year with selected Id #
GET /years Lista lat obowiązywania danych / List of years of data availability #

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-years-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-years-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Stat Gov Pl Years API
  version: v1
  x-refined-note:
  - x-source differs across the merged source definitions and was not carried
  description: 'Operations tagged Years 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: Years
paths:
  /years/metadata:
    get:
      tags:
      - Years
      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: getYearsMetadata
      x-operation-id-source: derived
    servers:
    - url: /api/v1
  /years/{id}:
    get:
      tags:
      - Years
      summary: Rok o wybranym Id / Year with selected Id
      parameters:
      - name: id
        in: path
        description: Id roku / Year Id
        required: true
        schema:
          type: string
      - 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/Year'
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/Year'
            application/xml:
              schema:
                $ref: '#/components/schemas/Year'
        '429':
          $ref: '#/components/schemas/LimitResponseMessage'
      operationId: getYearsById
      x-operation-id-source: derived
    servers:
    - url: /api/v1
  /years:
    get:
      tags:
      - Years
      summary: Lista lat obowiązywania danych / List of years of data availability
      parameters:
      - name: sort
        in: query
        description: Oczekiwana kolejność / Desired order
        schema:
          enum:
          - Id
          - -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/YearList'
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/YearList'
            application/xml:
              schema:
                $ref: '#/components/schemas/YearList'
        '429':
          $ref: '#/components/schemas/LimitResponseMessage'
      operationId: getYears
      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
    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
    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
    Year:
      type: object
      properties:
        metadata:
          $ref: '#/components/schemas/Metadata'
        version:
          $ref: '#/components/schemas/Version'
        id:
          type: integer
          description: Identyfikator roku / Year identifier
          format: int32
        hasLocalities:
          type: boolean
          description: Czy są miejscowości? / Are localities in this year?
        quarterly:
          type:
          - string
          - 'null'
          description: Dane roczne lub kwartalne / Yearly or quarterly data
      additionalProperties: false
      description: Definicja roku / Year definition
    YearList:
      type: object
      properties:
        totalRecords:
          type:
          - integer
          - 'null'
          description: ''
          format: int32
        results:
          type:
          - array
          - 'null'
          items:
            $ref: '#/components/schemas/Year'
          description: ''
        metadata:
          $ref: '#/components/schemas/Metadata'
        version:
          $ref: '#/components/schemas/Version'
      additionalProperties: false
      description: Lista lat / Years list
x-refined-from:
- stat-gov-pl-bdl-openapi.json
- stat-gov-pl-bdl-openapi.yml