List all entries of a Lorebook
const url = 'https://api.harperharbor.com/open/v1/worldbook/entry/list?worldbookId=example&category=rule';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 'https://api.harperharbor.com/open/v1/worldbook/entry/list?worldbookId=example&category=rule' \ --header 'Authorization: Bearer <token>'Returns every entry of a Lorebook the caller can access (owned, or public). For a book the caller does not own only enabled entries are returned. keywords and secondaryKeywords are arrays; matchOptions is null for native entries and an object for tavern-format entries; triggerRegion is normalized to both when unset. Optional category filter must be one of rule, character, location, item, event, custom (invalid_worldbook_category otherwise, surfaced as HTTP 500).
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Lorebook id.
Filter by entry category (case-insensitive).
Responses
Section titled “Responses”Entries.
object
Echo of the filter (omitted when not filtering).
object
At most the book’s entry limit, entryContentMax on the Lorebook detail (4000 chars for Chinese, 6000 for Japanese or Korean, 12000 for English).
Primary trigger keywords.
Secondary keywords (AND gate; see matchOptions.selectiveLogic).
Always injected (subject to the constant budget and sortOrder).
Which side of the dialogue is scanned for keywords.
Server-computed priority.
Author order set by the reorder route.
object
How secondaryKeywords gate activation: 0 = AND ANY (any secondary keyword present), 1 = NOT ALL, 2 = NOT ANY, 3 = AND ALL. Out-of-range values are normalized to 0.
When false, ignore secondaryKeywords. If omitted, secondaryKeywords use selectiveLogic.
HarperHarbor: keyword scan window in messages, including current input. Zero or omitted uses the current input and latest assistant reply.
Author ordering for new admissions. Existing HarperHarbor context anchors keep their original positions.
Optional logical entry identifier, scoped to one book. HarperHarbor semantic recall admits eligible imported fragments together.
Fragment order within groupId.
Preserved author metadata. Unknown fields are not executed as matching or placement instructions.
object
Example
{ "entries": [ { "category": "rule", "triggerRegion": "both", "matchOptions": { "caseSensitive": false, "matchWholeWords": false, "selectiveLogic": 0 } } ]}worldbookId is required.
object
Error code (snake_case) or, for legacy handlers, a free-text/localized message.
Human-readable sentence. Present only on middleware errors and /me, /me/wallet.
Whether retrying may succeed. Present only on middleware errors, /me, /me/wallet and service/share routes.
Only on a first-turn context_capacity_exceeded: the smallest context tier that fits the whole card with room to talk. Save it as context in player settings and resend. Absent when no tier fits.
The token budget of required_context_tier for the selected model, for display.
Only on a first-turn context_capacity_exceeded: whether saving trimConstantLore=true lets the card play at the current tier. Absent on mid-conversation capacity errors.
Only on insufficient_credits: the credits this turn needs before it can start. Absent when the refusal came without an estimate.
Only on insufficient_credits: the credits the wallet could set aside for it.
Examplegenerated
{ "error": "example", "message": "example", "retryable": true, "required_context_tier": 1, "required_context_tokens": 1, "constant_lore_trim_fits": true, "credits_needed": 1, "credits_available": 1}unauthorized.
object
Error code (snake_case) or, for legacy handlers, a free-text/localized message.
Human-readable sentence. Present only on middleware errors and /me, /me/wallet.
Whether retrying may succeed. Present only on middleware errors, /me, /me/wallet and service/share routes.
Only on a first-turn context_capacity_exceeded: the smallest context tier that fits the whole card with room to talk. Save it as context in player settings and resend. Absent when no tier fits.
The token budget of required_context_tier for the selected model, for display.
Only on a first-turn context_capacity_exceeded: whether saving trimConstantLore=true lets the card play at the current tier. Absent on mid-conversation capacity errors.
Only on insufficient_credits: the credits this turn needs before it can start. Absent when the refusal came without an estimate.
Only on insufficient_credits: the credits the wallet could set aside for it.
Examplegenerated
{ "error": "example", "message": "example", "retryable": true, "required_context_tier": 1, "required_context_tokens": 1, "constant_lore_trim_fits": true, "credits_needed": 1, "credits_available": 1}permission denied (not owner and not public — note the space-separated form from the Lorebook service maps to 500), record not found, invalid_worldbook_category, or another error; retryable: true.
object
Error code (snake_case) or, for legacy handlers, a free-text/localized message.
Human-readable sentence. Present only on middleware errors and /me, /me/wallet.
Whether retrying may succeed. Present only on middleware errors, /me, /me/wallet and service/share routes.
Only on a first-turn context_capacity_exceeded: the smallest context tier that fits the whole card with room to talk. Save it as context in player settings and resend. Absent when no tier fits.
The token budget of required_context_tier for the selected model, for display.
Only on a first-turn context_capacity_exceeded: whether saving trimConstantLore=true lets the card play at the current tier. Absent on mid-conversation capacity errors.
Only on insufficient_credits: the credits this turn needs before it can start. Absent when the refusal came without an estimate.
Only on insufficient_credits: the credits the wallet could set aside for it.
Examplegenerated
{ "error": "example", "message": "example", "retryable": true, "required_context_tier": 1, "required_context_tokens": 1, "constant_lore_trim_fits": true, "credits_needed": 1, "credits_available": 1}worldbook_unavailable.
object
Error code (snake_case) or, for legacy handlers, a free-text/localized message.
Human-readable sentence. Present only on middleware errors and /me, /me/wallet.
Whether retrying may succeed. Present only on middleware errors, /me, /me/wallet and service/share routes.
Only on a first-turn context_capacity_exceeded: the smallest context tier that fits the whole card with room to talk. Save it as context in player settings and resend. Absent when no tier fits.
The token budget of required_context_tier for the selected model, for display.
Only on a first-turn context_capacity_exceeded: whether saving trimConstantLore=true lets the card play at the current tier. Absent on mid-conversation capacity errors.
Only on insufficient_credits: the credits this turn needs before it can start. Absent when the refusal came without an estimate.
Only on insufficient_credits: the credits the wallet could set aside for it.
Examplegenerated
{ "error": "example", "message": "example", "retryable": true, "required_context_tier": 1, "required_context_tokens": 1, "constant_lore_trim_fits": true, "credits_needed": 1, "credits_available": 1}