OPDS search
GET
/opds/v2/search
const url = 'http://localhost:8080/opds/v2/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/search?query=example' \ --header 'Authorization: Bearer <token>'Searches every library the user can read, as the API’s search does. The catalog links here with a search link templated as {?query}.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”query
required
string
What to search for, up to 200 characters.
cursor
string
Opaque cursor from the previous page’s nextCursor.
Responses
Section titled “Responses”An OPDS 2 publications feed of matches, best first.
Media typeapplication/opds+json
An OPDS 2 feed or publication, defined by the OPDS 2 schemas rather than here. Publication metadata follows the Readium Web Publication model.
object
metadata
object
links
Array<object>
object
Example generated
{ "metadata": {}, "links": [ {} ]}The request was malformed.
Media typeapplication/json
object
code
required
string
message
required
Explains the problem to a developer.
string
Example
{ "code": "bad_request"}No valid credentials. The Basic challenge and the Authentication for OPDS document both ask for a name and password.
Media typeapplication/opds-authentication+json
An Authentication for OPDS document offering HTTP Basic sign-in.
object
id
required
string format: uri
title
required
string
authentication
required
Array<object>
object
type
required
string
labels
object
login
string
password
string
Example
{ "authentication": [ { "type": "http://opds-spec.org/auth/basic" } ]}Headers
Section titled “Headers”WWW-Authenticate
string
Example
Basic realm="Chek", charset="UTF-8"Link
string
Example
<https://chek.example/opds/v2/auth>; rel="http://opds-spec.org/auth/document"; type="application/opds-authentication+json"The server failed; details are in its log.
Media typeapplication/json
object
code
required
string
message
required
Explains the problem to a developer.
string
Example
{ "code": "bad_request"}