Documentation / Endpoints
Getting started
Reference
Endpoints
Meta
Two free inventory endpoints: how current each provider is and what it is licensed under, and how much data exists for each country.
Neither takes a parameter and neither needs a key. Both are small enough to fetch once and cache for the life of a process.
GET /v1/meta/freshness
/v1/meta/freshness- Auth
- Optional — anonymous callers are IP rate-limited
- Cost
- free
- Returns
- One row per enabled provider
- Order
- By provider_id, ascending
- Parameters
- None
Base https://api.worldgovdata.com/v1
The provenance endpoint. For every provider we serve: its licence, its attribution string, how often we re-ingest it, when that last succeeded, and how recent the data itself is.
Request
curl -sS "https://api.worldgovdata.com/v1/meta/freshness"Response · 200
Fields
| Field | Type | Notes |
|---|---|---|
| provider_id | string | The prefix of every indicator id from this provider. |
| name | string | Display name of the provider. |
| licence | string | The licence its data is served under. |
| attribution | string | The credit line to publish. |
| cadence | string | null | How often we re-ingest it — e.g. “monthly”, “annual”. |
| upstream | array | Origins this provider is itself built on. Always an array; may be empty. |
| last_ok_finished_at | timestamp | null | When our last successful load of it finished. |
| last_ok_rows | integer | null | How many rows that load wrote. |
| latest_data_year | integer | null | The newest year this provider has actually measured. |
Two different kinds of recent
These are easy to conflate and they answer different questions.
last_ok_finished_at— when we last pulled successfully. A pipeline fact. If this is old, our copy may be behind the provider’s.latest_data_year— the newest year the provider has actually measured. A data fact. A daily pipeline can still be three years behind the world, because that is how official statistics work.
The upstream array
Several of our providers are aggregators, composites or models: they are built on other institutions’ data. upstream records that lineage — the sources of the sources.
One upstream origin
- Always an array — never null. A provider whose lineage has not been recorded returns
[]. - Primary collectors — the institutions that are the origin — carry a single marker entry rather than a list.
- Curated conservatively: only lineages the provider’s own documentation supports. An absent origin means unrecorded, not disproven.
What to use it for
- Building an attribution table once, rather than per indicator.
- Deciding when to re-pull. Compare
last_ok_finished_atwith your own last sync and skip providers that have not moved — every request you do not make is free. - Setting expectations in your own UI. “Latest available: 2023” is a far better answer than a chart that silently stops.
- Enumerating provider ids for
/v1/indicators?provider=….
GET /v1/meta/coverage
/v1/meta/coverage- Auth
- Optional — anonymous callers are IP rate-limited
- Cost
- free
- Returns
- One row per country
- Order
- By iso3, ascending
- Parameters
- None
Base https://api.worldgovdata.com/v1
The per-country inventory: how many observations and how many distinct indicators exist for each country, and the span of years they cover. This is the honest answer to “how much do you actually have on X”.
Request
curl -sS "https://api.worldgovdata.com/v1/meta/coverage"Response · 200
Fields
| Field | Type | Notes |
|---|---|---|
| iso3 | string | ISO 3166-1 alpha-3 country code. |
| name | string | Common English name. |
| n_observations | integer | Total observation rows held for the country. |
| n_indicators | integer | Distinct indicators with at least one value for it. |
| yr_min | integer | null | Earliest year we hold anything for it. |
| yr_max | integer | null | Latest year we hold anything for it. |
Notes
- Counts are wide, not deep.
n_indicatorscounts indicators with at least one value — it says nothing about how many years each covers. yr_minandyr_maxspan everything. They are the outer bounds across all indicators for that country, so they describe a hull rather than any one series. Use an indicator’s owncoveragefor a series-level answer.- Coverage varies enormously. A large economy may hold ten times what a small territory does. Design for the sparse end.
- Not a rate-limit exemption. Free means no credits; requests still count against your rate limit. Fetch it once.
Related
- Licensing — what the licence and attribution fields oblige you to do.
- Sources — the same lineage, rendered.
- /v1/indicators — per-series coverage, which is the finer-grained answer.