查看原始 JSON
{
"type": "object",
"required": [
"queryParams"
],
"properties": {
"queryParams": {
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"target",
"date"
],
"~standard": {
"vendor": "zod",
"version": 1,
"jsonSchema": {}
},
"properties": {
"date": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "报告日期,格式为 YYYY-MM-DD。查询当前数据时填写当天日期。"
},
"mode": {
"enum": [
"exact",
"prefix",
"domain",
"subdomains"
],
"type": "string",
"default": "subdomains",
"description": "统计范围:exact 仅包含该网址;prefix 包含以目标网址开头的页面;domain 仅包含该域名,不含子域名;subdomains 包含该域名及所有子域名,也是默认值。"
},
"limit": {
"type": "integer",
"default": 100,
"maximum": 100,
"minimum": 1,
"description": "最多返回的行数,也是按行计费的数量上限。默认 100,最大 100。"
},
"where": {
"type": "string",
"minLength": 1,
"description": "JSON 格式的筛选表达式,语法见 Ahrefs 筛选文档。支持的字段:url、sum_traffic、top_keyword、top_keyword_volume、top_keyword_best_position。"
},
"target": {
"type": "string",
"minLength": 1,
"description": "报告查询对象,可以是域名(如 'example.com')或网址(如 'https://example.com/page')。"
},
"country": {
"type": "string",
"maxLength": 2,
"minLength": 2,
"description": "两位国家代码(ISO 3166-1 alpha-2),例如 'us'。"
},
"order_by": {
"type": "string",
"minLength": 1,
"description": "排序规则:使用 'field' 或 'field:desc',多个规则用逗号分隔。支持的字段:url、sum_traffic、top_keyword、top_keyword_volume、top_keyword_best_position。"
},
"protocol": {
"enum": [
"both",
"http",
"https"
],
"type": "string",
"default": "both",
"description": "目标网址的协议:both(默认,包含两种协议)、http 或 https。"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}