新時空 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: 服務不可用。