四、通用新闻
4.1 通用新闻
GET
/api/latest财经、经济、突发事件等多语言、多国家的新闻,可以按国家、语言、类型、关键字、时间范围、情绪筛选,带正文、图片和视频地址。
| 用途 | 地址 |
|---|---|
| 通用新闻 | http://hk.psbangu.cn:2004/api/latest |
通用新闻单独一个端口(2004),鉴权方式和其它接口相同。下面的参数全部是可选的。
请求
请求头 Authorization:你的密钥(必填)。
| 参数 | 是否必填 | 说明 |
|---|---|---|
| country | 可选 | 国家代码,如 us;全部取值见「新闻的国家与语言代码」 |
| language | 可选 | 语言代码,如 en |
| category | 可选 | 新闻类型,如 business;可选值见下面 |
| q | 可选 | 搜索关键字,需要 URL 编码,最长 512 个字符 |
| qInTitle | 可选 | 只在标题里搜索的关键字,需要 URL 编码,最长 512 个字符 |
| qInMeta | 可选 | 在标题、网址、关键词和摘要里搜索的关键字,需要 URL 编码;不能和 q、qInTitle 一起用 |
| timeframe | 可选 | 只要最近一段时间的新闻:按小时直接写数字(1~48),按分钟在数字后面加 m(1m~2880m) |
| sentiment | 可选 | 按情绪筛选:positive、neutral、negative |
| prioritydomain | 可选 | 只要热门新闻站点的:top 前 10%、medium 前 30%、low 前 50% |
| removeduplicate | 可选 | 1 去掉重复的文章,0 不去 |
| full_content | 可选 | 是否返回正文:1 返回,0 不返回(content 为 null);不传时返回 |
| image | 可选 | 是否返回图片地址:1 返回,0 不返回(image_url 为 null);不传时返回 |
| video | 可选 | 是否返回视频地址:1 返回,0 不返回 |
| size | 可选 | 每页条数,1~50 |
| page | 可选 | 翻页用:填上一次返回里的 nextPage |
新闻类型 category
business、crime、domestic、education、entertainment、environment、food、health、lifestyle、other、politics、science、sports、technology、top、tourism、world
返回
| 字段 | 说明 |
|---|---|
| status | 成功时为 success |
| totalResults | 符合条件的新闻总条数 |
| results | 本页的新闻(数组) |
| nextPage | 下一页的起始值,翻页时填到 page 参数里 |
results 每条的字段
| 字段 | 说明 |
|---|---|
| article_id | 文章编号 |
| title | 标题 |
| link | 原文地址 |
| description | 摘要 |
| content | 正文 |
| keywords | 关键词(数组) |
| creator | 作者(数组),没有为 null |
| pubDate | 发布时间,yyyy-MM-dd HH:mm:ss |
| pubDateTZ | 发布时间的时区,UTC |
| fetched_at | 收录时间 |
| image_url | 图片地址 |
| video_url | 视频地址 |
| source_id | 新闻站点的标识 |
| source_name | 新闻站点的名称 |
| source_url | 新闻站点的网址 |
| source_icon | 新闻站点的图标 |
| source_priority | 新闻站点的热门程度排名,数字越小越热门 |
| language | 语言,英文全称(如 english) |
| country | 国家(数组),英文全称(如 united states of america) |
| category | 新闻类型(数组) |
| datatype | 内容类型 |
| sentiment | 情绪:positive、neutral、negative |
| sentiment_stats | 三种情绪各自的占比 |
| ai_tag | 自动识别的主题 |
| ai_region | 自动识别的地区 |
| ai_org | 自动识别的机构 |
| ai_summary | 自动生成的摘要 |
| duplicate | 是否是重复文章 |
说明
- 翻页:把返回里的
nextPage作为下一次请求的page,其余参数保持不变。 - 返回里的
language、country是英文全称,不是请求时用的代码。 - 查财经新闻建议用
category=business配合关键字,如q=Tesla、q=stock,或直接用公司名、交易所名。
错误
| HTTP | 返回 | 情况 |
|---|---|---|
| 200 | {"Cmd":"api","State":-1,"Msg":"订单[密钥]已过期或者次数不足"} | 没带密钥、密钥无效、已过期或次数用完 |
| 200 | {"Cmd":"api","State":-1,"Msg":"接口请求出错,请检测参数,或者请联系管理员!"} | 参数不对,如 category 写错、size 超过 50、qInMeta 和 q 一起用 |
示例
GET
/latest?country=us&language=en&category=business&q=Tesla&size=2请求头 Authorization: 你的密钥 · HTTP 200
{
"status": "success", // 成功时为 success
"totalResults": 77, // 符合条件的新闻总条数
"results": [ // 本页的新闻
{
"article_id": "cdcc48a6ad9de56032d9c12380815c98", // 文章编号
// 原文地址
"link": "https://nynewscast.com/ccb-investigation-notification-coastal-financial-is-under-investigation-for-securities-fraud-over-banking-services-issues-contact-bfa-law-if-you-suffered-losses-262581/",
// 标题
"title": "CCB Investigation Notification: Coastal Financial is Under Investigation for Securities Fraud over Banking Services Issues – Contact BFA Law if You Suffered Losses",
// 摘要
"description": "BFA Law is investigating whether Coastal Financial Corporation committed securities fraud relating to statements concerning the financial performance and credit quality of its banking as a service segment, including the.…",
// 正文
"content": "CCB Investigation Notification: Coastal Financial is Under Investigation for Securities Fraud over Banking Services Issues – Contact BFA Law if You Suffered Losses BFA Law is investigating whether Coastal Financial Corpo…",
"keywords": [ // 关键词(数组)
"brand post"
],
"creator": [ // 作者(数组),没有为 null
"globenewswire"
],
"language": "english", // 语言,英文全称(如 english)
"country": [ // 国家(数组),英文全称(如 united states of america)
"united states of america"
],
"category": [ // 新闻类型(数组)
"top"
],
"datatype": "news", // 内容类型
"pubDate": "2026-10-05 10:07:00", // 发布时间,yyyy-MM-dd HH:mm:ss
"pubDateTZ": "UTC", // 发布时间的时区,UTC
"fetched_at": "2026-10-05 10:28:28", // 收录时间
// 图片地址
"image_url": "https://nynewscast.com/wp-content/uploads/2025/10/WhatsApp-Image-2025-10-31-at-00.04.14.jpeg",
"video_url": null, // 视频地址
"source_id": "nynewscast", // 新闻站点的标识
"source_name": "Nynewscast", // 新闻站点的名称
"source_priority": 99999999, // 新闻站点的热门程度排名,数字越小越热门
"source_url": "https://nynewscast.com", // 新闻站点的网址
"source_icon": "https://i.newsdata.io/nynewscast.png", // 新闻站点的图标
"sentiment": "neutral", // 情绪:positive、neutral、negative
"sentiment_stats": { // 三种情绪各自的占比
"negative": 20.8, // 负面的占比(%)
"neutral": 79.08, // 中性的占比(%)
"positive": 0.12 // 正面的占比(%)
},
"ai_tag": [ // 自动识别的主题
"banking and finance"
],
"ai_region": null, // 自动识别的地区
"ai_org": [ // 自动识别的机构
"coastal financial"
],
// 自动生成的摘要
"ai_summary": "BFA Law is investigating Coastal Financial Corporation for potential securities fraud related to statements about the financial performance and credit quality of its banking as a service segment, including CCBX partner r…",
"duplicate": false // 是否是重复文章
}
],
"nextPage": "1791194820519981649" // 下一页的起始值,翻页时填到 page 参数里
}results 共 2 条,示例只列出前 1 条;results.category 共 2 条,示例只列出前 1 条;results.ai_org 共 3 条,示例只列出前 1 条。