v1

latestOpenAPI 3.1.0Any Source Available License 1.02026-07-1736102200.0 KB
Search

Search objects within a space

Performs a search within a single space (specified by the space_id path parameter). Like the global search, it accepts pagination parameters and a JSON payload containing the search query, types, and sorting preferences. The search is limited to the provided space and returns a list of objects that match the query. This allows clients to implement space‑specific filtering without having to process extraneous results.

post/v1/spaces/{space_id}/search

Path parameters

space_idstring required

The ID of the space to search in; must be retrieved from ListSpaces endpoint

Query parameters

offsetinteger

The number of items to skip before starting to collect the result set

limitinteger

The number of items to return

Headers

Anytype-Versionstring required

The version of the API to use

Request body

querystring

The text to search within object names and content; use types field for type filtering

typesstring[]

The types of objects to include in results (e.g., "page", "task", "bookmark"); see ListTypes endpoint for valid values

Response

The list of objects matching the search criteria

Example response

{
  "data": [
    {
      "icon": {
        "emoji": "📄"
      },
      "id": "bafyreie6n5l5nkbjal37su54cha4coy7qzuhrnajluzv5qd5jvtsrxkequ",
      "layout": "basic",
      "name": "My object",
      "object": "object",
      "properties": [
        {
          "id": "bafyreids36kpw5ppuwm3ce2p4ezb3ab7cihhkq6yfbwzwpp4mln7rcgw7a",
          "key": "description",
          "name": "Description",
          "object": "property",
          "text": "Some text..."
        }
      ],
      "snippet": "The beginning of the object body...",
      "space_id": "bafyreigyfkt6rbv24sbv5aq2hko3bhmv5xxlf22b4bypdu6j7hnphm3psq.23me69r569oi1",
      "type": {
        "icon": {
          "emoji": "📄"
        },
        "id": "bafyreigyb6l5szohs32ts26ku2j42yd65e6hqy2u3gtzgdwqv6hzftsetu",
        "key": "page",
        "name": "Page",
        "object": "type",
        "plural_name": "Pages",
        "properties": [
          {
            "id": "bafyreids36kpw5ppuwm3ce2p4ezb3ab7cihhkq6yfbwzwpp4mln7rcgw7a",
            "key": "last_modified_date",
            "name": "Last modified date",
            "object": "property"
          }
        ]
      }
    }
  ],
  "pagination": {
    "has_more": true,
    "limit": 100,
    "total": 1000
  }
}