DPLA — Get Top Facets
dpla.archives.facetsGet top facet counts (subjects, providers/institutions, media types, US states) across the entire DPLA collection or scoped to a search query. Useful for discovering what subject areas, contributing libraries, or media types dominate a given topic. Returns ranked term lists with counts for four dimensions: subject, provider, type, and state.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| q | No | Optional query to scope the facets (e.g. "civil war" returns top subjects/providers/types within that query). Omit for global top facets. | |
| facet_size | No | Number of top terms to return per facet dimension, 1–50 (default: 10) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | Present only when the call failed. Includes error code, message, request_id, and any provider-specific extras. | |
| result | No | Tool response payload. Shape varies per tool — consult the tool description and inputSchema. May be an object, array, string, or number depending on the upstream provider response. |