api-config.json 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. {
  2. "name": "category-products",
  3. "displayName": "Amazon 类目产品查询",
  4. "description": "根据类目 ID 获取该类目下的产品列表。用于获取品类 Top 产品、分析品类竞争格局、统计品牌分布和中国卖家占比。",
  5. "category": "voc",
  6. "version": "1.1.0",
  7. "endpoint": {
  8. "method": "POST",
  9. "url": "https://server.fmode.cn/api/voc/forward",
  10. "headers": {
  11. "Content-Type": "application/json",
  12. "Authorization": "Bearer r:858b3ee92314d5447d1fc3cdc10462d7"
  13. }
  14. },
  15. "parameters": {
  16. "type": "object",
  17. "required": [
  18. "NodeId"
  19. ],
  20. "properties": {
  21. "NodeId": {
  22. "type": "string",
  23. "description": "Amazon 类目节点 ID,可通过 category_tree 接口获取"
  24. },
  25. "domain": {
  26. "type": "integer",
  27. "description": "Amazon 站点 ID: 1=amazon.com",
  28. "default": 1
  29. }
  30. }
  31. },
  32. "requestTransform": {
  33. "template": {
  34. "path": "/api/CategoryProducts",
  35. "method": "POST",
  36. "query": {
  37. "domain": "{{domain}}"
  38. },
  39. "body": {
  40. "NodeId": "{{NodeId}}"
  41. }
  42. }
  43. },
  44. "response": {
  45. "type": "array",
  46. "description": "类目下的产品列表",
  47. "items": {
  48. "type": "object",
  49. "properties": {
  50. "Asin": {
  51. "type": "string",
  52. "description": "产品 ASIN"
  53. },
  54. "Title": {
  55. "type": "string",
  56. "description": "产品标题"
  57. },
  58. "Price": {
  59. "type": "number",
  60. "description": "售价"
  61. },
  62. "Rating": {
  63. "type": "number",
  64. "description": "评分"
  65. },
  66. "RatingsCount": {
  67. "type": "integer",
  68. "description": "评论数"
  69. },
  70. "BSR": {
  71. "type": "integer",
  72. "description": "BSR 排名"
  73. },
  74. "Brand": {
  75. "type": "string",
  76. "description": "品牌"
  77. }
  78. }
  79. }
  80. },
  81. "relatedSkills": [
  82. "category_tree"
  83. ],
  84. "usageExamples": [
  85. {
  86. "name": "获取类目产品列表",
  87. "input": {
  88. "NodeId": "3734931",
  89. "domain": 1
  90. },
  91. "description": "获取指定类目下的产品列表"
  92. }
  93. ],
  94. "reportMapping": {
  95. "slides": [
  96. "市场全景(Slide3)"
  97. ],
  98. "dataPoints": [
  99. "品类产品列表",
  100. "品牌分布",
  101. "价格带分析"
  102. ]
  103. },
  104. "timeout": 10000,
  105. "retry": {
  106. "maxAttempts": 3,
  107. "delay": 1000,
  108. "backoffMultiplier": 2
  109. }
  110. }