查看原始 JSON
{
"type": "object",
"required": [
"body"
],
"properties": {
"body": {
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"searchBy"
],
"~standard": {
"vendor": "zod",
"version": 1,
"jsonSchema": {}
},
"properties": {
"limit": {
"type": "integer",
"maximum": 100,
"minimum": 1,
"description": "最多返回 1–100 篇文章,默认 10;这也决定预留费用,供应商每 10 篇收一个 credit。"
},
"cursor": {
"type": "string",
"maxLength": 300,
"description": "上一响应的原始 next_cursor,用于下一页;每页文章单独计费,长度最多 300。"
},
"sortBy": {
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"enum": [
"relevance",
"newest"
],
"type": "string",
"description": "排序方式:relevance 或 newest。"
}
},
"description": "结果排序,默认 newest。",
"additionalProperties": false
},
"filterBy": {
"type": "object",
"properties": {
"date": {
"type": "object",
"properties": {
"to": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"description": "包含边界的结束发布时间,单位 Unix 毫秒。"
},
"from": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"description": "包含边界的起始发布时间,单位 Unix 毫秒。"
}
},
"description": "发布时间窗口,单位 Unix 毫秒。",
"additionalProperties": false
},
"articleType": {
"type": "array",
"items": {
"enum": [
"editorial",
"press_release",
"regulatory_filing",
"advisory"
],
"type": "string"
},
"maxItems": 3,
"minItems": 1,
"description": "包含的文章类型,1–3 项,用于区分独立 editorial 与公司发布内容。"
},
"sourceDomain": {
"type": "array",
"items": {
"type": "string",
"maxLength": 253,
"minLength": 1
},
"maxItems": 3,
"minItems": 1,
"description": "包含的发布者域名,1–3 项。"
},
"sourceCountry": {
"type": "array",
"items": {
"enum": [
"ae",
"ar",
"au",
"ca",
"cg",
"ch",
"cl",
"cz",
"de",
"fi",
"fr",
"gb",
"hk",
"il",
"in",
"jp",
"kr",
"mx",
"ng",
"nl",
"qa",
"sa",
"se",
"sg",
"us",
"za"
],
"type": "string"
},
"maxItems": 3,
"minItems": 1,
"description": "包含的发布者国家,1–3 个受支持的小写 ISO 两位代码。"
},
"articleLanguage": {
"type": "array",
"items": {
"enum": [
"ar",
"de",
"en",
"es",
"fr",
"hi",
"it",
"ja",
"ko",
"nl",
"pt",
"ru",
"zh"
],
"type": "string"
},
"maxItems": 3,
"minItems": 1,
"description": "包含的文章语言,1–3 个受支持的 ISO 639-1 代码。"
}
},
"description": "可选结果筛选。",
"additionalProperties": false
},
"searchBy": {
"type": "object",
"required": [
"type",
"entity"
],
"properties": {
"type": {
"type": "string",
"const": "entity",
"description": "查询方式,只支持 entity。"
},
"entity": {
"oneOf": [
{
"type": "object",
"required": [
"type",
"name"
],
"properties": {
"name": {
"type": "string",
"maxLength": 200,
"minLength": 2,
"description": "公司名称,2–200 个字符。"
},
"type": {
"type": "string",
"const": "name"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"type",
"domain"
],
"properties": {
"type": {
"type": "string",
"const": "domain"
},
"domain": {
"type": "string",
"maxLength": 253,
"minLength": 1,
"description": "公司网站域名,例如 apple.com。"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"type",
"ticker"
],
"properties": {
"type": {
"type": "string",
"const": "ticker"
},
"ticker": {
"type": "string",
"pattern": "^[A-Za-z0-9.-]+$",
"maxLength": 20,
"minLength": 1,
"description": "上市公司证券代码,例如 AAPL,长度 1–20,使用契约支持的字母、数字、点或连字符。"
},
"exchange": {
"type": "string",
"maxLength": 10,
"minLength": 2,
"description": "用于区分同代码的交易所,例如 NASDAQ、NYSE、LSE 或 XETRA,2–10 个字符。"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"type",
"isin"
],
"properties": {
"isin": {
"type": "string",
"pattern": "^[A-Za-z]{2}[A-Za-z0-9]{9}[0-9]$",
"description": "国际证券识别码,例如 US0378331005,使用当前输入契约接受的格式。"
},
"type": {
"type": "string",
"const": "isin"
}
},
"additionalProperties": false
}
],
"description": "公司标识,名称、域名、可附交易所的证券代码或 ISIN 四选一。"
}
},
"description": "新闻查询目标。",
"additionalProperties": false
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}