新时空 API

如需获取更多信息或技术支持,请联系:

contact@newtimespace.com

新时空 API 资讯列表查询

方法: GET

路径: /api/v1/article/getArticles

描述: 查询新闻列表,支持分页、分类、标题/关键词搜索、日期过滤和排序

JSON响应示例
XML响应示例
错误响应(JSON 示例)
                         {
 "status": "success",
 "articles": [
  {
   "article_id": "123",
   "language": "zh-cn",
   "title": "新闻标题",
   "description": "新闻描述",
   "content": "新闻内容",
   "tags": "标签1,标签2",
   "keywords": ["关键词1", "关键词2"],
   "authors": ["作者1", "作者2"],
   "category": "分类名称",
   "dataType": "news",
   "url": "https://www.newtimespace.com/zh-cn/article/123",
   "pubDate": "2026-01-13 12:00:00",
   "pubDateTZ": "UTC",
   "date": "2026-01-13",
   "time": "12:00:00",
   "updated_at": "2026-01-13 13:00:00",
   "word_count": 500,
   "reading_time": 3,
   "is_breaking_news": false,
   "sentiment": "neutral",
   "related_articles": [],
   "geo_location": "",
   "source": {
     "id": "",
     "name": "NewTimeSpace",
     "url": "",
     "country": "",
   "icon": ""
   },
   "image": {
     "url": "",
     "alt": "",
     "caption": "",
     "source": "",
     "credit": ""
   },
   "video": {
     "url": null,
     "thumbnail": "",
     "duration": "",
     "source": "",
     "credit": ""
   }
  }
 ],
 "pagination": {
   "page": 1,
   "limit": 10,
   "total": 100,
   "pages": 10
  }
 }
                        
                      

参数 arrow

参数 类型 必填 描述 默认值
page integer 页码(必须 > 0) 1
limit integer 每页数量(1-100) 10
category string 分类筛选(英文或中文分类名称) ''
title string 标题搜索(模糊匹配) ''
keyword string 关键词搜索(标签匹配) ''
language string 语言(zh-cn, zh-hk, en) zh-cn
date string 开始日期(YYYY-MM-DD,当天新闻) ''
sortBy string 排序方式(id 或 date) date
format string 返回格式(json 或 xml) json

状态码 arrow

  • 200: 成功。
  • 204: 信息不可用。
  • 400: 参数无效。
  • 429: 请求过多。
  • 500: 内部错误。
  • 503: 服务不可用。