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
- Request ARMID Explorer access. The data API needs the Data section in your access, which runs until a set date.
- Sign in to the Ridgital dashboard and create an API key under Account → API Keys (members with the editor or admin role can create keys).
- Send the key with every request.
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>
| Status | code | Meaning |
| 401 | authentication_required | No Authorization: Bearer header was sent. |
| 401 | missing_api_key, invalid_api_key, api_key_disabled, api_key_revoked, api_key_expired | The key is empty or not usable. |
| 403 | armid_access_required | Your organization has no ARMID Explorer access. |
| 403 | armid_access_expired | Your organization's ARMID Explorer access has ended. |
| 403 | armid_section_not_granted | Your 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
- Series keys: a time series'
idis its key,FREQ.REF_AREA.INDICATOR(e.g.M.AM.IHB2Q7K3MZ4XA: monthly, Armenia, one indicator). A key never changes and is never reused, so it is safe to store. It is also the first part of the series' key in the SDMX API. - Categories form a tree: top-level categories, each with subcategories. A category's time series include those of every category under it, and a series can sit in more than one category.
- Lists are paged:
page(from 1) andpageSize(up to 100). A page is{"items": [...], "page", "pageSize", "totalItems", "totalPages"}. - Dates are UTC, RFC 3339. Each observation also has a
periodwritten for the series' frequency:2024(annual),2024-H1,2024-Q1,2024-03(monthly),2024-03-15(daily, weekly, dekadal), or for other frequencies the date, with the time of day when it has one. - Frequency is one of
hourly,daily,weekly,dekadal(10-day),monthly,quarterly,semiannual,annual,irregular(e.g. events such as earthquakes) orunknown(too few observations to tell). - Observations are returned oldest first. By default you get the newest 1,000; pass
limit(a number, orallfor up to 200,000) andstart/endto choose.truncatedtells you whether older ones were left out; every format, CSV and GeoJSON included, also sends it as theX-Truncatedheader, withX-Total-Count(observations in the chosen period) andX-Returned-Count. When a file is truncated, narrowstart/endand fetch the rest in parts. - Values:
valueis a number (nullwhen the observation only has a text or metrics).dimensionstell apart several observations of the same date (a breakdown by sex, age, partner country, …);metricsare several named values recorded together;locationis a GeoJSON point for observations that have their own place. - Formats:
format=json(default),format=csv(one column per dimension and metric) orformat=geojson(a FeatureCollection of the observations that have a location). - Errors are
{"error": "message", "code": "machine_readable_code"}.
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.
| Query | Returns |
GET /dataflow | Every dataflow: DF_ and the category, e.g. DF_FOOD_MARKET_PRICES. |
GET /categoryscheme/RIDGITAL/ARMID_TOPICS/latest?references=parentsandsiblings | The category tree, with each dataflow filed under its category. |
GET /datastructure/RIDGITAL/DSD_ARMID/latest?references=children | The data structure, its concepts and codelists (CL_FREQ, CL_AREA). |
GET /data/DF_FOOD_MARKET_PRICES/M.AM...?startPeriod=2024-01 | Observations. |
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 idq(query): Search wordspage(query): Page, from 1pageSize(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 keylimit(query): How many of the newest observations: a number or allstart(query): Earliest date, YYYY-MM-DD or RFC 3339end(query): Latest date, YYYY-MM-DD or RFC 3339format(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 categorisationagencyID(path, required): RIDGITAL or allresourceID(path, required): An id or allversion(path, required): 1.0, latest or allreferences(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.0key(path, required): Series key, or allstartPeriod(query): Earliest period: 2020, 2020-S1, 2020-Q1, 2020-01 or 2020-01-15endPeriod(query): Latest period, same formsfirstNObservations(query): Only the first n observations of each serieslastNObservations(query): Only the last n observations of each seriesdetail(query): full, dataonly, serieskeysonly or nodataformat(query): genericdata, jsondata or csvdata