文档

亚马逊-店铺定价

试用

选定亚马逊卖家店铺后,按 ASIN/SKU 单条或批量拉取 SP-API Product Pricing 报价、竞争摘要与 FOEP 数据。

它能做什么

本 skill 封装 Amazon SP-API Product Pricing 接口,统一通过 `POST /spApi/developerProxy` 转发。覆盖 v0 的 getPricing、getCompetitivePricing、getListingOffers、getItemOffers、getItemOffersBatch、getListingOffersBatch,以及 2022-05-01 的 getFeaturedOfferExpectedPriceBatch(FOEP)、getCompetitiveSummary,每个操作对应 `scripts/` 下的一条 Python 脚本。必须依赖同系列的 `linkfox-amazon-store-auth` 完成 sellerId 与 region 选店,禁止在本 skill 内绕过授权逻辑。完整响应落盘到 `/linkfox/{sessionId}/data/{taskName}.json` 并打印到 stdout,超过 8 KB 时仅输出字段摘要。批量接口默认 1–20 条/次,FOEP 最多 40 条;2022-05-01 批量约 0.033 req/s,注意 429 限流。

什么时候用它

  • 查询单个 SKU 的当前售价与竞争参考价
  • 一次批量拉取最多 20 个 ASIN 的 item offers
  • 按 segment 批量计算 Featured Offer 期望价(FOEP)
  • 为指定 ASIN 生成竞争摘要报告

技能文档

Amazon 店铺 Product Pricing

本 skill 与 linkfox-amazon-store-authlinkfox-amazon-store-reportlinkfox-amazon-store-listings 同属 Amazon Store 系列:依赖 linkfox-amazon-store-auth 选店(sellerId+region);直接 POST /spApi/developerProxy 传入 sellerId+region,由服务端解析 token(勿传 amzAccessToken,除非兼容旧调用)。转发上游 GETPOST

调用方式

  • API 端点POST /spApi/developerProxy(不同操作通过请求体区分;完整参数/响应/错误码见 references/api.md
  • Python 脚本python scripts/<脚本名>.py '' [--inline](可用脚本见上文脚本一览)
  • 成本约束:本工具会消耗积分;失败/空结果不得自动换关键词、翻页或连续试探;需要继续检索时先向用户说明会产生额外消耗。

输出策略(脚本默认行为)

  • 始终将完整响应写入 /linkfox///data/-.json 为脚本执行时的工作目录,在 Claude Code 里即当前项目目录; 取自环境变量 SESSION_ID,按用户任务自动聚合;禁止写入 /tmp,当前目录不可写则报错)
  • 响应体 ≤ 8 KB:落盘后把完整 JSON 打印到 stdout
  • 响应体 > 8 KB:落盘后 stdout 只输出摘要(顶层字段、常见计数如 total/costToken、最大列表字段的长度 + 前 3 条样本)
  • --inline 强制全量打印到 stdout(同样落盘)

读数据建议:先看摘要判断是否足够;需要具体字段时优先用 jqConvertFrom-JsonConvertFrom-Json 从保存的 json 文件按需抽取,避免整份 JSON 进入上下文。

解决认证和积分问题

发生以下异常情况时,采用 references/onboarding.md 引导解决问题:

异常情况

  • 未配置API Key:环境变量未配置 LINKFOX_AGENT_API_KEY,也未配置 LINKFOXAGENT_API_KEY
  • 响应401或402状态码
  • 响应提示积分或余额不足:消息含"积分余额不足/计费不足/余额不足/quota exceeded/insufficient balance/套餐到期/需充值/请充值",或类似含义的内容。

官方参考索引

能力文档
getPricinggetPricing
getCompetitivePricinggetCompetitivePricing
getListingOffersgetListingOffers
getItemOffersgetItemOffers
getItemOffersBatchgetItemOffersBatch
getListingOffersBatchgetListingOffersBatch
getFeaturedOfferExpectedPriceBatchgetFeaturedOfferExpectedPriceBatch
getCompetitiveSummarygetCompetitiveSummary

Prerequisites(必须先读)

本 skill 依赖 linkfox-amazon-store-auth

  1. 运行 python scripts/check_auth_dependency.py;若 exit code 42 且 stderr 含 DEPENDENCY_MISSING:,请先安装 linkfox-amazon-store-auth
  2. 不要在本 skill 内绕过依赖实现授权或令牌逻辑。

Current Capabilities(脚本一览)

能力developerProxy path(要点)脚本
getPricingproducts/pricing/v0/price + Queryget_pricing.py
getCompetitivePricingproducts/pricing/v0/competitivePrice + Queryget_competitive_pricing.py
getListingOffersproducts/pricing/v0/listings/{sku}/offers + Queryget_listing_offers.py
getItemOffersproducts/pricing/v0/items/{asin}/offers + Queryget_item_offers.py
getItemOffersBatchbatches/products/pricing/v0/itemOffers,POST JSON bodypost_item_offers_batch.py
getListingOffersBatchbatches/products/pricing/v0/listingOffers,POST JSON bodypost_listing_offers_batch.py
getFeaturedOfferExpectedPriceBatchbatches/products/pricing/2022-05-01/offer/featuredOfferExpectedPrice,POSTpost_featured_offer_expected_price_batch.py
getCompetitiveSummarybatches/products/pricing/2022-05-01/items/competitiveSummary,POSTpost_competitive_summary_batch.py

批量脚本(post_*_batch.py)在默认模式下会按 Amazon 要求组装子请求;高级用法可设 useAmazonRequestShape: true,直接传 requests 为官方原始数组(仍受条数上限约束)。共享逻辑见 scripts/_spapi_pricing_common.py(仅供同目录脚本 import,非独立 CLI)。


Quick Parameters(摘要)

  • getPricing / getCompetitivePricingsellerIdregionmarketplaceId(或 marketplaceIds 取首)、itemTypeasinsskus(≤20);getPricing 另有 itemConditionofferType;getCompetitivePricing 另有 customerType
  • getListingOffers / getItemOfferssku+path 或 asin+path;itemCondition 必填;可选 customerType
  • Item / Listing Offers Batchrequests 数组,默认每项为简化对象(见 references/api.md);1~20 条(FOEP 批量脚本为 最多 40 条)。
  • getCompetitiveSummary 批量:每项需 asinmarketplaceIdincludedData(非空字符串数组);可选 lowestPricedOffersInputs
  • getFeaturedOfferExpectedPriceBatch:每项需 marketplaceIdskusegment(对象,结构以官方为准)。

Scripts

  • get_pricing.py · get_competitive_pricing.py · get_listing_offers.py · get_item_offers.py
  • post_item_offers_batch.py · post_listing_offers_batch.py · post_featured_offer_expected_price_batch.py · post_competitive_summary_batch.py
  • check_auth_dependency.py · _spapi_pricing_common.py(内部模块)
export LINKFOXAGENT_API_KEY=""

python scripts/get_item_offers.py '{"sellerId":"A1...","region":"NA","asin":"B0...","marketplaceId":"ATVPDKIKX0DER","itemCondition":"New"}'

python scripts/post_item_offers_batch.py '{"sellerId":"A1...","region":"NA","requests":[{"asin":"B0...","marketplaceId":"ATVPDKIKX0DER","itemCondition":"New"}]}'

Display Rules

  1. MarketplaceId(单数)与 Listings 的 marketplaceIds 勿混用。
  2. 先看网关 errcode / httpStatus,再解析各脚本对应的解析字段(如 itemOffersitemOffersBatchcompetitiveSummary 等)。
  3. POST 类接口:stdout 中含 requestBody(脚本组装的 Amazon 请求体),便于排查。
  4. 白名单:除 products/pricing/... 外,批量路径以 batches/products/pricing/... 开头;1005 时需后端放行对应前缀。
  5. 各接口 Usage plan 不同(尤其 2022-05-01 批量约 0.033 req/s),注意 429

Important Limitations

  • 权限:Product Pricing 及相关角色;部分 2022-05-01 能力可能另有应用内配置要求,以 Amazon 为准。
  • FOEP 批量segment 须符合官方模型;条数上限脚本按 40 校验(与文档「up to 40」一致)。
  • 返回结构以 Amazon schema 为准;详见 references/api.md

积分消耗规则

不消耗积分。

Feedback:references/api.mdskillNamelinkfox-amazon-store-pricing


更多跨境 skill:LinkFox Skills

相关技能

通过 /spApi/developerProxy 调用 SP-API Orders,覆盖 v2026-01-01 与 v0 的查询、发货与管制订单接口。

14 次安装

亚马逊店铺商品目录 Catalog(与 linkfox-amazon-store-auth / report / listings / pricing / orders / feeds 同系列),经 /spApi/developerProxy 调用 SP-API Catalog Items:v0 listCatalogCategories;v2022-04-01(默认)或 v2020-12-01 的 searchCatalogItems、getCatalogItem。当用户提到亚马逊目录、Catalog Items、listCatalogCategories、searchCatalogItems、getCatalogItem、按 ASIN 查目录、关键词搜商品目录、类目节点、includedData、summaries/images 时触发。

14 次安装

通过统一代理端点调用亚马逊 SP-API 的 Listings、Restrictions 与 Product Type Definitions。

14 次安装

亚马逊店铺 Feeds(与 linkfox-amazon-store-auth / report / listings / pricing / orders 同系列),经 /spApi/developerProxy 调用 SP-API Feeds v2021-06-30:createFeedDocument、getFeedDocument、createFeed、getFeed、getFeeds、cancelFeed;另含 upload_feed_document 向预签名 URL 上传内容。当用户提到亚马逊 Feed、提交库存/Listing Feed、POST_FLAT_FILE、feedType、feedDocumentId、feedId、取消 Feed、查询 Feed 处理状态、Feeds API、SP-API 上传文件 时触发。

14 次安装

亚马逊店铺 Fulfillment by Amazon(FBA)系列(与 linkfox-amazon-store-auth 同系列),经 /spApi/developerProxy 调用 SP-API:FBA Inbound Eligibility(getItemEligibilityPreview)、FBA Inventory(getInventorySummaries/createInventoryItem/deleteInventoryItem/addInventory)、Fulfillment Inbound v2024-03-20(InboundPlan/装箱/放置/运输/货件等)与 v0(prepInstructions/labels/BOL/shipments)、Fulfillment Outbound 2020-07-01(MCF 履约单/预览/退货/tracking/features)。当用户提到 FBA、入仓资格、Inbound Eligibility、FBA 库存摘要、Send to Amazon、Inbound Plan、FBA 货件、MCF、多渠道履约、getItemEligibilityPreview、getInventorySummaries、createInboundPlan、createFulfillmentOrder 时触发。与 External Fulfillment / 普通 Orders 不同。

1 次安装

亚马逊店铺买家反馈洞察(与 linkfox-amazon-store-auth 等同系列),经 /spApi/developerProxy 调用 SP-API Customer Feedback v2024-06-01:getItemReviewTopics、getItemBrowseNode、getBrowseNodeReviewTopics、getItemReviewTrends、getBrowseNodeReviewTrends、getBrowseNodeReturnTopics、getBrowseNodeReturnTrends。当用户提到评论主题、评价趋势、退货主题、browse node 反馈、Customer Feedback API、MENTIONS、STAR_RATING_IMPACT、ASIN 评论洞察、类目节点评价 时触发。

14 次安装