Skip to main content
Filters are passed as the first argument to fetchEntities. They narrow down which entities are returned without affecting the sort order.

timeFrame

Limits results to entities created within a recent window.

userId

Filters to entities created by a specific user.

followedOnly

When true, returns only entities from users the authenticated user follows.

keywordsFilters

Filters by the entity’s keywords array.

titleFilters

Filters by the entity’s title field.

contentFilters

Filters by the entity’s content field.

attachmentsFilters

Filters by whether the entity has attachments.

locationFilters

Filters to entities within a geographic radius.
A radius outside that range, or one that isn’t a finite number, is rejected with 400 entity/invalid-query. 20,000 km is about half the Earth’s circumference, so the largest radius already reaches any point.

metadataFilters

Filters by fields inside the entity’s metadata object.
Keys and values can’t contain a NUL character (\u0000), which metadata can never hold. A filter with one anywhere is rejected with 400 entity/invalid-query.

nsfwFilter

Filters by an entity’s effective NSFW status — entity.nsfw OR its space's nsfwEffective (which itself folds in the space’s whole ancestor chain). On projects without the spaces bundle it applies against the entity’s own nsfw flag alone.
Sublay only labels (nsfw) and filters (nsfwFilter) NSFW content — it does not blur, age-gate, or store a per-viewer preference. Presentation is your app’s responsibility. See Entity NSFW flagging.

Combining Filters

All filters can be combined. An entity must satisfy all specified conditions.