Numeric fields use the sentinel -111 because the aggregation bucket can’t mix a string key like "unknown" into a numeric series. Treat any -111 (or -111.0) bucket key as “unknown.”
A work is counted in the unknown bucket when the underlying field is missing or empty. For fields nested inside an array — for example authorships.institutions.type — the work is also counted as unknown when the array is present but empty (e.g. an authorship with no institutions). If you reproduce group_by counts in code by iterating the JSON, treat empty lists the same way to match the API’s totals.
# Count work types for 2023 publicationshttps://api.openalex.org/works?filter=publication_year:2023&group_by=type# Count open access status for a specific authorhttps://api.openalex.org/works?filter=author.id:A5023888391&group_by=open_access.is_oa
A grouped response returns at most 200 groups per page. To page through more, use cursor paging: start with cursor=* and follow meta.next_cursor until it’s null, exactly as you would for a list of results.
# First page of groupshttps://api.openalex.org/works?group_by=authorships.author.id&per_page=200&cursor=*# Next page: use the next_cursor value from the previous responsehttps://api.openalex.org/works?group_by=authorships.author.id&per_page=200&cursor=<next_cursor>
Basic page-based paging (page=2, …) is not supported with group_by — use cursor paging. When paging through groups, results are sorted by key (not by count).