discovery

Search resources (bibs and items)

Changed on

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

get/v0.1/discovery/resources

Request

Query parameters

pageinteger

Page number to return

per_pageinteger

Number of results to return

sort'relevance' | 'title' | 'creator' | 'date'

Specify how to order results (relevance, title, creator, date)

sort_direction'asc' | 'desc'

Override the default direction for the current sort (asc, desc). Default depends on the field. (title defaults to asc, date defaults to desc, creator defaults to asc, relevance is fixed desc)

search_scope'all' | 'title' | 'journal_title' | 'contributor' | 'subject' | 'series' | 'callnumber' | 'standard_number'

Specify what (group of) fields to match against (all, title, contributor, subject, series, callnumber, standard_number). See https://github.com/NYPL/discovery-api/blob/main/lib/resources.js to review specific fields matched in each scope and how they're boosted.

filters[*]string

Specify a hash of filters to apply, where key is: 'format', 'buildingLocation', 'owner', 'subjectLiteral', 'holdingLocation', 'deliveryLocation', 'language', 'materialType', 'mediaType', 'carrierType', 'publisher', 'contributor', 'creator', 'contributorNameTitle', 'issuance', 'createdYear', 'dateAfter', or 'dateBefore'

contributorstring

Fuzzy match on contributor name

titlestring

Fuzzy match on title

subjectstring

Fuzzy match on subject

isbnstring

Match on ISBN

issnstring

Match on ISSN

lccnstring

Match on LCCN

oclcstring

Match on OCLC number

Response

An array of resources

@contextstring url

URL for JSONLD doc mapping short-hand property names to IRIs

@type'itemList'

Changes

    • warning

      deleted the query request parameter all_items

    • warning

      deleted the query request parameter items_from

    • warning

      deleted the query request parameter items_size

    • info

      added the new optional query request parameter all_items