---
title: "Search resources (bibs and items)"
method: GET
path: "/v0.1/discovery/resources"
tags: ["discovery"]
---

# Search resources (bibs and items)

`GET /v0.1/discovery/resources`

## Request

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

Match by keyword
> `/resources?q=war peace`

Filters are applied using a `filters` param that expects this syntax on the query string:

> `/resources?filters[property1]=value1&filters[property2]=value2`

Where `property*` is one of: 

> 'owner', 'buildingLocation', 'subjectLiteral', 'holdingLocation', 'deliveryLocation', 'language', 'materialType', 'mediaType', 'carrierType', 'publisher', 'contributor', 'creator', 'issuance', 'createdYear', 'dateAfter', or 'dateBefore'.

See [the app README for more examples](https://github.com/NYPL/discovery-api/blob/main/README.md)

## Query parameters

- `q` string
- `page` integer
- `per_page` integer
- `sort` 'relevance' | 'title' | 'creator' | 'date'
- `sort_direction` 'asc' | 'desc'
- `search_scope` 'all' | 'title' | 'journal_title' | 'contributor' | 'subject' | 'series' | 'callnumber' | 'standard_number'
- `filters[*]` string
- `contributor` string
- `title` string
- `subject` string
- `isbn` string
- `issn` string
- `lccn` string
- `oclc` string

## Response `200`

An array of resources

- ResourcesResponse
  - `@context` string, url: URL for JSONLD doc mapping short-hand property names to IRIs
  - `@type` 'itemList'
  - `itemListElement` ResourceResult[]
    - `@type` 'searchResult'
    - `result` Resource
      - `@type` string[]: RDF type(s), e.g. "nypl:Item", "nypl:Resource"
      - `@id` string: ID, e.g. "res:105173159"
      - `carrierType` EntityStub[]
        - `@type` string
        - `@id` string
        - `prefLabel` string: Friendly label for this entity
      - `creatorLiteral` string[]: Creator literals
      - `contributorLiteral` string[]: Contributor literals
      - `created` string: Raw, unparsed date string
      - `createdYear` integer: Year of creation
      - `dateStartYear` integer: Start of relevant year range
      - `depiction` string: URL of an image for the resource
      - `description` string: Description of resource
      - `endYear` integer: Ending year of coverage
      - `extent` string[]: Extent (e.g. page count)
      - `holdingCount` integer: Rough number of copies across institutions
      - `issuance` EntityStub[]: Issuance
        - `@type` string
        - `@id` string
        - `prefLabel` string: Friendly label for this entity
      - `items` Item[]: Array of items attached to this bib
        - `@id` string
        - `accessMessage` EntityStub[]: OPAC Access Message
          - `@type` string
          - `@id` string
          - `prefLabel` string: Friendly label for this entity
        - `deliveryLocation` EntityStub[]: Delivery locations
          - `@type` string
          - `@id` string
          - `prefLabel` string: Friendly label for this entity
        - `eddRequestable` boolean: Boolean indicating whether or not item is available for Electronic Document Delivery.
        - `holdingLocation` EntityStub[]: Delivery locations
          - `@type` string
          - `@id` string
          - `prefLabel` string: Friendly label for this entity
        - `idBarcode` string
        - `identifier` string[]: Array of identifiers (e.g. urn:barcode:33433058873765)
        - `owner` EntityStub[]: Owning institution
          - `@type` string
          - `@id` string
          - `prefLabel` string: Friendly label for this entity
        - `physRequestable` boolean: Indiates whether an item is available for a physical hold request
        - `requestable` boolean[]: Boolean indicating whether or not a hold request may be placed on this item based on its status, location, and other concerns.
        - `shelfMark` string[]: Callnumber(s)
        - `specRequestable` boolean: Indicates if an item is requestable through the Aeon interface
        - `status` EntityStub[]: Availability status
          - `@type` string
          - `@id` string
          - `prefLabel` string: Friendly label for this entity
        - `uri` string: Internal identifier for resource
      - `^id` string: Various identifiers given as 'idAcqnum', 'idBarcode', 'idBnum', 'idCallNum', 'idCatnyp', 'idDcc', 'idExhib', 'idHathi', 'idIsbn', 'idIssn', 'idLcc', 'idLccCoarse', 'idMmmsDb', 'idMss', 'idObjNum', 'idOclc', 'idOwi', 'idRlin', 'idUuid'
      - `language` EntityStub[]: Language(s), if known
        - `@type` string
        - `@id` string
        - `prefLabel` string: Friendly label for this entity
      - `materialType` EntityStub[]
        - `@type` string
        - `@id` string
        - `prefLabel` string: Friendly label for this entity
      - `mediaType` EntityStub[]
        - `@type` string
        - `@id` string
        - `prefLabel` string: Friendly label for this entity
      - `note` object[]: Note fields
        - `@type` 'bf:Note'
        - `noteType` string: One of roughly 47 categories of notes (e.g. General Note, Dissertation Note, Data Quality Note., etc.)
        - `label` string: The actual content of the note
      - `numAvailable` integer: Number of items available
      - `placeOfPublication` string[]
      - `prefLabel` string[]: Best title(s)
      - `roles:ROLE` string[]: Contributor literals by ROLE
      - `startYear` integer: Beggining year of coverage
      - `subject` EntityStub[]
        - `@type` string
        - `@id` string
        - `prefLabel` string: Friendly label for this entity
      - `suppressed` boolean: Indicates whether or not resource should be suppressed from view
      - `title` string[]: Title(s)
      - `titleDisplay` string[]: Display title(s)
      - `type` string[]
      - `uri` string: Internal identifier for resource

## Other responses

- `default`: Unexpected error

## Changes

- **2024-10-17** `d9169b76462d`: 3 warning
  - deleted the `query` request parameter `all_items`
  - deleted the `query` request parameter `items_from`
  - deleted the `query` request parameter `items_size`
- **2024-09-11** `0a0eb6461cd7`: 1 info
  - added the new optional `query` request parameter `all_items`

[Operation history](https://skmtc.dev/nypl/apis/discovery-api/changes/v0.1/discovery/resources/get.md)

---

[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)
