Markdown
所有接口

可见度报告

POST/v1/reports/visibility

按平台和采集条件,计算品牌的提及率和域名的引用率,并给出 95% 区间。

价格

价格
不收费

这个接口不收费,所以不接受 Idempotency-Key 和 X-Max-Price;带了会返回 invalid_params。

参数

放在 JSON 请求体里,不能放在网址里。

job_ids文字列表必填

要统计的任务。1–20 个,不能重复。

engines文字列表

只统计这些平台。不写就统计任务里的每个平台。至少 1 个,不能重复。

prompts文字列表

只统计这些问题。不写就统计任务里的每个问题。1–100 个,每个最多 2,000 个字符,不能重复。

brand文字

品牌名。brand 和 domains 至少给一个。最多 100 个字符。

aliases文字列表

品牌的其他写法,例如英文名。最多 20 个,每个最多 100 个字符,不能重复。

exclude文字列表

包含品牌名、但不算这个品牌的词,例如品牌是“苹果”时的“苹果手机壳”。最多 20 个,每个最多 100 个字符,不能重复。

domains文字列表

算作自己的域名,子域名也算。brand 和 domains 至少给一个。1–20 个,每个最多 253 个字符,不能重复。

请求头

Authorization必填

Bearer 加你的 API Key。

返回

成功时返回 HTTP 200,数据在 data.item,是一个 VisibilityReport。字段一直都在:[] 是这次没有,null 是平台不提供或看不出来。

字段类型说明
methodMethod算法的版本和口径
rowsVisibilityRow[]每个平台和每组采集条件一行

里面的对象

Method4 个字段
字段类型说明
versionstring算法版本。分母、区间或识别规则变了就升版本
denominators{ answer_rate: string, mention_rate: string, citation_rate: string }三个比例各自的分母
brand_rulesstring品牌识别规则
seedinteger重抽样用的随机种子,所以同样的输入结果相同
VisibilityRow11 个字段
字段类型说明
enginestring平台编号
channel_idstring | null实际走的线路。null 表示这些回答都没有发出去
tier"basic" | "full"基础版或完整版
conditions{ surface: string | null, interface: string | null, login: string | null, thinking: boolean | null, country: string | null, region: string | null, requested_country: string | null, requested_region: string | null }这一组的采集条件。实际地区不知道时,按你要求的地区分组
prompt_countinteger这一组有几道题
status_counts{ answered: integer, no_answer: integer, refused: integer, failed: integer, pending: integer }每种状态各有几条
answer_rateRate有回答的比例
mention_rateRate提到品牌的比例。没给 brand 时,value 是 null
citation_rateRate引用了你的域名的比例。没给 domains 时,value 是 null
search_unknowninteger看不出有没有搜索的回答数,不进引用率的分母
cited_unknowninteger分不出来源有没有用在回答里的回答数,不进引用率的分母
Rate8 个字段
字段类型说明
countinteger符合的回答数
sample_sizeinteger算进分母的回答数
prompt_countinteger有数据的题目数
valuenumber | null比例。先算每道题的比例再取平均,所以多道题时不一定等于 count ÷ sample_size。null 是没有数据,不是 0
lownumber | null95% 区间的下限
highnumber | null95% 区间的上限
method"wilson_95" | "cluster_bootstrap_95" | null区间的算法:一道题用 wilson_95,多道题用 cluster_bootstrap_95
enoughboolean样本够不够。false 时不要拿这个比例下结论

常见错误

返回错误就没有收费,只有 settlement_unknown:它表示暂时不知道有没有扣费,要用同一个 Idempotency-Key 再查。查看每个错误码。

错误HTTP意思收费吗
invalid_params400参数不合法没有收费
not_found404对象不存在、私密或已删除没有收费
report_too_large400报告的回答太多,请减少任务,或按平台、题目筛选没有收费
unauthorized401没有带凭证,或凭证无效、已停用、已过期没有收费
rate_limited429请求过快,或同时进行的调用过多没有收费