Search resources (bibs and items)
Changed onMatch 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'.
Request
- Base URLhttps://platform.nypl.org/api
- Authnone declared
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Query parameters
Terms to match (and/or structured ES "Query String Query" https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html#query-string-syntax )
Page number to return
Number of results to return
Specify how to order results (relevance, title, creator, date)
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)
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.
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'
Fuzzy match on contributor name
Fuzzy match on title
Fuzzy match on subject
Match on ISBN
Match on ISSN
Match on LCCN
Match on OCLC number
Response
An array of resources
Changes
- warning
deleted the
queryrequest parameterall_items - warning
deleted the
queryrequest parameteritems_from - warning
deleted the
queryrequest parameteritems_size
- warning
- info
added the new optional
queryrequest parameterall_items
- info