Docs / Start here / Quickstart

Quickstart

Authenticate, index a product, and run your first search — in three requests. Everything below is server-side; the browser uses a scoped, origin-bound public key instead.

Keep your client_secret on the server. Never ship it to the browser. For storefront calls, use an origin-bound pk_live_ public key that can only search.

Three requests to first results

Exchange your client credentials for a bearer token, index a product, then search. Pick your language:

# 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}'

Seven endpoints, one afternoon

A minimum viable integration touches just these. Everything else is optional depth.

POST /v1/productsIndex a product on create or 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.
POST /v1/products/bulkInitial catalog sync — kick off the job, poll GET /v1/jobs/{id} until completed.
POST /v1/search/textStorefront keyword search (use /v1/search/url for image URLs, /v1/search for multipart uploads).
POST /v1/widget/search/*Or skip building UI — use the drop-in widget with a pk_live_ public key.

More endpoints

When you're ready to go deeper:

  • /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 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.
The full OpenAPI reference

Every endpoint, schema, and error, with a live try-it console.

Open API reference