Skip to content

Search & Discovery

These endpoints power package discovery. club is a private repository, so they require authentication (a Bearer PAT or a session cookie). The search engine uses SQLite FTS5 by default, with an optional Meilisearch backend for larger deployments.

Search Packages

GET /api/search?q=<query>&page=<n>&sort=<field>

Full-text search across package names, descriptions, and README content.

ParameterTypeDefaultDescription
qstring(none)Free-text search query
pageinteger1Page number (1-indexed)
sortstringrelevanceOne of relevance, updated, created, likes. Any other value falls back to relevance

Response: 200 OK

{
"packages": [
{ "package": "http", "score": 0.95 },
{ "package": "http_parser", "score": 0.82 },
{ "package": "dio", "score": 0.71 }
],
"totalCount": 42,
"page": 1,
"pageSize": 20
}

Query Syntax

The q value is a free-text query matched across the package name, description, README excerpt, tags, and topics via SQLite FTS5. When q is empty or omitted, the endpoint returns the full package list ordered by sort. Discontinued packages are excluded from search results.


List All Packages

GET /api/packages?page=<pageToken>&compact=1

Returns a paginated list of package names without a search query. page is an opaque cursor token (the nextPageToken returned by a previous call), not a numeric page index. The page size is 100.

Passing compact=1 returns the same payload as /api/package-name-completion-data: every package name, up to 10,000, with no totalCount.

Response: 200 OK

{
"packages": [
"crypto",
"dio",
"http",
"my_package"
],
"totalCount": 4
}

Package Name Completion

GET /api/package-name-completion-data

Returns an array of every package name on the server, up to a maximum of 10,000 names. Used by the web UI for autocomplete.

{
"packages": [
"crypto",
"dio",
"http",
"http_parser",
"json_annotation",
"shelf"
]
}