Skip to main content

Issue Text Content Search

GET /api/v2/reader/issue-text-content

Searches for text within the current issue using SingleStore full-text search. Returns highlighted snippets with location information for navigating to matches. Requires the reader-token header.

Request:

curl "https://app.publica.la/api/v2/reader/issue-text-content?search=quantum" \
-H "Authorization: Bearer {access_token}" \
-H "X-Farfalla-Tenant-Id: 42" \
-H "reader-token: {session_token}" \
-H "Accept: application/json"
ParameterTypeRequiredDescription
searchstring (4-128 chars)YesText to search for

Response: 200 OK

[
{
"location": "page:42,offset:120",
"snippet": "highlighted text with <mark>quantum</mark> matching",
"query_words": ["quantum"]
},
{
"location": "page:85,offset:45",
"snippet": "another passage about <mark>quantum</mark> mechanics",
"query_words": ["quantum"]
}
]
FieldTypeDescription
locationstringPosition identifier for navigation
snippetstringHighlighted text excerpt with match markers
query_wordsstring[]Words from the query found in this snippet
info

Results are limited to 50 matches, ordered by relevance. The location format varies by content type (page-based for PDF, CFI-based for EPUB).

Error Responses

CodeCause
403Missing or invalid reader-token
404No searchable content available for issue
422search is missing or outside 4-128 chars
X

Graph View