Skip to main content
Glama

SocialDataX 小红书 Xiaohongshu XHS RedNote MCP

xhs_search_products

Read-only

搜索小红书商品。用户需要按搜索词查找商品时使用;已有完整 sku_id(包括用户直接提供)时使用商品详情或商品评价工具,已有商品链接或分享文案时使用 xhs_get_product_detail_by_url;支持 page_token 翻页。继续翻页时必须将返回的完整 next_page_token 原样作为 page_token 传回,不得截断、缩写、掩码或用省略号替换中间内容。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keywordYes搜索词,可传商品名、品牌名、品类或商品需求;不要传商品链接、sku_id、spu_id 或 page_token。
page_tokenNo商品搜索分页令牌。首次请求留空;继续翻页时必须将上一页返回的完整 next_page_token 原样作为 page_token 传回。page_token 只能用于同一商品关键词和调用方的商品搜索链路;不得修改、截断、缩写、脱敏、掩码、省略、规范化、重组或自行生成,不得用省略号替换中间内容。

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
itemsYes商品搜索结果列表
pointsYes本次成功调用的积分消耗与调用完成时的账户积分余额。
next_page_tokenYes下一页不透明商品搜索分页令牌;为空表示没有更多结果或当前无法继续翻页。继续翻页时必须将返回的完整 next_page_token 原样作为 page_token 传回。next_page_token 只能用于同一商品关键词和调用方的商品搜索链路;不得修改、截断、缩写、脱敏、掩码、省略、规范化、重组或自行生成,不得用省略号替换中间内容。

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed14 schema fields changed
    • changedOutput schema / properties / items / items / properties / coupon_price / description
      Previous value: -"商品列表展示券后价格,单位:元;不保证是最终实付价"New value: +"商品列表展示券后/成交价格,单位:元;没有独立券后金额时与 price 相同;不保证是最终实付价"
    • addedOutput schema / properties / items / items / properties / description / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedOutput schema / properties / items / items / properties / description / description
      Previous value: -"商品搜索展示描述;可能与标题重复或包含规格信息,不保证是完整详情描述"New value: +"商品搜索展示描述;可能与标题重复或包含规格信息,不保证是完整详情描述;无法确认时为 null"
    • removedOutput schema / properties / items / items / properties / description / type
      Removed value: -"string"
    • addedOutput schema / properties / items / items / properties / purchasable / anyOf
      Added value: +[
      +  {
      +    "type": "boolean"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedOutput schema / properties / items / items / properties / purchasable / description
      Previous value: -"是否可购买"New value: +"是否可购买;无法确认时为 null,不代表不可购买"
    • removedOutput schema / properties / items / items / properties / purchasable / type
      Removed value: -"boolean"
    • changedOutput schema / properties / items / items / properties / sold_count / description
      Previous value: -"已售数量;平台以带“+”的万级文本展示时转换为对应整数下限(如“已售1万+”返回 10000、“已售1.2万+”返回 12000),不是精确销量,须结合 sales_text 解读;缺失或无法解析时为 null,不代表零销量;0 表示明确已售 0。"New value: +"已售数量;平台以带“+”的千级或万级文本展示时转换为对应整数下限(如“90.2k+ sold”返回 90200、“已售1.2万+”返回 12000),不是精确销量,须结合 sales_text 解读;缺失或无法解析时为 null,不代表零销量;0 表示明确已售 0。"
    • addedOutput schema / properties / items / items / properties / spu_id / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedOutput schema / properties / items / items / properties / spu_id / description
      Previous value: -"商品 SPU ID;不要作为商品详情接口入参,也不要作为商品评价接口入参"New value: +"商品 SPU ID;不要作为商品详情接口入参,也不要作为商品评价接口入参;无法确认时为 null"
    • removedOutput schema / properties / items / items / properties / spu_id / type
      Removed value: -"string"
    • addedOutput schema / properties / items / items / properties / stock_quantity / anyOf
      Added value: +[
      +  {
      +    "type": "integer"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedOutput schema / properties / items / items / properties / stock_quantity / description
      Previous value: -"库存数量"New value: +"库存数量;无法确认时为 null,不代表库存为 0"
    • removedOutput schema / properties / items / items / properties / stock_quantity / type
      Removed value: -"integer"
  2. Changed7 schema fields changed
    • changedOutput schema / properties / items / items / properties / coupon_price / description
      Previous value: -"券后价格,单位:元"New value: +"商品列表展示券后价格,单位:元;不保证是最终实付价"
    • changedOutput schema / properties / items / items / properties / price / description
      Previous value: -"商品列表展示销售价,单位:元"New value: +"商品列表展示销售价,单位:元;与商品详情的原价口径不同,不保证是最终实付价"
    • addedOutput schema / properties / items / items / properties / sales_text
      Added value: +{
      +  "description": "平台展示的商品销量文本;没有时为空字符串。带“+”的数量表示下限,不是精确销量;结合 sold_count 解读。",
      +  "type": "string"
      +}
    • addedOutput schema / properties / items / items / properties / sold_count / anyOf
      Added value: +[
      +  {
      +    "type": "integer"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedOutput schema / properties / items / items / properties / sold_count / description
      Previous value: -"已售数量;平台以带“+”的万级文本展示时转换为对应整数下限(如“已售1万+”返回 10000、“已售1.2万+”返回 12000),无法解析时为 0"New value: +"已售数量;平台以带“+”的万级文本展示时转换为对应整数下限(如“已售1万+”返回 10000、“已售1.2万+”返回 12000),不是精确销量,须结合 sales_text 解读;缺失或无法解析时为 null,不代表零销量;0 表示明确已售 0。"
    • removedOutput schema / properties / items / items / properties / sold_count / type
      Removed value: -"integer"
    • changedOutput schema / properties / items / items / required
      Previous value: -[
      -  "sku_id",
      -  "spu_id",
      -  "title",
      -  "description",
      -  "image_url",
      -  "price",
      -  "coupon_price",
      -  "shop_id",
      -  "shop_name",
      -  "shop_avatar_url",
      -  "stock_quantity",
      -  "purchasable",
      -  "sold_count"
      -]New value: +[
      +  "sku_id",
      +  "spu_id",
      +  "title",
      +  "description",
      +  "image_url",
      +  "price",
      +  "coupon_price",
      +  "shop_id",
      +  "shop_name",
      +  "shop_avatar_url",
      +  "stock_quantity",
      +  "purchasable",
      +  "sold_count",
      +  "sales_text"
      +]
  3. Changed7 schema fields changed
    • removedOutput schema / properties / items / items / properties / seller_avatar_url
      Removed value: -{
      -  "description": "店铺头像链接",
      -  "type": "string"
      -}
    • removedOutput schema / properties / items / items / properties / seller_id
      Removed value: -{
      -  "description": "卖家/店铺 ID",
      -  "type": "string"
      -}
    • removedOutput schema / properties / items / items / properties / seller_name
      Removed value: -{
      -  "description": "店铺名称",
      -  "type": "string"
      -}
    • addedOutput schema / properties / items / items / properties / shop_avatar_url
      Added value: +{
      +  "description": "店铺头像链接",
      +  "type": "string"
      +}
    • addedOutput schema / properties / items / items / properties / shop_id
      Added value: +{
      +  "description": "店铺 ID",
      +  "type": "string"
      +}
    • addedOutput schema / properties / items / items / properties / shop_name
      Added value: +{
      +  "description": "店铺名称",
      +  "type": "string"
      +}
    • changedOutput schema / properties / items / items / required
      Previous value: -[
      -  "sku_id",
      -  "spu_id",
      -  "title",
      -  "description",
      -  "image_url",
      -  "price",
      -  "coupon_price",
      -  "seller_id",
      -  "seller_name",
      -  "seller_avatar_url",
      -  "stock_quantity",
      -  "purchasable",
      -  "sold_count"
      -]New value: +[
      +  "sku_id",
      +  "spu_id",
      +  "title",
      +  "description",
      +  "image_url",
      +  "price",
      +  "coupon_price",
      +  "shop_id",
      +  "shop_name",
      +  "shop_avatar_url",
      +  "stock_quantity",
      +  "purchasable",
      +  "sold_count"
      +]
  4. Changed1 schema field changed
    • changedInput schema / properties / keyword / description
      Previous value: -"小红书商品搜索自然语言关键词;keyword 只传商品名、品牌名、品类或购买/研究需求;不要传商品链接、sku_id、spu_id 或 page_token 作为 keyword。"New value: +"搜索词,可传商品名、品牌名、品类或商品需求;不要传商品链接、sku_id、spu_id 或 page_token。"
  5. Changed4 schema fields changed
    • changedOutput schema / properties / items / items / properties / coupon_price / description
      Previous value: -"券后价格"New value: +"券后价格,单位:元"
    • changedOutput schema / properties / items / items / properties / description / description
      Previous value: -"商品描述"New value: +"商品搜索展示描述;可能与标题重复或包含规格信息,不保证是完整详情描述"
    • changedOutput schema / properties / items / items / properties / price / description
      Previous value: -"商品价格"New value: +"商品列表展示销售价,单位:元"
    • changedOutput schema / properties / items / items / properties / sold_count / description
      Previous value: -"已售数量"New value: +"已售数量;平台以带“+”的万级文本展示时转换为对应整数下限(如“已售1万+”返回 10000、“已售1.2万+”返回 12000),无法解析时为 0"
  6. Changed2 schema fields changed
    • addedOutput schema / properties / points
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "本次成功调用的积分消耗与调用完成时的账户积分余额。",
      +  "properties": {
      +    "balance": {
      +      "description": "本次接口完成时看到的当前积分余额。",
      +      "minimum": 0,
      +      "type": "integer"
      +    },
      +    "cost": {
      +      "description": "本次请求最终确认消耗的积分。",
      +      "minimum": 0,
      +      "type": "integer"
      +    }
      +  },
      +  "required": [
      +    "cost",
      +    "balance"
      +  ],
      +  "type": "object"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "items",
      -  "next_page_token"
      -]New value: +[
      +  "items",
      +  "next_page_token",
      +  "points"
      +]
  7. Changed1 schema field changed
    • changedInput schema / properties / keyword / description
      Previous value: -"小红书商品搜索关键词"New value: +"小红书商品搜索自然语言关键词;keyword 只传商品名、品牌名、品类或购买/研究需求;不要传商品链接、sku_id、spu_id 或 page_token 作为 keyword。"
  8. Changed2 schema fields changed
    • changedOutput schema / properties / items / items / properties / sku_id / description
      Previous value: -"商品 SKU ID;可用于商品详情接口"New value: +"商品 SKU ID;可用于商品详情接口,也可用于商品评价接口"
    • changedOutput schema / properties / items / items / properties / spu_id / description
      Previous value: -"商品 SPU ID;不要作为商品详情接口入参"New value: +"商品 SPU ID;不要作为商品详情接口入参,也不要作为商品评价接口入参"
  9. Changed5 schema fields changed
    • changedInput schema / properties / page_token / description
      Previous value: -"商品搜索分页令牌。首次请求留空;继续翻页时传入上一页返回的 完整 next_page_token 原样作为 page_token 传回。page_token 只能用于同一商品关键词和调用方的商品搜索链路;不得修改、截断、缩写、脱敏、掩码、省略、规范化、重组或自行生成。"New value: +"商品搜索分页令牌。首次请求留空;继续翻页时必须将上一页返回的完整 next_page_token 原样作为 page_token 传回。page_token 只能用于同一商品关键词和调用方的商品搜索链路;不得修改、截断、缩写、脱敏、掩码、省略、规范化、重组或自行生成,不得用省略号替换中间内容。"
    • changedOutput schema / properties / items / items / properties / seller_id / description
      Previous value: -"卖家 ID"New value: +"卖家/店铺 ID"
    • changedOutput schema / properties / items / items / properties / sku_id / description
      Previous value: -"商品 SKU ID"New value: +"商品 SKU ID;可用于商品详情接口"
    • changedOutput schema / properties / items / items / properties / spu_id / description
      Previous value: -"商品 SPU ID"New value: +"商品 SPU ID;不要作为商品详情接口入参"
    • changedOutput schema / properties / next_page_token / description
      Previous value: -"下一页不透明分页令牌;为空表示没有更多结果"New value: +"下一页不透明商品搜索分页令牌;为空表示没有更多结果或当前无法继续翻页。继续翻页时必须将返回的完整 next_page_token 原样作为 page_token 传回。next_page_token 只能用于同一商品关键词和调用方的商品搜索链路;不得修改、截断、缩写、脱敏、掩码、省略、规范化、重组或自行生成,不得用省略号替换中间内容。"
  10. Added

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already mark this as read-only and open-world, so no contradiction exists. Beyond that, the description adds important behavioral constraints around page_token handling: the full next_page_token must be passed back unchanged, with explicit prohibitions against truncation, abbreviation, masking, or replacing content with ellipsis. This is valuable behavioral context for the agent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the core purpose and usage condition before moving to token-handling warnings. It is somewhat repetitive with the schema's page_token constraints, but it remains readable and each sentence earns its place in guiding tool selection and correct invocation.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is simple with only two parameters, one of which is optional, and an output schema is present. The description covers when to use it, when to prefer alternatives, and the critical pagination behavior, so an agent has everything needed to call it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, and the schema already thoroughly documents both keyword and page_token, including the exact-copy requirement and what must not be passed. The description essentially repeats this rather than adding new parameter meaning, so the baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and resource ('搜索小红书商品' – search Xiaohongshu products) and immediately states the primary use case: finding products by search term. It distinguishes itself from siblings by explicitly routing sku_id cases to product detail/review tools and link/share-text cases to xhs_get_product_detail_by_url.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives explicit when-to-use guidance: use when the user needs to find products by search word. It also names alternatives for complete sku_id and for product links/share text, and it explains pagination usage. This leaves little ambiguity about tool selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources