Magento shop product search
Products of any Magento 2 / Adobe Commerce shop (the whole catalog when no words or filters are given): search words, category, price range, SKU and any filterable attribute of the shop, with the shop's sorts. Each product has its name, SKU, type, link, price, regular price, discount, maximum price, stock status and only-left count, rating, review count, image, categories and short description. The response also lists the shop's facets with counts (attribute codes and values to pass back in filter) and its sort options.
Every response includes credits_used: the credits this call cost.
Parameters
| name | type | description |
|---|---|---|
storerequired | string | The shop's domain (any Magento 2 / Adobe Commerce shop with its public GraphQL API). Example: www.coxandcox.co.uk |
q | string | Search words (or use a filter). Example: lamp |
category_uid | string | Category uids, comma separated (from facets or /magento/v1/categories). |
category_id | string | Category ids, comma separated. |
min_price | number | Lowest price. |
max_price | number | Highest price. |
sku | string | SKUs, comma separated. |
filter | string | Attribute filters from the facets as code:value,value; separated by semicolons, e.g. color:49,50;size:167. |
sort | string | relevance, price_asc, price_desc, name_asc, name_desc, position, newest, or attribute:ASC|DESC from sort_options. A sort the shop does not offer is ignored (sort_ignored: true). Example: price_asc |
limit | integer | Products per page, 1-100 (default 24). Example: 24 |
page | integer | Page number (default 1). next_page is null on the last page. Example: 1 |
Every endpoint also takes fresh, raw, fields (see lean responses and caching).
Example
curl "https://api.api.sh/magento/v1/products?store=www.coxandcox.co.uk" \
-H "x-api-key: $APISH_KEY" import os, requests
res = requests.get(
"https://api.api.sh/magento/v1/products",
params={"store": "www.coxandcox.co.uk"},
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/magento/v1/products");
url.searchParams.set("store", "www.coxandcox.co.uk");
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).