api-config.json 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. {
  2. "name": "product_search",
  3. "displayName": "Amazon 关键词搜索产品",
  4. "description": "按关键词搜索 Amazon 产品列表,返回多个产品的标题、价格、评分、销量等信息。用于品类市场全景分析、Top100 产品列表获取。",
  5. "category": "voc",
  6. "version": "1.0.0",
  7. "endpoint": {
  8. "method": "POST",
  9. "url": "https://server-msq.fmode.cn/api/sorftime/forward",
  10. "headers": {
  11. "Content-Type": "application/json"
  12. }
  13. },
  14. "parameters": {
  15. "type": "object",
  16. "required": ["Pattern"],
  17. "properties": {
  18. "Pattern": {
  19. "type": "string",
  20. "description": "搜索关键词,如 'reed diffuser'、'aroma diffuser'、'scented candle'"
  21. },
  22. "Page": {
  23. "type": "integer",
  24. "description": "分页页码,从 1 开始",
  25. "default": 1
  26. },
  27. "domain": {
  28. "type": "integer",
  29. "description": "Amazon 站点 ID: 1=amazon.com, 2=amazon.co.uk, 3=amazon.de, 4=amazon.co.jp",
  30. "default": 1
  31. }
  32. }
  33. },
  34. "requestTransform": {
  35. "template": {
  36. "path": "/api/ProductQuery",
  37. "method": "POST",
  38. "query": { "domain": "{{domain}}" },
  39. "body": {
  40. "Page": "{{Page}}",
  41. "Query": "1",
  42. "QueryType": "7",
  43. "Pattern": "{{Pattern}}"
  44. }
  45. }
  46. },
  47. "response": {
  48. "type": "array",
  49. "description": "产品列表数组",
  50. "items": {
  51. "type": "object",
  52. "properties": {
  53. "Asin": { "type": "string", "description": "产品 ASIN" },
  54. "Title": { "type": "string", "description": "产品标题" },
  55. "Price": { "type": "number", "description": "售价(美元)" },
  56. "Rating": { "type": "number", "description": "平均评分" },
  57. "RatingsCount": { "type": "integer", "description": "评论总数" },
  58. "MonthlySales": { "type": "integer", "description": "月销量估算" },
  59. "Brand": { "type": "string", "description": "品牌" },
  60. "BSR": { "type": "integer", "description": "BSR 排名" },
  61. "Photo": { "type": "array", "description": "图片列表" }
  62. }
  63. }
  64. },
  65. "notes": "QueryType=7 表示按标题搜索。如果被验证码拦截(code=-10),返回空数组,需回退到批量 ProductRequest。",
  66. "usageExamples": [
  67. {
  68. "name": "搜索香薰扩散器产品",
  69. "input": { "Pattern": "aroma diffuser", "Page": 1, "domain": 1 },
  70. "description": "在美国站搜索 aroma diffuser 关键词的产品列表"
  71. },
  72. {
  73. "name": "搜索蜡烛加热器",
  74. "input": { "Pattern": "candle warmer", "Page": 1, "domain": 1 },
  75. "description": "在美国站搜索 candle warmer 关键词的产品列表"
  76. }
  77. ],
  78. "reportMapping": {
  79. "slides": ["市场全景(Slide3)"],
  80. "dataPoints": ["品类Top100产品列表", "周均销量", "周均销售额", "品牌数量", "中国卖家占比"]
  81. }
  82. }