Open Archives API » Stats/Breakdown

Returns record counts filtered by any combination of archive, source type, event type, place and year range, grouped by one chosen dimension. Useful for cross-tabulation questions such as "which archives hold prayer card collections?" or "how many marriages per year in Amsterdam?".

URL

https://api.openarchieven.nl/1.1/stats/breakdown.json

Method

GET

Input

NameRequiredDescriptionDefault
group_byYesDimension to aggregate on. One of: archive, sourcetype, eventtype, place, year.
archive_codeNoCode of archive (obtain a list of valid archive codes via Stats/Archives). Prefix with ! to negate (e.g. !saa excludes Stadsarchief Amsterdam).
sourcetypeNoSource type to filter on. Multiple source types can be combined with & (space-amp-space).
eventtypeNoNumeric value depicting the event type:
  • 0 - All types
  • 1 - Christening and birth records
  • 2 - Marriage records
  • 3 - Burial and death records
  • 6 - Notarial deeds
0
eventplaceNoExisting place name to filter on (exact match).
year_startNoStarting year of events to include (minimum=1500). Alias eventyearstart is also accepted.(unfiltered)
year_endNoEnding year of events to include (maximum=1960). Alias eventyearend is also accepted.(unfiltered)
min_countNoExclude groups with fewer records than this threshold.1
number_showNoMaximum number of groups returned (maximum=500).100
sortNoSort order of the returned groups: count_desc, count_asc, or name_asc (alphabetical by key).count_desc
langNoLanguage code (nl for Dutch, en for English, de for German, fr for French) for sourcetype and eventtype labels. Only nl and en are localised; de and fr fall back to nl.nl
callbackNoFunction name to be called on JSON data (JSONP).

Output

The output is a JSON object containing the chosen group_by dimension, an echo of the supplied filters, the total filtered record count, the total number of distinct groups (capped at 750) and an array of result rows.

Example: https://api.openarchieven.nl/1.1/stats/breakdown.json?group_by=archive&sourcetype=Bidprentjesverzameling outputs (pretty-printed):

{
    "group_by": "archive",
    "filters": {
        "sourcetype": "Bidprentjesverzameling"
    },
    "total_records": 2991005,
    "total_groups": 47,
    "results": [
        {
            "key": "hwh",
            "label": "Heemkundekring Weerderheem",
            "count": 201236
        },
        {
            "key": "bhi",
            "label": "Brabants Historisch Informatie Centrum",
            "count": 187543
        }
.....
    ]
}

Errors

One of the following errors may be thrown:

Error codeError message
1Invalid archive
4Invalid lang
23Value of number_show exceeds defined maximum
25Value of eventyearstart is below defined minimum
26Value of eventyearend exceeds defined maximum
28Invalid eventype
46Invalid group_by
47Missing required group_by
48Invalid sort
49Invalid min_count

An example error looks (pretty-printed) like:

{
    "error_code": 47,
    "error_description": "Missing required group_by"
}

Back to API documentation

Find your ancestors and publish your family tree on Genealogy Online via https://www.genealogieonline.nl/en/