市场新闻列表
内部接口财经新闻 News · 市场新闻列表
内部接口:市场新闻分页查询,支持来源、关键词、新闻类型、关联股票、时间范围与关联度多维筛选,返回信封结构与完整分页元信息。
内部接口,面向平台自身的数据链路,不对外承诺稳定性。
接口地址
GET /cn/market/news完整地址:
https://api.databull.cn/cn/market/news接口说明
内部接口:市场新闻分页查询,支持来源、关键词、新闻类型、关联股票、时间范围与关联度筛选。
响应为 {"code": 0, "data": {items, total, page, page_size, has_more}} 信封结构;对外场景请改用 /v2/news/flash。
请求参数
参数位置类型必填默认说明
sources查询string?否来源,多个用英文逗号分隔,如 tonghuashun,wallstreet;留空不限制keyword查询string?否关键词,在 digest 中模糊匹配(不区分大小写);留空不限制news_type查询string?否新闻类型,精确匹配(normal / report / news);留空不限制stock_code查询string?否关联股票代码(裸码),在 relations_stocks 中精确匹配;留空不限制start_time查询string?否起始时间,ISO 8601(含端点);留空不限制end_time查询string?否结束时间,ISO 8601(含端点);留空不限制relation_level查询integer?否—市场关联度,精确匹配;留空不限制min_relation_level查询integer?否—市场关联度下限;留空不限制page查询integer否1页码,从 1 开始;不小于 1page_size查询integer否20每页条数,最大 100;取值 1~100返回字段
字段类型说明
codenumber业务状态码,0 表示成功data.itemsarray新闻记录数组,字段同下表data.totalnumber满足条件的总条数data.page / data.page_sizenumber当前页码 / 每页条数data.has_moreboolean是否还有下一页idnumber新闻主键 IDdigeststring新闻摘要正文tagsarray分类标签列表,如 ["公司", "融资"]relation_levelnumber市场关联度,0~10;越高表示与个股/大盘越相关bullish_levelnumber利好程度;正值偏利好,负值偏利空relations_stocksarray关联个股,形如 [{"code": "000001", "name": "平安银行"}]relations_importednumber内部流转标记:是否已导入个股监控news_timestring新闻发布时间,ISO 8601(北京时间,无时区后缀)news_typestring新闻类型,如 normal / report / newsnews_md5string内部去重哈希,同一新闻不会重复入库sourcesstring新闻来源标识urlstring原文链接接口示例
cURL
curl "https://api.databull.cn/cn/market/news?sources=tonghuashun&keyword=回购" \
-H "Authorization: Bearer $DATABULL_API_KEY"Python
import requests
url = "https://api.databull.cn/cn/market/news"
params = {
"sources": "tonghuashun",
"keyword": "回购",
}
headers = {"Authorization": "Bearer YOUR_API_KEY"}
resp = requests.get(url, params=params, headers=headers, timeout=10)
resp.raise_for_status()
print(resp.json())响应示例
JSON
{
"code": 0,
"data": {
"items": [
{
"id": 1024,
"digest": "央行开展 3000 亿元 MLF 操作。",
"tags": [
"宏观"
],
"relation_level": 3,
"bullish_level": 1,
"relations_stocks": [],
"news_time": "2026-06-26T09:31:00",
"news_type": "normal",
"sources": "tonghuashun",
"url": "https://example.com/news/1024"
}
],
"total": 128,
"page": 1,
"page_size": 20,
"has_more": true
}
}错误码
状态码触发条件
400时间格式非法,或起始时间晚于结束时间
说明
- 与对外接口的区别:本接口返回全量字段(含
news_md5、relations_imported两个内部字段),且支持多条件组合筛选。 sources支持多个来源,用英文逗号分隔。keyword在摘要中做不区分大小写的模糊匹配,%与_已转义,不会被当通配符。- 时间参数为 ISO 8601,带时区的输入会换算成北京时间后再比较。
Esc