Search

Query your indexed documents.


Usage

import { Etoile } from "@etoile-dev/client";

const etoile = new Etoile({
apiKey: process.env.ETOILE_PUBLIC_KEY,
});

const { results } = await etoile.search({
query: "swirling sky painting",
collections: ["paintings"],
limit: 10,
});

Use your public key for search. It is safe to use in the browser.


Parameters

ParameterTypeDescription
queryrequiredstringNatural language query.
collectionsrequiredstring[]Collections to search.
limitnumberMax results (default: 10, max: 100).
offsetnumberPagination offset (default: 0).

Response

Each result includes external_id, title, collection, score, and metadata.


Related