Search

Search through resources using multiple modes with filtering, pagination, and sorting.

Headers
  • X-Exabase-Base-Id
    Type: string

    Optional. When provided, the request is executed against the specified base. If omitted, the parent workspace is used.

Body
application/json
    • filters
      Type: object
    • image
      Type: string
      max length:  
      600000

      Find image resources similar to this image. The image should be provided as a base64-encoded string with a data URL prefix (e.g., "data:image/png;base64,...").

    • incognito
      Type: boolean | null

      Does not store search query in search history, if set to true.

    • pagination
      Type: object
    • precision
      Type: number
      min:  
      0
      max:  
      1

      A value between 0 and 1 that controls the precision of the search results. Higher values will return fewer results that are more relevant, while lower values will return more results that may be less relevant. Default is 0.3.

    • queries
      Type: array object[]
    • resourceId
    • sort
      Type: object
    • text
      Type: string
      max length:  
      255

      Find resources matching this text. Uses hybrid semantic and keyword search, so you can either provide keywords or a natural language query.

Responses
  • application/json
Request Example for post/v2/search
curl https://api.exabase.io/v2/search \
  --request POST \
  --header 'X-Exabase-Base-Id: ' \
  --header 'Content-Type: application/json' \
  --header 'X-Api-Key: YOUR_SECRET_TOKEN' \
  --data '{
  "resourceId": null,
  "image": "",
  "text": "",
  "filters": {
    "kinds": [
      "default"
    ],
    "color": [
      1
    ],
    "parentIds": [
      ""
    ],
    "ancestorIds": [
      ""
    ],
    "tagIds": [
      ""
    ],
    "userIds": [
      ""
    ],
    "createdAfter": null,
    "createdBefore": null
  },
  "precision": 0,
  "queries": [
    {
      "resourceId": null,
      "image": "",
      "text": ""
    },
    {
      "filters": {
        "kinds": [
          "default"
        ],
        "color": [
          1
        ],
        "parentIds": [
          ""
        ],
        "ancestorIds": [
          ""
        ],
        "tagIds": [
          ""
        ],
        "userIds": [
          ""
        ],
        "createdAfter": null,
        "createdBefore": null
      },
      "precision": 0
    }
  ],
  "incognito": false,
  "pagination": {
    "page": 1,
    "pageSize": 20
  },
  "sort": {
    "field": "createdAt",
    "order": "asc"
  }
}'
{
  "total": 1,
  "hasMore": true,
  "hits": [
    {
      "id": "string",
      "kind": "document",
      "mimeType": null,
      "extension": null,
      "name": null,
      "description": null,
      "size": null,
      "url": "string",
      "commentPinned": null,
      "label": {
        "id": 1,
        "hexColor": "string"
      },
      "parent": {
        "id": "string",
        "name": null
      },
      "cover": null,
      "user": null,
      "root": {
        "id": "string",
        "type": "SYSTEM",
        "subtype": "GOOGLE_DRIVE",
        "isPrivate": true,
        "folder": {
          "id": "string",
          "name": null,
          "isLocked": true,
          "isPasswordProtected": true,
          "user": null
        }
      },
      "stateProcessing": "pending",
      "originUrl": null,
      "tags": [
        {
          "id": "string",
          "name": "string"
        }
      ],
      "chats": [
        {
          "id": "string",
          "name": null,
          "isPinned": true,
          "createdAt": "string",
          "modifiedAt": "string"
        }
      ],
      "thumbnail": {
        "sm": "string",
        "md": "string",
        "lg": "string",
        "xl": "string",
        "original": "string"
      },
      "fileUrl": null,
      "preferences": null,
      "isPasswordProtected": false,
      "isLocked": false,
      "publishedAncestors": [
        {
          "resourceId": "string",
          "accessToken": "string"
        }
      ],
      "createdAt": "string",
      "modifiedAt": "string",
      "data": {
        "infected": true,
        "documentPreview": {
          "html": null
        },
        "caption": null,
        "keywords": [
          "string"
        ],
        "attributes": {
          "document": {
            "pages": null,
            "author": null,
            "title": null,
            "subject": null,
            "keywords": null,
            "producer": null,
            "creator": null,
            "security": null,
            "version": null,
            "creationDate": null,
            "modificationDate": null
          },
          "dimensions": {
            "width": null,
            "height": null
          },
          "cover": null
        },
        "pdfRender": {
          "storagePath": "string",
          "url": "string"
        }
      }
    },
    {
      "score": 1,
      "chunks": [
        {
          "text": "string",
          "pageNumber": 1,
          "timeStart": 1,
          "timeEnd": 1,
          "score": 1
        }
      ],
      "embeddings": {
        "small3_512": [
          1
        ],
        "clip2": [
          1
        ]
      }
    }
  ]
}