> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tickdb.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# 新聞詳情

> 根據新聞 ID 查詢新聞正文或可用摘要。

## 套餐權限

| 套餐 | 可用 |
| - | :-: |
| 免費版 | ❌ |
| 基礎版 | ❌ |
| 專業版 | ✅ |
| 全量套餐（A 股、港股、美股） | ✅ |
| 企業版 | ✅ |

## 注意事項

* 使用新聞列表返回的 `news_id` 查詢詳情。若 `detail_status` 為 `pending`、`blocked` 或 `failed`，`body_text` 和 `body_html` 可能為 `null`；展示 `body_html` 前應安全過濾。

## 支持的市場

| 市場 | 示例 |
| - | - |
| 美股 | US |
| 港股 | HK |
| A股 | CN |

## 請求參數

| 參數 | 位置 | 是否必須 | 說明 |
| - | - | :-: | - |
| `news_id` | path | 是 | 新聞列表返回的不透明文章 ID，按字符串傳遞 |

## 請求示例

```bash theme={null}
curl -H "X-API-Key: YOUR_API_KEY" \
  "https://api.tickdb.ai/v1/fundamentals/news/6288041"
```

## 返回字段說明

以下列出 `data` 中的字段；外層 `code=0` 表示成功。

| 字段 | 說明 |
| - | - |
| news\_id | 新聞 ID。 |
| title | 新聞標題。 |
| description | 新聞摘要。 |
| published\_at | 發布時間，RFC 3339 日期時間字符串（UTC）。 |
| detail\_status | 正文詳情獲取狀態。 |
| content\_scope | 可提供的內容范圍；excerpt 表示節選。 |
| body\_text | 純文本正文；不可用時可能為 null。 |
| body\_html | HTML 正文；不可用時可能為 null。 |

返回標題、摘要、發布時間、正文狀態、內容范圍、純文本正文和 HTML 正文。

`content_scope=excerpt` 表示摘要或節選，不代表完整全文。`body_html` 屬于外部內容，展示時應繼續執行安全過濾。


## OpenAPI

````yaml openapi.zh-Hant.yaml GET /v1/fundamentals/news/{news_id}
openapi: 3.1.0
info:
  title: TickDB API
  description: TickDB 統一即時行情數據 API，提供 REST 和 WebSocket 接入。
  version: 1.0.3
  contact:
    email: support@tickdb.ai
servers:
  - url: https://api.tickdb.ai
    description: 正式環境
security:
  - ApiKeyAuth: []
paths:
  /v1/fundamentals/news/{news_id}:
    get:
      tags:
        - fundamentals-events
      summary: 新聞詳情
      description: 根據新聞 ID 查詢新聞正文或可用摘要。
      operationId: getFundamentalsNewsDetail
      parameters:
        - $ref: '#/components/parameters/NewsIDPath'
      responses:
        '200':
          $ref: '#/components/responses/NewsDetailResponse'
        '400':
          $ref: '#/components/responses/NewsErrorResponse'
        '404':
          $ref: '#/components/responses/NewsErrorResponse'
        default:
          $ref: '#/components/responses/NewsErrorResponse'
components:
  parameters:
    NewsIDPath:
      name: news_id
      in: path
      required: true
      schema:
        type: string
        pattern: ^[1-9][0-9]*$
      description: 新聞列表返回的不透明文章 ID，按字符串傳遞
  responses:
    NewsDetailResponse:
      description: 新聞詳情回應。
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/NewsDetailEnvelope'
    NewsErrorResponse:
      description: >-
        錯誤回應。常見 HTTP 狀態包括
        400（參數錯誤）、401（驗證失敗）、403（權限或配額限制）、404（無符合條件的數據）、429（請求頻率限制）及 503（服務暫不可用）。
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/NewsErrorEnvelope'
  schemas:
    NewsDetailEnvelope:
      type: object
      required:
        - code
        - data
      properties:
        code:
          type: integer
          const: 0
        data:
          $ref: '#/components/schemas/NewsDetailItem'
      additionalProperties: false
    NewsErrorEnvelope:
      type: object
      required:
        - code
        - message
      properties:
        code:
          description: TickDB API 業務錯誤碼；可能是整數或字串。
          oneOf:
            - type: integer
            - type: string
        message:
          type: string
          description: 錯誤說明。
        error:
          type: string
          description: 相容錯誤標識；僅部分錯誤回應返回。
        data:
          description: 可選的錯誤上下文。
          oneOf:
            - type: 'null'
            - type: object
              additionalProperties: true
            - type: array
              items: {}
      additionalProperties: true
    NewsDetailItem:
      type: object
      required:
        - news_id
        - title
        - description
        - published_at
        - detail_status
        - content_scope
        - body_text
        - body_html
      properties:
        news_id:
          type: string
          pattern: ^[1-9][0-9]*$
          description: 新聞 ID。
        title:
          type: string
          description: 新聞標題。
        description:
          type:
            - string
            - 'null'
          description: 新聞摘要。
        published_at:
          type: string
          format: date-time
          description: 發布時間，RFC 3339 日期時間字符串（UTC）。
        detail_status:
          type: string
          enum:
            - pending
            - succeeded
            - blocked
            - failed
        content_scope:
          type: string
          enum:
            - full
            - excerpt
            - unknown
            - none
        body_text:
          type:
            - string
            - 'null'
          description: 純文本正文；不可用時可能為 null。
        body_html:
          type:
            - string
            - 'null'
          description: HTML 正文；不可用時可能為 null。
      additionalProperties: false
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.