Stats

Cross-tabulation aggregation grouped by one dimension

Returns record counts filtered by any combination of archive, source type, event type, event place and year range, grouped by ONE chosen dimension (archive, sourcetype, eventtype, place or year). Use this endpoint to answer questions such as "how many Bidprentjes per archive?" or "how many marriages per year in Amsterdam?". The response includes the total filtered record count, the total number of distinct groups (capped at 750) and the top-N groups according to the chosen sort.

get/stats/breakdown.json

Request

  • Base URL: https://api.openarchieven.nl/1.1
  • URL: https://api.openarchieven.nl/1.1/stats/breakdown.json
  • Auth: none declared

Query parameters

group_by'archive' | 'sourcetype' | 'eventtype' | 'place' | 'year' required

Dimension to aggregate on.

archive_codestring

Archive code to filter on. Prefix with ! to negate (e.g. !saa excludes Stadsarchief Amsterdam).

sourcetypestring

Source type to filter on. Multiple source types can be combined with & (space, ampersand, space), matching the convention of /records/search.json.

eventtype0 | 1 | 2 | 3 | 6

Event type filter. 0=all, 1=Birth/Christening, 2=Marriage, 3=Death/Burial, 6=Notarial deeds (matches the mapping used by /stats/familynames.json).

eventplacestring

Event place to filter on (exact match).

year_startinteger

Starting year of events to include. Minimum 1500. Alias eventyearstart is also accepted.

year_endinteger

Ending year of events to include. Maximum 1960. Alias eventyearend is also accepted.

min_countinteger

Exclude groups with fewer records than this threshold.

number_showinteger

Maximum number of groups returned. Maximum is 500.

sort'count_desc' | 'count_asc' | 'name_asc'

Order of the returned groups. count_desc (default) and count_asc sort by count; name_asc sorts alphabetically by key (raw facet value).

lang'nl' | 'en' | 'de' | 'fr'

Language for human-readable labels (sourcetype and eventtype groups only). Only nl and en produce localised labels; de and fr are accepted but currently fall back to Dutch.

callbackstring

JavaScript function name for JSONP callback.

Response

Cross-tabulation breakdown.

group_by'archive' | 'sourcetype' | 'eventtype' | 'place' | 'year' required

Dimension on which the results are grouped.

filtersobject

Echoes the filter parameters supplied by the caller. Only filters actually present in the request are echoed; defaults are not.

total_recordsinteger required

Total number of records matching the supplied filters.

total_groupsinteger required

Total distinct groups matching min_count. Capped at 750 (the SOLR_FACET_MAX limit). When this equals 750 the true number of groups may be higher.

Example response

{
  "total_records": 2991005,
  "total_groups": 47,
  "results": [
    {
      "key": "hwh",
      "label": "Heemkundekring Weerderheem",
      "count": 201236
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.