Searching resources

Use the /v2/search endpoint to find resources. Results are ranked by relevance (highest first), by default. You can search in three ways: by text, by image, or by referencing an existing resource.

Input: a string in the text field.

Results: multi-modal.

This is a hybrid search, combining typo-tolerant keyword matching and semantic search. It looks at both the literal content (e.g. the text of a note) and a compressed semantic representation of the resource. For images, it also matches against the image embedding.

To force an exact match on a phrase, wrap it in double quotes.

import { Exabase } from "@exabase/sdk";

const api = new Exabase({
  apiKey: process.env.EXABASE_API_KEY,
});

const searchJob = await api.resources.search({
  text: 'project plan',
});
curl https://api.exabase.io/v2/resources/search \
  -X POST \
  -H 'X-Api-Key: <EXABASE_API_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{
    "text": "project plan"
  }'

Input: a Base64-encoded data URI in the image field.

Results: images.

Semantic search that finds visually similar images based on image embeddings.

You can also filter by RGB color, and combine color filtering with text or image search (e.g. find semantically related images in a specific color tone).

Input: an existing resource's ID in the resourceId field.

Results: multi-modal.

Semantic search that finds similar resources based on content. Works across all resource types.

Input: a list of queries in the queries field.

Results: dependent on query types used, maps to the above search types (text, image, reference resource).

Combines multiple queries in a single request to cast a wider net. Results are merged into a single list.

For example, search for documents matching "meeting notes" and videos matching "meeting recording" at the same time, and get one unified set of results.

Each query takes the same shape as a top-level query: a text, image, or resourceId, plus optional filters.