Market NinjaMarket Ninja
Workflows

Categories

Listing one marketplace's categories and pulling a category's full assortment via the category filter

Listing categories

GET /categories returns a list of distinct category_path values for one marketplace, with a product count for each. Unlike GET /brands, marketplace is required here — category taxonomies differ per marketplace, so an unscoped list would mix unrelated hierarchies together.

GET /categories and GET /brands don't count against your daily data quota — only the per-minute rate limit. They're lookup endpoints for navigation, not a data export, so call them freely without worrying about your remaining quota.
curl -G -H "Authorization: Bearer mn_live_..." \
  "https://data.marketninja.ru/v1/categories" \
  --data-urlencode "marketplace=wildberries"
{
  "data": [
    { "category_path": [], "product_count": 11197 },
    { "category_path": ["Зоотовары", "Фермерство"], "product_count": 455 },
    { "category_path": ["Обувь", "Мужская", "Кеды и кроссовки"], "product_count": 37 }
  ]
}
An empty category_path: [] in the response means products with no category at all, not the root of the hierarchy. Don't drop this row automatically if you're summing up product counts across categories.

Getting a category's assortment

Use the resulting category_path as the category filter on GET /products — it matches by containment, at any level of the hierarchy, not just the last segment:

curl -G -H "Authorization: Bearer mn_live_..." \
  "https://data.marketninja.ru/v1/products" \
  --data-urlencode "marketplace=wildberries" \
  --data-urlencode "category=Обувь" \
  --data-urlencode "page_size=100"

Обувь matches both ["Обувь", "Мужская", "Кеды и кроссовки"] and ["Обувь", "Женская", "Туфли и лоферы"], and any other branch where "Обувь" appears at any level — handy when you want an entire top-level section without enumerating every subcategory individually. To get one specific branch only, pass a more specific path, e.g. Кеды и кроссовки.

category is a containment filter, not an exact match on the whole path. If the dataset has both ["Обувь"] and ["Спорт", "Обувь для бега"], both match category=Обувь. If you need exactly one branch, use its most specific (last) segment — it overlaps less with unrelated ones.

Paginating a large category

For top-level categories with thousands of products, page through with the maximum page_size — the same pattern used for a full dataset export, see Bulk export.

You can narrow the same query by a specific brand too — add brand to the same request, or find a brand's entire assortment directly, see Brands.

Last updated on

On this page