Trendyol product search
Products on Trendyol (Turkey) for keywords, with the site's sort and a price range. Each product: id, name, brand, category, price, original and old price, discount, currency, rating and rating count, seller id, free-shipping flag, promotions, badges, link, images and raw. total is the site's count (capped at 100,000). Pass next_page back as page; null on the last page. Filter by brand, category, seller, free shipping, minimum rating, size and colour; each product also carries its brand_id. facets=true adds the site's filter groups with value ids and counts (brands, sizes, colours, ratings, categories and more) to find ids for these filters.
Every response includes credits_used: the credits this call cost.
Parameters
| name | type | description |
|---|---|---|
qrequired | string | Keywords, e.g. iphone. Example: iphone |
sort | relevance | price_asc | price_desc | best_seller | most_favourite | most_rated | newest | relevance (default), price_asc, price_desc, best_seller, most_favourite, most_rated, newest. |
price_min | string | Lowest price in lira. |
price_max | string | Highest price in lira. |
brand_id | string | Brand ids, comma separated (a product's brand_id, or facets Marka values). |
category_id | string | Category ids, comma separated (from facets Kategori values or a trendyol.com -x-c<id> link). |
seller_id | string | Seller ids, comma separated (a product's seller_id). |
free_shipping | boolean | true: only products with free shipping. |
rating_min | 1 | 2 | 3 | 4 | 4.5 | Minimum product rating: 1, 2, 3, 4 or 4.5. |
size | string | A size value id from facets (Beden), e.g. group-m. |
color_id | string | A colour value id from facets (Renk), e.g. 2 for beige. |
facets | boolean | true: add facets, the filter groups with value ids and counts. Costs an extra lookup. |
page | integer | Page number. Pass next_page from the previous response. |
Every endpoint also takes fresh, raw, fields (see lean responses and caching).
Example
curl "https://api.api.sh/trendyol/v1/search?q=iphone" \
-H "x-api-key: $APISH_KEY" import os, requests
res = requests.get(
"https://api.api.sh/trendyol/v1/search",
params={"q": "iphone"},
headers={"x-api-key": os.environ["APISH_KEY"]},
timeout=120,
)
res.raise_for_status()
data = res.json() const url = new URL("https://api.api.sh/trendyol/v1/search");
url.searchParams.set("q", "iphone");
const res = await fetch(url, { headers: { "x-api-key": process.env.APISH_KEY } });
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
const data = await res.json(); 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).