library-rpc
Full-text search over book titles and ISBNs.
RPC
books.searchReturns books whose title or ISBN contains "query" (case-insensitive). An empty or missing query returns no results. Unlike books.list, this method is not paginated and has no other filters — it is meant for quick free-text lookups such as a search box.
Servers
•
mock: https://mock.api.selfdochub.com/rpcParameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| query | params | string | Free-text search term matched against title and ISBN. |
Responses
result Books matching the search term (possibly empty).
application/json
| Field | Type | Required | Description |
|---|---|---|---|
| books | array of object | yes | |
| authorId | string | yes | The id of the Author who wrote this book. |
| createdAt | string (date-time) | yes | When the book record was created. |
| id | string | yes | Unique identifier assigned by the server, prefixed with bk_. |
| isbn | string | yes | The book's ISBN. Must be unique across the catalog. |
| publishedYear | integer | yes | The year the book was first published. Must be between 1450 and next year. |
| status | string | yes | A book's availability. "borrowed" means it is out on an open loan. Allowed values: available, borrowed |
| title | string | yes | The book's display title, 1-200 characters. |
| updatedAt | string (date-time) | yes | When the book record was last modified. |
Errors
| Code | Message | Description |
|---|---|---|
| -32602 | Invalid params |
Request example
{
"id": 1,
"jsonrpc": "2.0",
"method": "books.search",
"params": {
"query": "query_994"
}
}Response example
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"books": [
{
"authorId": "authorId_595",
"createdAt": "createdAt_865",
"id": "id_1",
"isbn": "isbn_437",
"publishedYear": 688,
"status": "available",
"title": "title_985",
"updatedAt": "updatedAt_232"
}
]
}
}