OPDS search in a library
const url = 'http://localhost:8080/opds/v2/libraries/1/search?query=example';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'http://localhost:8080/opds/v2/libraries/1/search?query=example' \ --header 'Authorization: Bearer <token>'Searches one library. The library’s feed links here with a search link templated as {?query}.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Query Parameters
Section titled “Query Parameters”What to search for, up to 200 characters.
Opaque cursor from the previous page’s nextCursor.
Responses
Section titled “Responses”An OPDS 2 publications feed of matches, best first.
An OPDS 2 feed or publication, defined by the OPDS 2 schemas rather than here. Publication metadata follows the Readium Web Publication model.
object
object
object
Example generated
{ "metadata": {}, "links": [ {} ]}The request was malformed.
object
Explains the problem to a developer.
Example
{ "code": "bad_request"}No valid credentials. The Basic challenge and the Authentication for OPDS document both ask for a name and password.
An Authentication for OPDS document offering HTTP Basic sign-in.
object
object
object
Example
{ "authentication": [ { "type": "http://opds-spec.org/auth/basic" } ]}Headers
Section titled “Headers”Example
Basic realm="Chek", charset="UTF-8"Example
<https://chek.example/opds/v2/auth>; rel="http://opds-spec.org/auth/document"; type="application/opds-authentication+json"The resource does not exist.
object
Explains the problem to a developer.
Example
{ "code": "bad_request"}The server failed; details are in its log.
object
Explains the problem to a developer.
Example
{ "code": "bad_request"}