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"
| Parameter | Type | Required | Description |
|---|---|---|---|
search | string (4-128 chars) | Yes | Text 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"]
}
]
| Field | Type | Description |
|---|---|---|
location | string | Position identifier for navigation |
snippet | string | Highlighted text excerpt with match markers |
query_words | string[] | 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
| Code | Cause |
|---|---|
| 403 | Missing or invalid reader-token |
| 404 | No searchable content available for issue |
| 422 | search is missing or outside 4-128 chars |