Storywrangler
Navigation

Top Ngrams

get /storywrangler/top-ngrams

Top types by count for any registered types-counts dataset.

The generic form of the per-domain /{domain}/top-ngrams endpoints: the dataset is selected by query params and filter dimensions are passed by their registered column names — ?ngram_size=1&granularity=daily for wikimedia, ?n=1&lang=en for reddit, ?sex=M for babynames. Discover them via GET /registry/{domain}/{dataset_id}; missing partition dims get the dataset's registered defaults.

With dates2, returns two systems keyed by date range for a temporal comparison (same shape as the per-domain endpoints). mongodb pass-through datasets accept single dates only.

Query Parameters

domain string

Domain owning the dataset

dataset string

Dataset ID within the domain

dates

Date/year range for system 1. Single value '2024-10-01' or range '2024-10-01,2024-10-31'. Omit to load all time (datasets without a time dimension take no dates; mongodb datasets require a single date).

dates2

Optional second range for a temporal comparison.

entity

Global entity ID (e.g. 'wikidata:Q30') or local ID. Omit for datasets without entity_mapping.

weight

Count measure — one of the dataset's endpoint_schema.count_column entries. Defaults to the first registered measure.

limit integer

Max types per system (0 = no limit). manifest.availability's types gives the vocabulary ceiling.

Available Datasets

Pass these as additional query parameters using the actual column names from each dataset.

babynames/ngrams

Baby names by popularity, year, and location with entity mappings

No filter dimensions.

bluesky/ngrams

Date-first ngram distributions for Bluesky — all count measures per (ngram, date), by language and ngram size, bundled one ISO week per file under year/month for single-date distribution and rank-divergence queries. Includes repost/quote attention-weighted measures (count_all). Companion to the hash-bucketed bluesky/sparklines per-term time series.

n default: 1 · 1, 2
lang default: en · af, als, am, an, ar …and 171 more
reddit/ngrams

Reddit ngrams

n default: 1 · 1, 2
lang default: af · af, als, am, an, ar …and 162 more
twitter/ngrams

Storywrangler Twitter n-grams (1/2/3-grams across 169 languages), served from MongoDB. One document per (word, day) with with-RT and no-RT counts, ranks, and frequencies.

No filter dimensions.

vt-zoning-atlas/ngrams

Vermont zoning bylaw word frequencies by town.

No filter dimensions.

wikimedia/ngrams

Wikipedia n-grams by frequency, date, and location with entity mappings and ranks

ngram_size default: 1 · 1, 2
granularity default: daily · daily, monthly, weekly

Response

data array

Type/count entries sorted by count descending. With dates2, replaced by two arrays keyed by each date range (e.g. '2024-10-01_2024-10-07').

metadata object

Request metadata echoed back

curl -X GET https://api.storywrangler.uvm.edu/storywrangler/top-ngrams \