Skip to content

List all entries of a Lorebook

GET
/open/v1/worldbook/entry/list
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).

worldbookId
required
string

Lorebook id.

category
string
Allowed values: rule character location item event custom

Filter by entry category (case-insensitive).

Entries.

Media typeapplication/json
object
worldbookId
required
string
category

Echo of the filter (omitted when not filtering).

string
entries
required
Array<object>
object
entryId
required
string
worldbookId
required
string
name
required
string
content
required

At most the book’s entry limit, entryContentMax on the Lorebook detail (4000 chars for Chinese, 6000 for Japanese or Korean, 12000 for English).

string
<= 12000 characters
keywords
required

Primary trigger keywords.

Array<string>
secondaryKeywords
required

Secondary keywords (AND gate; see matchOptions.selectiveLogic).

Array<string>
category
required
string
Allowed values: rule character location item event custom
isEnabled
required
boolean
isConstant
required

Always injected (subject to the constant budget and sortOrder).

boolean
triggerRegion
required

Which side of the dialogue is scanned for keywords.

string
Allowed values: both user_only ai_only
priority
required

Server-computed priority.

integer
sortOrder
required

Author order set by the reorder route.

integer
lastUpdateTime
required
string format: date-time
nullable
activationCount
required
integer
matchOptions
required
object
caseSensitive
boolean
matchWholeWords
boolean
selectiveLogic

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.

integer
0
Allowed values: 0 1 2 3
selective

When false, ignore secondaryKeywords. If omitted, secondaryKeywords use selectiveLogic.

boolean
scanDepth

HarperHarbor: keyword scan window in messages, including current input. Zero or omitted uses the current input and latest assistant reply.

integer
<= 100
order

Author ordering for new admissions. Existing HarperHarbor context anchors keep their original positions.

integer
groupId

Optional logical entry identifier, scoped to one book. HarperHarbor semantic recall admits eligible imported fragments together.

string
<= 128 characters
groupOrder

Fragment order within groupId.

integer
<= 10000
extensions

Preserved author metadata. Unknown fields are not executed as matching or placement instructions.

object
key
additional properties
any
nextRecommendedTools
required
Array<string>
Example
{
"entries": [
{
"category": "rule",
"triggerRegion": "both",
"matchOptions": {
"caseSensitive": false,
"matchWholeWords": false,
"selectiveLogic": 0
}
}
]
}

worldbookId is required.

Media typeapplication/json
object
error
required

Error code (snake_case) or, for legacy handlers, a free-text/localized message.

string
message

Human-readable sentence. Present only on middleware errors and /me, /me/wallet.

string
retryable

Whether retrying may succeed. Present only on middleware errors, /me, /me/wallet and service/share routes.

boolean
required_context_tier

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.

integer
>= 1 <= 5
required_context_tokens

The token budget of required_context_tier for the selected model, for display.

integer
constant_lore_trim_fits

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.

boolean
credits_needed

Only on insufficient_credits: the credits this turn needs before it can start. Absent when the refusal came without an estimate.

integer
credits_available

Only on insufficient_credits: the credits the wallet could set aside for it.

integer
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.

Media typeapplication/json
object
error
required

Error code (snake_case) or, for legacy handlers, a free-text/localized message.

string
message

Human-readable sentence. Present only on middleware errors and /me, /me/wallet.

string
retryable

Whether retrying may succeed. Present only on middleware errors, /me, /me/wallet and service/share routes.

boolean
required_context_tier

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.

integer
>= 1 <= 5
required_context_tokens

The token budget of required_context_tier for the selected model, for display.

integer
constant_lore_trim_fits

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.

boolean
credits_needed

Only on insufficient_credits: the credits this turn needs before it can start. Absent when the refusal came without an estimate.

integer
credits_available

Only on insufficient_credits: the credits the wallet could set aside for it.

integer
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.

Media typeapplication/json
object
error
required

Error code (snake_case) or, for legacy handlers, a free-text/localized message.

string
message

Human-readable sentence. Present only on middleware errors and /me, /me/wallet.

string
retryable

Whether retrying may succeed. Present only on middleware errors, /me, /me/wallet and service/share routes.

boolean
required_context_tier

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.

integer
>= 1 <= 5
required_context_tokens

The token budget of required_context_tier for the selected model, for display.

integer
constant_lore_trim_fits

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.

boolean
credits_needed

Only on insufficient_credits: the credits this turn needs before it can start. Absent when the refusal came without an estimate.

integer
credits_available

Only on insufficient_credits: the credits the wallet could set aside for it.

integer
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.

Media typeapplication/json
object
error
required

Error code (snake_case) or, for legacy handlers, a free-text/localized message.

string
message

Human-readable sentence. Present only on middleware errors and /me, /me/wallet.

string
retryable

Whether retrying may succeed. Present only on middleware errors, /me, /me/wallet and service/share routes.

boolean
required_context_tier

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.

integer
>= 1 <= 5
required_context_tokens

The token budget of required_context_tier for the selected model, for display.

integer
constant_lore_trim_fits

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.

boolean
credits_needed

Only on insufficient_credits: the credits this turn needs before it can start. Absent when the refusal came without an estimate.

integer
credits_available

Only on insufficient_credits: the credits the wallet could set aside for it.

integer
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
}