Term Series Batch
Batch time series lookup for multiple terms in a single request.
Returns a map of term → time series. Ideal for fetching sparklines for all terms in an RTD wordshift comparison at once.
Fast path (~20-200ms): point lookups on precomputed sorted Parquet files.
Slow fallback (~3-5s per missing term): daily partition scan for terms not in the precomputed vocabulary.
Set include_articles=false for sparkline-only responses (~2x faster).
Use articles_dates to restrict top_articles to specific dates (e.g. the two allotax comparison dates).
Query Parameters
string requiredGlobal entity ID, e.g. 'wikidata:Q30'
string requiredComma-separated n-gram terms, e.g. 'Trump,COVID,the'. 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)
Comma-separated dates to fetch articles for (e.g. '2025-06-05,2026-01-21'). When set, top_articles are only included for these dates instead of the full window. Sparkline data is unaffected.
string Registry dataset_id for the sparkline precomputed data (default: 'sparklines').
Response
objectMap of term → time series. Keys are the requested terms (in request order). Each value is an array of date entries identical to the /term-series series format.
stringMost recent date with data for this entity.
curl -X GET http://localhost:8000/wikimedia/term-series/batch \