Everything the API does, one scroll away.
Copy-paste quickstarts, a full OpenAPI reference, and working examples in Python, JavaScript, and cURL.
# 1. Exchange client credentials for a bearer token (server-side only). export TOKEN=$(curl -s https://search.trooply.ai/oauth/token \ -H "Content-Type: application/json" \ -d '{"client_id":"'$CLIENT_ID'","client_secret":"'$CLIENT_SECRET'"}' \ | jq -r .access_token) # 2. Index a product (JSON, image_url is the canonical path). curl -X POST https://search.trooply.ai/v1/products \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{"product_id":"SKU-48120","image_url":"https://cdn.shop.com/bag.jpg","metadata":{"name":"Marla Tote","price":189,"category":"Handbags"}}' # 3. Search by text. curl https://search.trooply.ai/v1/search/text \ -X POST -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{"query":"red tote","limit":10}'
# pip install httpx import httpx, os BASE = "https://search.trooply.ai" with httpx.Client(base_url=BASE, timeout=30) as c: # 1. Auth tok = c.post("/oauth/token", json={ "client_id": os.environ["TROOPLY_CLIENT_ID"], "client_secret": os.environ["TROOPLY_CLIENT_SECRET"], }).raise_for_status().json()["access_token"] h = {"Authorization": f"Bearer {tok}"} # 2. Index c.post("/v1/products", headers=h, json={ "product_id": "SKU-48120", "image_url": "https://cdn.shop.com/bag.jpg", "metadata": {"name": "Marla Tote", "price": 189, "category": "Handbags"}, }).raise_for_status() # 3. Search by text r = c.post("/v1/search/text", headers=h, json={"query": "red tote", "limit": 10}) print(r.json())
// Node 18+ / browsers have fetch built-in. const BASE = "https://search.trooply.ai"; // 1. Auth (server-side only — never ship client_secret to the browser). const tok = (await (await fetch(`${BASE}/oauth/token`, { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ client_id: process.env.TROOPLY_CLIENT_ID, client_secret: process.env.TROOPLY_CLIENT_SECRET, }), })).json()).access_token; const h = { "Authorization": `Bearer ${tok}`, "Content-Type": "application/json" }; // 2. Index await fetch(`${BASE}/v1/products`, { method: "POST", headers: h, body: JSON.stringify({ product_id: "SKU-48120", image_url: "https://cdn.shop.com/bag.jpg", metadata: { name: "Marla Tote", price: 189, category: "Handbags" }, }), }); // 3. Search by text const r = await fetch(`${BASE}/v1/search/text`, { method: "POST", headers: h, body: JSON.stringify({ query: "red tote", limit: 10 }), }); console.log(await r.json());
Start here
Quickstart
From signup to first search in under 10 minutes.
ReadImage search guide
Tune ranking weights for your catalog.
ReadShopify integration
Sync your catalog, render results in your theme.
Contact usTrooply vs Searchanise
Side-by-side feature matrix, differentiators, and a plain-English migration guide.
ReadFeature deep-dives
Short explainers from the team — visual search, merchandising, custom fields, promo banners, widget auth, photo-quality audit.
BrowseMinimum viable integration
Seven endpoints, one afternoon.
A working integration between your ecommerce platform and Trooply needs these endpoints — nothing else. The rest of the API reference is optional enhancements and merchant-portal APIs your platform code shouldn't be calling directly.
POST /oauth/tokenServer-side only. Returns a bearer token. Never shipclient_secretto the browser.POST /v1/productsIndex a product on create / image change.PUT /v1/products/{id}Update on metadata change (price, rename, new image).DELETE /v1/products/{id}Remove on product delete. Per-product only — the collection-level delete isn't exposed.POST /v1/products/bulk + GET /v1/jobs/{id}Initial catalog sync. Kick off the job, poll untilstatus=="completed".POST /v1/search/textStorefront keyword search (use/v1/search/urlfor image uploads,/v1/searchfor multipart file uploads).POST /v1/widget/search/*Alternative to writing your own UI — use our drop-in widget with apk_live_public key.
Ship the seven above first. Add these as your product roadmap allows — each is independently useful, none block a launch.
/v1/search/suggestions— autocomplete as the shopper types./v1/search/feedback— click / purchase signals improve ranking over time./v1/search/similar/{id}— "More like this" on a product detail page./v1/products/facets— values to populate filter sidebars./v1/search/voice— speech → search for mobile-first stores./v1/search/crop,/multi-image,/fusion— advanced visual shopping flows./v1/ai/search/nl,/v1/ai/search/parse— natural-language filter parsing.
Not in the reference, by design: custom-fields, search-config, merchandising, widget-keys and promo-banner CRUD are merchant-portal workflows — managed at /portal, not from platform code. Same goes for analytics, batch search, and the OpenAI-compatible chat proxy.
Feature explainers
Visual search 101
CLIP, embeddings, and what /v1/search/url is doing under the hood.
Pin, boost, bury
Rules that scope themselves to the right query, category, or time window.
ReadCustom fields & filters
Declare fields once, get a facet UI, filter every search call.
ReadPromo banners
Scope-aware callouts in search results, with start / end windows.
ReadWidget + public keys
Drop-in search without putting a server secret in page source.
ReadPhoto-quality audit
Resolution, blur, exposure, contrast — plus an actionable fix hint per SKU.
ReadProduct variants (S14)
Index colour / size variants as separate rows so visual search ranks the right one. Collapse at render time when you want one card per concept.
Read