COS search suggestions

GET https://api.api.sh/cos/v1/suggest
1 credit / call e-commerce try it in the playground →

What the COS search box suggests while typing: keywords with result counts, categories (with the path that /cos/v1/category takes) and products.

Every response includes credits_used: the credits this call cost.

Part of the COS API: 13 endpoints with prices, use cases and example responses.

Parameters

nametypedescription
qrequired string The start of a search, e.g. cash. Example: cash
market string Market: us (default), ca, gb, ie, de, at, ch, fr, es, it, nl, dk, no, se, pl, eu, eue, au, ww, or a site locale such as de-ch. Prices, currency and stock follow the market. country is accepted as the same thing.
language string Language of names and texts, one the market offers (ch: de, en, fr; de: de, en; ca: en, fr; others their own). Default: the market's first language, or the link's.

Every endpoint also takes fresh, raw, fields (see lean responses and caching).

Example

curl "https://api.api.sh/cos/v1/suggest?q=cash" \
  -H "x-api-key: $APISH_KEY"

Response

A JSON object with the fields described above, plus raw (the source's own data), cached, fetched_at and credits_used. Errors return {"success": false, "error": "…"} with the HTTP status (see errors). A lookup that ran but found nothing (404) costs the price above; refused calls and errors on our side are free (what's charged).

Example response (real call, trimmed: lists cut to 2 items, long text shortened, raw left out)

{"market": "us","language": "en","query": "cash","keywords": [{"keyword": "cashmere","results": 416},{"keyword": "brushed cashmere","results": 64},"… 8 more"],"categories": [{"name": "womenswear > cashmere","path": "women/womenswear/cashmere","results": 282,"id": "catalog01_women_womenwomenswear_womenwomenswearcashmere"},{"name": "knitwear > cashmereknitwear","path": "women/womenswear/knitwear/cashmereknitwear","results": 274,"id": "catalog01_women_womenwomenswear_womenwomenswearknitwear_womenwomenswearknitwearcashmereknitwear"},"… 8 more"],"products": [{"sku": "1340973001","name": "ROUNDED PURE CASHMERE CREW-NECK SWEATER","image": "https://media.cos.com/assets/001/65/a6/65a666b58252f92313068736f5e0f33366e9156d_xxl-1.jpg"},{"sku": "1340973002","name": "ROUNDED PURE CASHMERE CREW-NECK SWEATER","image": "https://media.cos.com/assets/001/36/40/36405c0ee1a3c9c0519d252f0050f38971b7935d_xxl-1.jpg"},"… 8 more"],"cached": false,"credits_used": 1}
The fastest way to see the full response is the playground: it runs this endpoint with your account and shows the exact JSON.