Term Series
Per-date time series for a single n-gram term within one entity (country).
Returns counts, rank, and optionally top contributing Wikipedia articles for each date.
Fast path (~20-70ms): point lookups on precomputed sorted Parquet files for ~65K vocabulary terms.
Slow fallback (~3-5s): daily partition scan for arbitrary terms not in the precomputed vocabulary.
Set include_articles=false for sparkline-only responses (~20ms, no top_articles field).
Query Parameters
string requiredGlobal entity ID, e.g. 'wikidata:Q30'
string requiredThe n-gram term to look up, e.g. 'Trump'. Case-sensitive.
End date (YYYY-MM-DD). Defaults to latest available.
integer Number of days to look back from date. 0 = full history.
string Hive granularity: daily | weekly | monthly
integer N-gram size (1 = unigrams, 2 = bigrams)
boolean Include top_articles in response (set false for sparkline-only, ~2x faster)
string Registry dataset_id for the sparkline precomputed data (default: 'sparklines').
Response
stringThe n-gram term that was looked up (echoed back).
stringMost recent date with data for this entity (YYYY-MM-DD). Use this to default the date picker in the UI.
arrayTime series entries, one per date, sorted chronologically.
curl -X GET http://localhost:8000/wikimedia/term-series \