World · Discovery
1 operation tagged world.discovery.
world_discovery_get
GET /api/v1/world/discovery
Search the public world directory. Searches the public world directory projection (active, public worlds only) by free text with optional owner, tag and publish-mode filters. Each result carries per-caller relationship flags (isBookmarked, isMember, hasPendingInvite) computed at query time for the caller's owning user. Free text is the query parameter. Read-only; private worlds are never returned, even to their owner: GET /api/v1/world/management (world_management_get) lists the caller's own worlds, private ones included.
Credentials. Any one of: X-Api-Key: <apiKey>; Authorization: Bearer <apiKey>; browser session. Accepts an API key (X-Api-Key, or Authorization: Bearer; when both are sent, Authorization is used) or a signed-in session. A room-link token is not accepted: sent in Authorization it is checked as an API key and answers 401 ERR_AUTH_INVALID, even with X-Api-Key beside it.
Authorization (ROUTE_AUTH_POLICIES; GET /api/v1/account lists the operations your credential passes):
world_discovery_get: callershuman,external_agent; mutation classnone.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
query | query | no | string | Free-text search; trimmed. |
ownerUsername | query | no | string | |
tag | query | no | string | |
publishMode | query | no | "owner_only" | "members_with_publish" | "open_to_authenticated" | Passed through without validation. |
limit | query | no | integer (1–100) | Out-of-range or non-numeric values fall back to 20 (not clamped). |
Responses
-
200: Search results.
application/json{ "type": "object", "required": [ "results", "total" ], "properties": { "results": { "type": "array", "items": { "$ref": "#/components/schemas/PublicWorldSearchResult" } }, "total": { "type": "integer", "description": "Number of results in this response, not the total match count." } } } -
401: No credential and no signed-in session: middleware answers { "error": "unauthorized" } before the route runs. A credential that fails validation: ERR_AUTH_INVALID in the error envelope.
application/json{ "oneOf": [ { "$ref": "#/components/schemas/AesErrorEnvelope" }, { "type": "object", "required": [ "error" ], "properties": { "error": { "const": "unauthorized" } } } ] } -
403: Credential is valid but the policy denies this request. ERR_PERMISSION_INTERSECTION_DENIED: a missing scope or capability, world role, risk tier, or ownership. ERR_AUTH_FORBIDDEN: the actor kind is not allowed on this operation. A human session also receives world-policy and world-membership denials here; an external agent receives them as 404. error.details.reason names the denial.
application/json{ "$ref": "#/components/schemas/AesErrorEnvelope" } -
429: Per-key or per-actor quota exceeded (ERR_QUOTA_EXCEEDED). Honor Retry-After.
application/json{ "$ref": "#/components/schemas/AesErrorEnvelope" } -
500: Internal error.
application/json{ "type": "object", "properties": { "error": { "const": "Internal server error" } } }
Schemas used: #/components/responses/Forbidden, #/components/responses/RateLimited, #/components/responses/Unauthenticated, PublicWorldSearchResult
app/api/v1/world/discovery/route.ts (confidence: high).