Skip to main content
Fetch Spaces
Fetches a paginated list of spaces. Supports filtering by search query, membership, and parent space. Authentication is optional — if provided, member-only spaces the user belongs to are included.
This is a discovery surface: only public spaces are listed. Spaces with visibility of "unlisted" or "private" are excluded for non-members (they remain reachable by direct link/slug via Fetch Space by Slug or by Short ID). The exception is memberOf=true, which returns the caller’s own spaces regardless of visibility. See Space visibility.

Query Parameters

number
Page number. Defaults to 1.
number
Results per page.
string
Sort order: "alphabetical", "newest", or "members". Defaults to "members".
string
Filter by slug substring.
string
Filter by name substring.
string
Filter by description substring.
string
Search across name, slug, and description simultaneously.
boolean
When true, returns only spaces where the authenticated user is an active member.
string
Filter to child spaces of a specific parent. Pass "null" for root-level spaces only.
string
Optional comma-separated includes. Pass "files" to include avatar file objects.

Response

Space[]
Array of Space objects.
object
See also: useFetchManySpaces