用途:通过 Kalodata 数据源查询 TikTok Shop 店铺数据,分两步工作流——浏览店铺排行榜发现高表现店铺,或按 shopId 获取单店完整详情。需要排行榜、店铺发现或对比时用排名接口;已有 shopId 或从排名结果选定店铺时用详情接口。
主要能力:排名接口返回按地区、dateRange、language、currency 过滤的分页榜单,默认按 GMV 降序,含 rank、shop_name、shop_id、shop_type、revenue、sales_volumn、on_sell_product_count、unit_price、revenue_growth_rate、self_promotion_revenue、affiliate_revenue、shopping_mall_revenue。详情接口按 shopId 返回 shop_id、shop_name、seller_type、region、revenue、sales_volumn、product_number、unit_price、self_account_revenue、affiliate_revenue、shoppingmall_revenue、creator_number、video_number、live_number。
使用方式:调用 POST /kalodata/shop/rank 或 POST /kalodata/shop/detail,或运行 python scripts/shop_rank.py '<JSON参数>' [--inline]、python scripts/shop_detail.py '<JSON参数>' [--inline]。需设置 NEXSCOPE_API_KEY。排名参数含 region、dateRange、pageNumber(1-5)、pageSize(5-100)、language、currency、category_ids、revenue_range、shop_type、sortField;详情必填 shopId。结果默认写入工作目录 nexscope/<日期>/<会话>/data/ 下的 JSON 文件,超过 8KB 时 stdout 仅输出摘要。
限制:排名不是关键词搜索;详情必须提供 shopId,无法仅按名称查找;排名响应不含总数/页数;两接口字段名不同(如 rank 用 self_promotion_revenue、shopping_mall_revenue、shop_type,detail 用 self_account_revenue、shoppingmall_revenue、seller_type),不可混用;收入渠道拆分为近似值;数据可能有 T+1 延迟;工具消耗积分,同参数同会话默认只调用一次并有 24 小时本地缓存,失败或空结果不应自动更换参数重试。