Concepts
Search
One request to find products, variants, audiences, design packs, swipe files, image ads, customer reviews and survey responses by name, or to resolve a list of ids.
GET /v1/search is built for typeaheads, @-mention pickers, command palettes and agents that need to turn a name into an id.
Search by name
const { data: hits } = await sal("/v1/search?query=hoodie&types=product,audience&limit=5");
// [{ object: "product", id: "prod_…", label: "Fleece Hoodie", hint: "Acme Apparel", thumbnail_url: "…" }, …]| Parameter | Notes |
|---|---|
query | Case-insensitive. Empty returns the most recent items of each type |
types | Comma list of product, product_variant, audience, design_pack, swipe_file, image_ad, customer_review, post_purchase_survey_response. Defaults to all |
brand_id | Limit brand-owned types (products, variants, audiences, image ads, reviews, survey responses) to one brand |
limit | Results per type, 1 to 25 (default 5) |
Results are grouped by type in the order of types. Customer reviews and survey responses are labelled with their first words. To filter them by product, rating or question, use GET /v1/customer-reviews and GET /v1/post-purchase-survey-responses.
Resolve ids
Pass ids (up to 100, any supported types mixed) to get each one's label and thumbnail in one call. query and limit are ignored.
const { data } = await sal("/v1/search?ids=prod_9c1e2a7b5d3f4860,sf_4b8d2e6a1c3f5097,ia_7e3c9a1b5d2f4068");What's left out
- Types your key can't read are skipped rather than refused.
- Archived products, variants, audiences, design packs and swipe files, and swipe files still processing.