WooCommerce shop product search
Products of any WooCommerce shop with every filter its Store API takes: words, category, tag, brand, attribute terms, price range, on sale, featured, stock status, star rating, product type, SKU and ids, and every sort. Each product has its name, link, type, SKU, price, regular and sale price, price range, currency, discount, rating, review count, stock status and low-stock count, short and full description, images, categories, tags, brands, attributes with terms, variation ids, weight and dimensions. total and total_pages come from the shop.
Every response includes credits_used: the credits this call cost.
Parameters
| name | type | description |
|---|---|---|
storerequired | string | The shop's domain (any WooCommerce shop with its public Store API), e.g. porterandyork.com. Example: porterandyork.com |
q | string | Search words. Example: steak |
category | string | Category ids or slugs, comma separated (see /woocommerce/v1/categories). |
category_operator | in | not_in | and | How several categories combine: in (default), not_in or and. |
tag | string | Tag ids or slugs, comma separated (see /woocommerce/v1/filters). |
tag_operator | in | not_in | and | in, not_in or and. |
brand | string | Brand ids or slugs, comma separated, on shops that use brands. |
attribute | string | Attribute filters as taxonomy:term,term; separated by semicolons, e.g. pa_color:red,blue;pa_size:large (terms by slug or id; see /woocommerce/v1/filters). |
attribute_relation | and | or | and (default) or or between attribute filters. |
min_price | number | Lowest price in the shop's currency. |
max_price | number | Highest price in the shop's currency. |
on_sale | boolean | true for products on sale only. |
featured | boolean | true for featured products only. |
stock_status | string | instock, outofstock or onbackorder, comma separated. |
rating | string | Average star ratings to include (1-5), comma separated. |
type | simple | grouped | external | variable | variation | Product type. |
sku | string | SKUs, comma separated. |
ids | string | Product ids, comma separated. |
sort | relevance | newest | oldest | price_asc | price_desc | popularity | rating | title_asc | title_desc | menu_order | modified | Sort order. Example: price_desc |
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/woocommerce/v1/products?store=porterandyork.com" \
-H "x-api-key: $APISH_KEY" import os, requests
res = requests.get(
"https://api.api.sh/woocommerce/v1/products",
params={"store": "porterandyork.com"},
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/woocommerce/v1/products");
url.searchParams.set("store", "porterandyork.com");
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).