Search
Ask a question in plain English. Etoile finds the best matches.
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"],
});const response = await fetch("https://etoile.dev/api/v1/search", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.ETOILE_PUBLIC_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
query: "swirling sky painting",
collections: ["paintings"],
}),
});
const { results } = await response.json();curl -X POST "https://etoile.dev/api/v1/search" \
-H "Authorization: Bearer $ETOILE_PUBLIC_KEY" \
-H "Content-Type: application/json" \
-d '{
"query": "swirling sky painting",
"collections": ["paintings"]
}'Related
- Search (POST) — API reference
- Filter by collection — narrow results
- Paginate results — limit and offset