用途:这是一个 SimilarWeb 网站分析连接器,用于在代码环境中拉取网站的流量、排名、营销渠道与受众画像等分析数据。
主要能力:通过 dataBridgePull() 调用以下 action。
- traffic_engagement:获取流量与互动,必需参数 domain、start_date、end_date,可选 granularity、country;返回月度数组,元素含 date、visits、bounce_rate(跳出率 0-1)、average_visit_duration(秒)、pages_per_visit、unique_visitors。
- website_ranking:获取网站排名,必需参数 domain;返回数组,元素含 date、rank_global、rank_country、rank_category。
- traffic_sources:流量来源,含直接、搜索、社交、引荐、邮件、展示广告等渠道占比。
- traffic_geography:按国家统计的流量占比。
- app_details:应用详情,必需参数 app_id、store。
用法:以 traffic_engagement 为例,调用形如 dataBridgePull("similarweb", "traffic_engagement", {domain:"google.com", start_date:"2025-01", end_date:"2025-12", granularity:"monthly", country:"world"});返回后应检查 resp.ok,失败时读取 resp.error。参数要求:domain 不含协议与 www;start_date/end_date 使用 YYYY-MM 月份格式;country 用小写代码(如 us、cn、gb)或 world;store 取 google 或 apple;granularity 取 daily、weekly 或 monthly。
限制:日期通常只覆盖最近约 24 个月,建议使用近期月份,避免超出范围;按资料说明,在当前 API 计划下仅 traffic_engagement 与 website_ranking 可用,traffic_sources 与 traffic_geography 会返回 404,不要使用;API 限流为每秒最多 10 次,系统内置 1 小时缓存;每个 API 调用同步阻塞约 5-15 秒,单次代码块最多查询 3 个域名,更多域名需分批执行。其余功能、收费与平台支持暂未提供。