---
title: "Get a specific resources aggregation"
method: GET
path: "/v0.1/discovery/resources/aggregation/{id}"
tags: ["discovery"]
---

# Get a specific resources aggregation

`GET /v0.1/discovery/resources/aggregation/{id}`

## Request

- Base URL: `https://platform.nypl.org/api`
- URL: `https://platform.nypl.org/api/v0.1/discovery/resources/aggregation/{id}`
- Auth: none declared
- TypeScript: <https://skmtc.dev/nypl/apis/discovery-api/docs/v0.1/discovery/resources/aggregation/:id/get.ts> (a function with typed inputs; its response is checked against the schema)

Fetch a specific resources search aggregation. This provides ability to consume the long tail of values for a given aggregation.

## Path parameters

- `id` string, required

## Query parameters

- `q` string
- `page` integer
- `per_page` integer
- `search_scope` 'all' | 'title' | 'contributor' | 'subject' | 'series' | 'callnumber'

## Response `200`

An array of resources search aggregations

- ResourceAggregationResponse
  - `@context` string, url: URL for JSONLD doc mapping short-hand property names to IRIs
  - `@type` 'itemListElement'
  - `item` Aggregation
    - `@type` 'nypl:Aggregation'
    - `@id` string: Identifies field being aggregated
    - `field` string: Identifies field being aggregated
    - `values` AggregationValue[]
      - `value` string: term aggregated
      - `count` integer: number of records matching term

## Other responses

- `default`: Unexpected error

---

[API](https://skmtc.dev/nypl/apis/discovery-api.md) - [All operations](https://skmtc.dev/nypl/apis/discovery-api/llms.txt) - [OpenAPI document](https://skmtc.dev/nypl/apis/discovery-api/revisions/fdf39728bf28?raw)
