mpstats

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

MPSTATS API

MPSTATS API

MPSTATS is a Russian marketplace analytics platform with data on Wildberries, Ozon, and Yandex Market: product research, category analysis, seller/brand monitoring, SKU-level sales, stock, and review data.
Work through the ready-made shell scripts in
scripts/
— call them via the Bash tool instead of writing HTTP code. Reference files in
references/
are API contracts only.
MPSTATS是一款俄罗斯电商平台分析工具,涵盖Wildberries、Ozon和Yandex Market的数据:包括产品调研、品类分析、卖家/品牌监控、SKU级别的销售、库存及评论数据。
请通过
scripts/
目录下的现成Shell脚本进行操作——使用Bash工具调用它们,无需编写HTTP代码。
references/
目录下的参考文件仅为API契约。

Token setup

Token配置

Scripts auto-load the token from
config/.env
via
scripts/common.sh
. A per-command
MPSTATS_TOKEN
env var overrides the file.
Setup and where to get the token:
config/README.md
.
If the token is missing, offer the user exactly 2 options before continuing:
  1. User sends the token in chat → agent creates
    config/.env
    itself.
  2. User runs locally:
    cp config/.env.example config/.env
    and pastes the token into
    config/.env
    .
Token page: https://mpstats.io/userpanel (API token block). Requires an active MPSTATS subscription.
脚本会通过
scripts/common.sh
自动从
config/.env
加载Token。使用单个命令的
MPSTATS_TOKEN
环境变量可覆盖文件中的配置。
配置方法及Token获取位置:
config/README.md
如果缺少Token,在继续操作前需向用户提供以下2个明确选项:
  1. 用户在聊天中发送Token → Agent自动创建
    config/.env
    文件。
  2. 用户本地运行:
    cp config/.env.example config/.env
    并将Token粘贴到
    config/.env
    中。
Token页面:https://mpstats.io/userpanel (API token block)。需要有效MPSTATS订阅。

References

参考文档

API contracts (endpoints, params, response semantics) — read on demand:
  • references/auth.md
    — base URL, auth headers, response codes, rate limits
  • references/pagination-filter-sort.md
    — common request/response model for all POST endpoints
  • references/wb-categories.md
    ,
    references/wb-brands-sellers.md
    ,
    references/wb-similar-sku.md
    — Wildberries
  • references/ozon-categories.md
    ,
    references/ozon-brands-sellers-sku.md
    — Ozon
  • references/ym-categories.md
    — Yandex Market
  • references/account.md
    — API limits
  • references/coverage.md
    — what is wrapped by scripts vs. still uncovered
  • references/presentation.md
    — how to format analytical answers and brand-styled HTML/PDF reports
API契约(端点、参数、响应语义)——按需查阅:
  • references/auth.md
    —— 基础URL、认证头、响应码、请求频率限制
  • references/pagination-filter-sort.md
    —— 所有POST端点通用的请求/响应模型
  • references/wb-categories.md
    ,
    references/wb-brands-sellers.md
    ,
    references/wb-similar-sku.md
    —— Wildberries相关
  • references/ozon-categories.md
    ,
    references/ozon-brands-sellers-sku.md
    —— Ozon相关
  • references/ym-categories.md
    —— Yandex Market相关
  • references/account.md
    —— API限制
  • references/coverage.md
    —— 脚本已覆盖与未覆盖的功能
  • references/presentation.md
    —— 分析结果及品牌风格HTML/PDF报告的格式规范

Result formatting

结果格式

Lead with a concise conclusion, then evidence. Use compact tables for multi-entity results, charts for trends/segmentation/comparisons. Don't dump raw JSON unless asked — interpret what the numbers mean for the decision. For HTML/PDF reports follow the MPSTATS brand style in
references/presentation.md
.
先给出简洁结论,再附上依据。多实体结果使用紧凑表格,趋势/细分/对比分析使用图表。除非用户要求,否则不要直接输出原始JSON——要解读数据对决策的意义。HTML/PDF报告需遵循
references/presentation.md
中的MPSTATS品牌风格。

Sanity check — flag anomalies, never report blindly

合理性校验——标记异常,绝不盲目报告

MPSTATS data can contain outliers, seller errors, unit mismatches, and stale rows. Reporting them as fact misleads the user. Before presenting any number, sanity-check its magnitude.
Flag explicitly when you see:
  • Price far outside the category norm — e.g. napkins at 500 000 ₽ per item, a phone case at 50 ₽, a refrigerator at 200 ₽. Compare to the category median; if it's roughly >10× off, it is almost certainly a seller-side price error, a unit mismatch (pack vs piece), or a placeholder.
  • Implausible volumes — a small seller suddenly at 1 000 000 units/month; revenue without sales; revenue ≠ approximately
    price × units
    .
  • Zero / null / negative values where they shouldn't be — rating 0 on a SKU with reviews, stock = -5, "0 days since last sale" on an obviously inactive SKU.
  • Date / period weirdness — requested period ≠ returned period, gaps in by-date series, future-dated rows.
  • Unit mismatches — price per pack treated as price per piece; m² vs piece; liters vs ml.
How to flag, in this order:
  1. Show the anomalous row clearly, with the value called out (e.g. "500 000 ₽ за упаковку — похоже на ошибку ценника продавца").
  2. State your best guess at the cause (unit mismatch, seller error, stale data, placeholder).
  3. Either drop the row from aggregates (and say you did) or note that aggregates are skewed by it.
  4. Continue the analysis on cleaned data.
Do NOT silently drop or "round" anomalies. Do NOT report them as if they were real and let the user spot the absurdity. The conclusion must rely on cleaned data; the raw outlier is mentioned for transparency.
MPSTATS数据可能包含异常值、卖家错误、单位不匹配及过期数据。将此类数据如实报告会误导用户。在展示任何数据前,务必校验其合理性。
发现以下情况时需明确标记:
  • 价格远超品类常规范围 —— 例如纸巾单价500000卢布,手机壳50卢布,冰箱200卢布。与品类中位数对比;若偏差超过约10倍,几乎可以确定是卖家定价错误、单位不匹配(包装 vs 单件)或占位符。
  • 销量/收入不合理 —— 小卖家突然月销100万件;有收入无销量;收入与
    价格×销量
    数值严重不符。
  • 不应出现零/空/负值的字段 —— 有评论的SKU评分为0,库存=-5,明显 inactive 的SKU显示“距离上次销售0天”。
  • 日期/周期异常 —— 请求周期与返回周期不符,按日期统计的数据存在缺口,出现未来日期的记录。
  • 单位不匹配 —— 将包装单价当作单件单价;平方米 vs 件;升 vs 毫升。
标记步骤(按顺序):
  1. 清晰展示异常记录,并高亮异常值(例如:“500000卢布/包装——疑似卖家定价错误”)。
  2. 说明你对异常原因的最佳猜测(单位不匹配、卖家错误、过期数据、占位符)。
  3. 要么从汇总数据中移除该记录(并告知用户),要么注明汇总数据受其影响而失真。
  4. 使用清洗后的数据继续分析。
请勿默默删除或“修正”异常值。请勿将异常值当作真实数据报告,让用户自行发现问题。结论必须基于清洗后的数据;为保证透明度,需提及原始异常值。

Scripts

脚本

Ready-to-use shell scripts in
scripts/
. Call via the Bash tool, do not rewrite HTTP. Full catalog with per-script use-cases and routing guidance:
scripts/README.md
. Run any script with
--help
for parameters.
ScriptPurposeUsage
account/account-limits.sh
Check API quota remaining
./scripts/account/account-limits.sh
wb/wb-categories-list.sh
Full WB category tree
./scripts/wb/wb-categories-list.sh
wb/wb-category.sh
WB category products
./scripts/wb/wb-category.sh "Электроника/Смартфоны" 2024-01-01 2024-03-01
wb/wb-category-stats.sh
WB category breakdown (subcategories/brands/sellers/trends)
./scripts/wb/wb-category-stats.sh "Электроника" subcategories
wb/wb-sku.sh
WB SKU analytics (full/sales/balance/keywords/comments)
./scripts/wb/wb-sku.sh 152490541 sales
wb/wb-card-content.sh
WB card content (description, characteristics, dimensions) — uses WB CDN, not MPSTATS
./scripts/wb/wb-card-content.sh 290784358 .description
wb/wb-brand.sh
WB brand products or analytics
./scripts/wb/wb-brand.sh "Nike" products
wb/wb-seller.sh
WB seller products or analytics
./scripts/wb/wb-seller.sh 123456 products
wb/wb-search.sh
WB subjects/niches list for research
./scripts/wb/wb-search.sh
wb/wb-subject.sh
WB subject endpoints (
products
,
categories
,
brands
,
sellers
,
trends
,
by_date
,
price_segmentation
,
keywords
,
similar
,
geography
,
warehouses
)
./scripts/wb/wb-subject.sh 70 products
wb/wb-similar.sh
WB similar families (
identical
,
identical_wb
,
similar
,
in_similar
)
./scripts/wb/wb-similar.sh similar 72124874 products
wb/wb-analytics.sh
WB AI forecasts and season effects
./scripts/wb/wb-analytics.sh category forecast/daily "Женщинам/Платья и сарафаны"
wb/wb-warehouses.sh
WB warehouse distribution for brand/seller
./scripts/wb/wb-warehouses.sh brand "Mango"
wb/wb-compare.sh
WB period compare for category/brand/seller/subject
./scripts/wb/wb-compare.sh subject 70 2024-01-01 2024-01-15 2024-01-16 2024-01-31
ozon/ozon-categories-list.sh
Full Ozon category tree
./scripts/ozon/ozon-categories-list.sh
ozon/ozon-category.sh
Ozon category products or stats
./scripts/ozon/ozon-category.sh "Автотовары" products
ozon/ozon-sku.sh
Ozon SKU reports (
sales
,
by_day
,
balance
,
categories
,
keywords
,
full
,
by_period
,
search_stats
,
stores
,
comments
)
./scripts/ozon/ozon-sku.sh 123456789 keywords 2023-11-27 2023-12-26
ozon/ozon-brand.sh
Ozon brand products or analytics
./scripts/ozon/ozon-brand.sh "Samsung" categories
ozon/ozon-seller.sh
Ozon seller products or analytics by seller id or name
./scripts/ozon/ozon-seller.sh 987654 products
ozon/ozon-compare.sh
Ozon period compare for category/brand/seller
./scripts/ozon/ozon-compare.sh category "Автотовары/..." 2024-01-01 2024-01-15 2024-01-16 2024-01-31
ym/ym-category.sh
Yandex Market category products or stats
./scripts/ym/ym-category.sh "Электроника/Смартфоны"
ym/ym-brand.sh
Yandex Market brand products or analytics
./scripts/ym/ym-brand.sh "Samsung" categories
ym/ym-seller.sh
Yandex Market seller products or analytics
./scripts/ym/ym-seller.sh "Эльдорадо" products
ym/ym-sku.sh
Yandex Market item sales history with optional dates
./scripts/ym/ym-sku.sh 12345678 2024-01-01 2024-01-31
ym/ym-compare.sh
Yandex Market period compare for category/brand/seller
./scripts/ym/ym-compare.sh category "Электроника/Смартфоны" 2024-01-01 2024-01-15 2024-01-16 2024-01-31
request.sh
Universal raw API caller for any MPSTATS method/path
./scripts/request.sh POST subject/items 'path=70&d1=2024-01-01&d2=2024-01-31'
scripts/
目录下提供现成的Shell脚本。通过Bash工具调用,无需重写HTTP代码。包含各脚本使用场景和路由指南的完整目录:
scripts/README.md
。运行任意脚本时添加
--help
参数可查看参数说明。
脚本用途使用示例
account/account-limits.sh
查看剩余API配额
./scripts/account/account-limits.sh
wb/wb-categories-list.sh
获取完整WB品类树
./scripts/wb/wb-categories-list.sh
wb/wb-category.sh
获取WB品类下的商品
./scripts/wb/wb-category.sh "Электроника/Смартфоны" 2024-01-01 2024-03-01
wb/wb-category-stats.sh
WB品类细分分析(子品类/品牌/卖家/趋势)
./scripts/wb/wb-category-stats.sh "Электроника" subcategories
wb/wb-sku.sh
WB SKU分析(完整数据/销售/库存/关键词/评论)
./scripts/wb/wb-sku.sh 152490541 sales
wb/wb-card-content.sh
WB商品卡片内容(描述、参数、尺寸)——使用WB CDN,而非MPSTATS
./scripts/wb/wb-card-content.sh 290784358 .description
wb/wb-brand.sh
WB品牌商品或分析数据
./scripts/wb/wb-brand.sh "Nike" products
wb/wb-seller.sh
WB卖家商品或分析数据
./scripts/wb/wb-seller.sh 123456 products
wb/wb-search.sh
获取WB可研究的主题/细分领域列表
./scripts/wb/wb-search.sh
wb/wb-subject.sh
WB主题端点(
products
,
categories
,
brands
,
sellers
,
trends
,
by_date
,
price_segmentation
,
keywords
,
similar
,
geography
,
warehouses
./scripts/wb/wb-subject.sh 70 products
wb/wb-similar.sh
WB相似商品组(
identical
,
identical_wb
,
similar
,
in_similar
./scripts/wb/wb-similar.sh similar 72124874 products
wb/wb-analytics.sh
WB AI预测及季节影响分析
./scripts/wb/wb-analytics.sh category forecast/daily "Женщинам/Платья и сарафаны"
wb/wb-warehouses.sh
WB品牌/卖家的仓库分布
./scripts/wb/wb-warehouses.sh brand "Mango"
wb/wb-compare.sh
WB品类/品牌/卖家/主题的周期对比
./scripts/wb/wb-compare.sh subject 70 2024-01-01 2024-01-15 2024-01-16 2024-01-31
ozon/ozon-categories-list.sh
获取完整Ozon品类树
./scripts/ozon/ozon-categories-list.sh
ozon/ozon-category.sh
Ozon品类商品或统计数据
./scripts/ozon/ozon-category.sh "Автотовары" products
ozon/ozon-sku.sh
Ozon SKU报告(
sales
,
by_day
,
balance
,
categories
,
keywords
,
full
,
by_period
,
search_stats
,
stores
,
comments
./scripts/ozon/ozon-sku.sh 123456789 keywords 2023-11-27 2023-12-26
ozon/ozon-brand.sh
Ozon品牌商品或分析数据
./scripts/ozon/ozon-brand.sh "Samsung" categories
ozon/ozon-seller.sh
通过卖家ID或名称获取Ozon卖家商品或分析数据
./scripts/ozon/ozon-seller.sh 987654 products
ozon/ozon-compare.sh
Ozon品类/品牌/卖家的周期对比
./scripts/ozon/ozon-compare.sh category "Автотовары/..." 2024-01-01 2024-01-15 2024-01-16 2024-01-31
ym/ym-category.sh
Yandex Market品类商品或统计数据
./scripts/ym/ym-category.sh "Электроника/Смартфоны"
ym/ym-brand.sh
Yandex Market品牌商品或分析数据
./scripts/ym/ym-brand.sh "Samsung" categories
ym/ym-seller.sh
Yandex Market卖家商品或分析数据
./scripts/ym/ym-seller.sh "Эльдорадо" products
ym/ym-sku.sh
Yandex Market商品销售历史(可指定日期)
./scripts/ym/ym-sku.sh 12345678 2024-01-01 2024-01-31
ym/ym-compare.sh
Yandex Market品类/品牌/卖家的周期对比
./scripts/ym/ym-compare.sh category "Электроника/Смартфоны" 2024-01-01 2024-01-15 2024-01-16 2024-01-31
request.sh
通用原始API调用工具,支持任意MPSTATS方法/路径
./scripts/request.sh POST subject/items 'path=70&d1=2024-01-01&d2=2024-01-31'