Ridgital ARMID Explorer API

The ARMID data API gives read-only access to Armenia In Data: tens of thousands of time series on Armenia - economy, trade, agriculture, finance, climate, energy, population and more - organized in ARMID's own category tree. Browse the categories, list the time series in one, and download any series' observations as JSON, CSV or GeoJSON - or read the same data through the standard SDMX 2.1 API, with any SDMX client. It is the same data the Data tab of ARMID Explorer shows.

Getting Started

An API key works for as long as your organization's ARMID Explorer access is active. When the access expires, requests return 403 until it is extended.

Authentication

Authorization: Bearer rdg_<your_api_key>
StatuscodeMeaning
401authentication_requiredNo Authorization: Bearer header was sent.
401missing_api_key, invalid_api_key, api_key_disabled, api_key_revoked, api_key_expiredThe key is empty or not usable.
403armid_access_requiredYour organization has no ARMID Explorer access.
403armid_access_expiredYour organization's ARMID Explorer access has ended.
403armid_section_not_grantedYour access does not include the Data section.

Base URL

https://ridgital.com/api/v1/armid/data

Quick start

# 1. The category tree
curl -H "Authorization: Bearer $KEY" https://ridgital.com/api/v1/armid/data/categories

# 2. Find a category
curl -H "Authorization: Bearer $KEY" "https://ridgital.com/api/v1/armid/data/categories/search?q=inflation"

# 3. The time series in it
curl -H "Authorization: Bearer $KEY" "https://ridgital.com/api/v1/armid/data/categories/{id}/series?pageSize=50"

# 4. A series' observations, as CSV ({id} is the series key from step 3, e.g. M.AM.IHB2Q7K3MZ4XA)
curl -H "Authorization: Bearer $KEY" "https://ridgital.com/api/v1/armid/data/series/{id}/observations?limit=all&format=csv" -o series.csv

Conventions

SDMX

Every category with data is also an SDMX dataflow, so any SDMX 2.1 client - sdmx1/pandasdmx in Python, rsdmx in R, .Stat, the SDMX Excel add-ins - can browse and download ARMID. The base URL is https://ridgital.com/api/v1/armid/sdmx, with the same API key.

QueryReturns
GET /dataflowEvery dataflow: DF_ and the category, e.g. DF_FOOD_MARKET_PRICES.
GET /categoryscheme/RIDGITAL/ARMID_TOPICS/latest?references=parentsandsiblingsThe category tree, with each dataflow filed under its category.
GET /datastructure/RIDGITAL/DSD_ARMID/latest?references=childrenThe data structure, its concepts and codelists (CL_FREQ, CL_AREA).
GET /data/DF_FOOD_MARKET_PRICES/M.AM...?startPeriod=2024-01Observations.

Structures are SDMX-ML 2.1. Data is SDMX-ML 2.1 Generic by default; add format=jsondata for SDMX-JSON 1.0 or format=csvdata for SDMX-CSV 1.0 (or send the matching Accept header).

Series key: FREQ.REF_AREA.INDICATOR.BREAKDOWN.MEASURE. The first three are the series key of the data API. BREAKDOWN tells apart the values a series breaks down by sex, age, partner country and so on (_Z when it does not; the series attribute BREAKDOWN_LABEL says what a code stands for) - for located events such as fire detections, each location is its own breakdown, so simultaneous events at different places all come through, and MEASURE the several values some series record per date, such as daily climate variables (_Z for the series' own value). Leave a dimension empty for every value, join several with +, or use all for the whole dataflow.

Parameters: startPeriod/endPeriod (2024, 2024-S1, 2024-Q1, 2024-01, 2024-01-15), firstNObservations/lastNObservations, and detail (full, dataonly, serieskeysonly, nodata). A response holds at most 200,000 observations; a larger query answers 413 - narrow the key or the period.

Frequencies (CL_FREQ): A annual, S half-yearly, Q quarterly, M monthly, W weekly, D10 dekadal, D daily, H hourly, I irregular (events such as earthquakes, with the time of day in TIME_PERIOD), U undetermined.

import io, pandas as pd, requests

r = requests.get(
    "https://ridgital.com/api/v1/armid/sdmx/data/DF_FOOD_MARKET_PRICES/M.AM...",
    params={"format": "csvdata", "startPeriod": "2024-01"},
    headers={"Authorization": "Bearer rdg_<your_api_key>"},
)
df = pd.read_csv(io.StringIO(r.text))  # one row per observation

Categories

ARMID's category tree, category search and one category.

Category tree

GET /api/v1/armid/data/categories

Every category with data, top-level categories first, each with its subcategories. seriesCount counts the time series with data in a category and everything under it, each series once.

Search categories

GET /api/v1/armid/data/categories/search

Categories whose name contains every word of q (case-insensitive), each with its path from the top-level category.

  • q (query, required): Search words, at least 2 characters

One category

GET /api/v1/armid/data/categories/{id}

A category with its path from the top-level category and the categories directly under it.

  • id (path, required): Category id

Time series

The time series in a category, and one series' description and newest value.

Time series in a category

GET /api/v1/armid/data/categories/{id}/series

The time series with data in a category and every category under it, by name. q narrows them to names containing every word of it.

  • id (path, required): Category id
  • q (query): Search words
  • page (query): Page, from 1
  • pageSize (query): Series per page, ≤ 100

One time series

GET /api/v1/armid/data/series/{id}

A time series' description, its newest value and the categories it belongs to.

  • id (path, required): Series key

Observations

A time series' values as JSON, CSV or GeoJSON.

Observations of a time series

GET /api/v1/armid/data/series/{id}/observations

The newest observations of a series (1,000 by default, limit=all for every one, at most 200,000), returned oldest first. format=csv returns a CSV file with one column per dimension and metric; format=geojson returns a GeoJSON FeatureCollection of the observations that have a location. Every format carries X-Total-Count (observations matching start/end), X-Returned-Count and X-Truncated (true when the limit cut the answer short) headers; JSON also has them in the body.

  • id (path, required): Series key
  • limit (query): How many of the newest observations: a number or all
  • start (query): Earliest date, YYYY-MM-DD or RFC 3339
  • end (query): Latest date, YYYY-MM-DD or RFC 3339
  • format (query): json, csv or geojson

SDMX structures

The same data as SDMX 2.1: dataflows, data structure, codelists, concepts and the category scheme, in SDMX-ML.

SDMX structure

GET /api/v1/armid/sdmx/{resource}/{agencyID}/{resourceID}/{version}

An SDMX 2.1 structure query, answered in SDMX-ML 2.1: dataflow, datastructure, codelist, conceptscheme, categoryscheme or categorisation. agencyID is RIDGITAL or all, resourceID an id or all, version 1.0, latest or all. references=children (or descendants/all) adds what a dataflow or data structure uses; references=parentsandsiblings on a category scheme adds the categorisations and dataflows filed under it.

  • resource (path, required): dataflow, datastructure, codelist, conceptscheme, categoryscheme or categorisation
  • agencyID (path, required): RIDGITAL or all
  • resourceID (path, required): An id or all
  • version (path, required): 1.0, latest or all
  • references (query): none, children, descendants, parentsandsiblings or all

SDMX data

Observations of a dataflow as SDMX-ML Generic, SDMX-JSON or SDMX-CSV.

SDMX data

GET /api/v1/armid/sdmx/data/{flowRef}/{key}

An SDMX 2.1 data query on one dataflow. key is FREQ.REF_AREA. INDICATOR.BREAKDOWN.MEASURE: leave a dimension empty for every value, join several with +, or use all. The response is SDMX-ML 2.1 Generic data by default; format=jsondata or format=csvdata (or the matching Accept header) return SDMX-JSON 1.0 or SDMX-CSV 1.0. At most 200,000 observations per response.

  • flowRef (path, required): Dataflow: DF_ID, RIDGITAL,DF_ID or RIDGITAL,DF_ID,1.0
  • key (path, required): Series key, or all
  • startPeriod (query): Earliest period: 2020, 2020-S1, 2020-Q1, 2020-01 or 2020-01-15
  • endPeriod (query): Latest period, same forms
  • firstNObservations (query): Only the first n observations of each series
  • lastNObservations (query): Only the last n observations of each series
  • detail (query): full, dataonly, serieskeysonly or nodata
  • format (query): genericdata, jsondata or csvdata