Search API
Perform searches against the archive index.
Search Archives
Section titled “Search Archives”Search for Archives. You can use the IDs of this JSON with the other endpoints.
Query parameters
- categorystring · min: 14 · max: 14 · patternoptional
- ID of the category you want to restrict this search to.
- filterstringoptional
- Search query. You can use the following special characters in it: Quotation Marks ("...") Exact string search. Allows a search term to include spaces. Everything placed inside a pair of quotation marks is treated as a singular term. Wildcard characters are still interpreted as wildcards. Question Mark (?), Underscore (_) Wildcard. Can match any single character. Asterisk (*), Percentage Sign (%) Wildcard. Can match any sequence of characters (including none). Subtraction Sign (-) Exclusion. When placed before a term, prevents search results from including that term. Dollar Sign ($) Add at the end of a tag to perform an exact tag search rather than displaying all elements that start with the term. Only matches tags regardless of search parameters and can be used as an exclusion to ignore misc tags in the search query.
- startintegeroptional
- From which archive in the total result count this enumeration should start. The total number of archives displayed depends on the server-side page size preference. From 0.8.2 onwards, you can use "-1" here to get the full, unpaged data.
- sortbystringoptional
- Namespace by which you want to sort the results. There are specific sort keys you can use: - *title* if you want to sort by title - *lastread* if you want to sort by last read time. (If Server-side Progress Tracking is enabled) (Default value is title. If you sort by lastread, IDs that have never been read will be removed from the search.)
- orderstringoptional
- Order of the sort, either
ascordesc. - newonlybooleanoptional
- Limit search to new archives only.
- untaggedonlybooleanoptional
- Limit search to untagged archives only.
- hidecompletedbooleanoptional
- Hide archives where reading progress has reached the end.
- groupby_tanksboolean · default: trueoptional
- Enable or disable Tankoubon grouping. Defaults to true. When enabled, Tankoubons will show in search results, replacing all the archive IDs they contain.
Responses
200Search results
{
"data": [
{
"arcid": "28697b96f0ac5858be2614ed10ca47742c9522fd",
"extension": "rar",
"filename": "Fate GO MEMO",
"isnew": false,
"lastreadtime": 1337038281,
"pagecount": 34,
"progress": 3,
"size": 0,
"summary": null,
"tags": "parody:fate grand order, group:wadamemo, artist:wada rco, artbook, full color",
"title": "Fate GO MEMO"
},
{
"arcid": "28697b96f0ac5858be2614ed10ca47742c9522fd",
"extension": "rar",
"filename": "Gucc",
"isnew": false,
"lastreadtime": 1337038281,
"pagecount": 34,
"progress": 3,
"size": 0,
"summary": "cool summary",
"tags": "parody:jojo's bizarre adventure",
"title": "Rohan Kishibe goes to Gucci"
}
],
"recordsFiltered": 2,
"recordsTotal": 2
}204Search engine is not initialized yet. Please wait a few seconds.
This response carries no example body.
Request failed — Usual causes: the instance address is wrong or unreachable; cross-origin access is not enabled on the instance; or this page is HTTPS while the instance is plain HTTP on a LAN address, which the browser blocks as mixed content. “Copy as cURL” above sends the same request from a terminal.
Your own instance address. Requests go from this browser straight to it.
Additive raw-archive search endpoint (GET /search/archives), sharing /search’s query
Section titled “Additive raw-archive search endpoint (GET /search/archives), sharing /search’s query”Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet.
The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/search.rs:435), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers.
Additive raw-archive search endpoint (GET /search/archives), sharing /search’s query
syntax, filtering, sorting, and pagination but never folding member archives behind a
Tankoubon. It is intentionally a separate endpoint rather than a new default on /search:
existing grouped-search callers keep their exact behavior, while duplicate/library-membership
checks can ask for the underlying archive records instead of a TANK_ aggregate.
Responses
200The endpoint responded. Its exact shape is not documented yet — see the handler at crates/lanrurugi-api/src/search.rs:200.
This response carries no example body.
Request failed — Usual causes: the instance address is wrong or unreachable; cross-origin access is not enabled on the instance; or this page is HTTPS while the instance is plain HTTP on a LAN address, which the browser blocks as mixed content. “Copy as cURL” above sends the same request from a terminal.
Your own instance address. Requests go from this browser straight to it.
Discard Search Cache
Section titled “Discard Search Cache”Discard the cache containing previous user searches.
Responses
200Success response
{
"error": "",
"operation": "",
"success": 0,
"successMessage": ""
}400No archive ID response
{
"error": "",
"operation": "",
"success": 0,
"successMessage": ""
}This endpoint needs an administrator token — a guest (read-only) token is refused by the server.
Request failed — Usual causes: the instance address is wrong or unreachable; cross-origin access is not enabled on the instance; or this page is HTTPS while the instance is plain HTTP on a LAN address, which the browser blocks as mixed content. “Copy as cURL” above sends the same request from a terminal.
Your own instance address. Requests go from this browser straight to it.
Search Archive IDs
Section titled “Search Archive IDs”Search for Archives like /api/search, but returns only the ordered list of matching Archive IDs without the accompanying metadata.
Query parameters
- categorystring · min: 14 · max: 14 · patternoptional
- ID of the category you want to restrict this search to.
- filterstringoptional
- Search query. This follows the same rules as the queries in
/api/search. - startintegeroptional
- From which archive in the total result count this enumeration should start. The total number of archives displayed depends on the server-side page size preference. From 0.8.2 onwards, you can use "-1" here to get the full, unpaged list of IDs.
- sortbystringoptional
- Namespace by which you want to sort the results. There are specific sort keys you can use: - *title* if you want to sort by title - *lastread* if you want to sort by last read time. (If Server-side Progress Tracking is enabled) (Default value is title. If you sort by lastread, IDs that have never been read will be removed from the search.)
- orderstringoptional
- Order of the sort, either
ascordesc. - newonlybooleanoptional
- Limit search to new archives only.
- untaggedonlybooleanoptional
- Limit search to untagged archives only.
- hidecompletedbooleanoptional
- Hide archives where reading progress has reached the end.
- groupby_tanksboolean · default: trueoptional
- Enable or disable Tankoubon grouping. Defaults to true. When enabled, Tankoubons will show in search results, replacing all the archive IDs they contain.
Responses
200Search results
{
"data": [
"28697b96f0ac5858be2614ed10ca47742c9522fd",
"5cf64ec2f3c2c627fb8a64df198af2a8527c4fdb"
],
"recordsFiltered": 2,
"recordsTotal": 2
}204Search engine is not initialized yet. Please wait a few seconds.
This response carries no example body.
Request failed — Usual causes: the instance address is wrong or unreachable; cross-origin access is not enabled on the instance; or this page is HTTPS while the instance is plain HTTP on a LAN address, which the browser blocks as mixed content. “Copy as cURL” above sends the same request from a terminal.
Your own instance address. Requests go from this browser straight to it.
Search random Archives
Section titled “Search random Archives”Get randomly selected Archives from the given filter and/or category.
Query parameters
- categorystring · min: 14 · max: 14 · patternoptional
- ID of the category you want to restrict this search to.
- filterstringoptional
- Search query. This follows the same rules as the queries in
/api/search. - countinteger · default: 5optional
- How many archives you want to pull randomly. Defaults to 5. If the search doesn't return enough data to match your count, you will get the full search shuffled randomly.
- newonlybooleanoptional
- Limit search to new archives only.
- untaggedonlybooleanoptional
- Limit search to untagged archives only.
- hidecompletedbooleanoptional
- Hide archives where reading progress has reached the end.
- groupby_tanksboolean · default: trueoptional
- Enable or disable Tankoubon grouping. Defaults to true. When enabled, Tankoubons will show in search results, replacing all the archive IDs they contain.
Responses
200Search results
{
"data": [
{
"arcid": "28697b96f0ac5858be2614ed10ca47742c9522fd",
"extension": "rar",
"filename": "Gucc",
"isnew": false,
"lastreadtime": 1337038281,
"pagecount": 34,
"progress": 3,
"size": 0,
"summary": "cool summary",
"tags": "parody:jojo's bizarre adventure",
"title": "Rohan Kishibe goes to Gucci"
}
],
"recordsTotal": 2
}Request failed — Usual causes: the instance address is wrong or unreachable; cross-origin access is not enabled on the instance; or this page is HTTPS while the instance is plain HTTP on a LAN address, which the browser blocks as mixed content. “Copy as cURL” above sends the same request from a terminal.
Your own instance address. Requests go from this browser straight to it.
Additive, lightweight endpoint backing the Library search box’s title autocomplete
Section titled “Additive, lightweight endpoint backing the Library search box’s title autocomplete”Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet.
The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/search.rs:603), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers.
Additive, lightweight endpoint backing the Library search box’s title autocomplete. Unlike
/search, it returns only arcid + title for the first few matches — no tags, progress, or
size — because the frontend calls it on every (debounced) keystroke, where a full /search
page of 100 archive records would be a few hundred KB of JSON that a suggestion list
immediately discards. Same query syntax, same filters, and the same default title ordering as
/search (which is exactly what a suggestion list wants), plus the same guest scoping:
restrict_to_archive_ids is applied here too, so a guest_visitor can never be shown an
out-of-scope title through this endpoint that /search would refuse to return.
Responses
200The endpoint responded. Its exact shape is not documented yet — see the handler at crates/lanrurugi-api/src/search.rs:202.
This response carries no example body.
Request failed — Usual causes: the instance address is wrong or unreachable; cross-origin access is not enabled on the instance; or this page is HTTPS while the instance is plain HTTP on a LAN address, which the browser blocks as mixed content. “Copy as cURL” above sends the same request from a terminal.
Your own instance address. Requests go from this browser straight to it.