# Data API and usage examples

Using the data

Use the same data as the website in your spreadsheets, research and AI tools. Public JSON and CSV files need no registration or API key.

[Open JSON catalogue](https://www.gimstamumas.lt/duomenys/katalogas.json)
[All data files](https://www.gimstamumas.lt/en/data/)

## Start here

[`/duomenys/katalogas.json`](https://www.gimstamumas.lt/duomenys/katalogas.json)
:   Indicators and 60 municipalities: units, coverage, sources and download URLs.

[`/duomenys/gimimai.json`](https://www.gimstamumas.lt/duomenys/gimimai.json)
:   Birth history, including the publisher's observation statuses.

[`/duomenys/gimimai.csv`](https://www.gimstamumas.lt/duomenys/gimimai.csv)
:   The same birth history as CSV.

[`/data-version.json`](https://www.gimstamumas.lt/data-version.json)
:   Published version and per-indicator fingerprints.

[`/duomenys/schema-v1.json`](https://www.gimstamumas.lt/duomenys/schema-v1.json)
:   JSON format schema, version 1.

## Read the latest birth observation

### JavaScript

```
const response = await fetch('https://www.gimstamumas.lt/duomenys/gimimai.json');
if (!response.ok) throw new Error(`HTTP ${response.status}`);
const data = await response.json();
const series = data.series[data.defaultVariant];
const [period, value, status = 'unspecified'] = series.obs.at(-1);
console.log({ period, value, unit: data.unit.en, status,
  source: series.sourceUrl, version: data.contentSha256 });
```

### curl

```
curl --fail --show-error 'https://www.gimstamumas.lt/duomenys/katalogas.json' -o katalogas.json
curl --fail --show-error 'https://www.gimstamumas.lt/duomenys/gimimai.json' -o gimimai.json
```

## How to read the fields

`series[defaultVariant].obs`
:   Row: [period, value, optional status]. Oldest first. The empty string is a valid variant key.

`frequency / period`
:   D: 2026-10-30; M: 2026M09; Q: 2026K3; A: 2025. Format examples, not claims about the latest data.

`unit / methodology`
:   Keep the unit and scale: EUR million is not EUR. published, computed and estimate distinguish the method; derivedFrom names input indicators.

`status`
:   preliminary, revised, final and estimate preserve the publisher's status. An absent status is unspecified, not final. Missing periods are not zeros.

`source.updatedAt / checkedAt / builtAt`
:   Source update, successful data check and site build are different dates. An unknown source date is null (series.updated is an empty string).

`stale / availability`
:   stale=true means a retained earlier response. availability=licensed or unavailable has no data download; see the source linked from the indicator page.

CSV is UTF-8 with comma separators and decimal points. Leading # rows contain metadata; indicator data starts at period,variant,value,status. Municipal CSV uses indicator,period,value,unit,status,source. Use JSON when you need one documented structured format.

## Versions and revisions

We check daily; publishers determine the data release frequency. Check data-version.json first: an unchanged sha256 identifies an unchanged data publication. Each JSON contentSha256 covers values, statuses and public metadata, including revisions to older periods. Check/build/source-update dates alone do not change it. A changed hash does not imply the publisher marked an observation revised. Files contain the current version; keep your own snapshots for historical vintages. A daily check is usually sufficient; avoid fetching all files every minute.

The catalogue also links to JSON and CSV for every municipality. Indicator variants can have different coverage; check each coverage field.

Schema version 1 may gain optional fields; consumers should ignore unknown fields. Changes to existing field meanings or structures require a new schemaVersion.

## Sources and citation

Cite the original publisher, indicator, period, unit, status and exact source query. Include the gimstamumas.lt page and version used so the result can be reproduced. Source terms differ; key-free access does not create a new blanket licence.

[Data updates](https://www.gimstamumas.lt/en/updates/) · [llms.txt](https://www.gimstamumas.lt/llms.txt)

Page · <https://www.gimstamumas.lt/en/data/api/>
