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

# 公司新闻

> 获取实时和历史新闻



## OpenAPI

````yaml openapi/zh/openapi-financial.json GET /news
openapi: 3.0.1
info:
  title: Financial Datasets API
  description: 股票市场 API，提供超过 30 年、涵盖 30,000 多个股票代码的实时和历史金融数据，包括财务报表、股票价格、内部人士交易、SEC 申报文件等。
  version: 1.0.0
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
  contact:
    name: API Support
    url: https://financialdatasets.ai/support
    email: support@financialdatasets.ai
  termsOfService: https://financialdatasets.ai/terms
servers:
  - url: https://api.aisa.one/apis/v1/financial
    description: Production server
security:
  - bearerAuth: []
tags:
  - name: Financial Statements
    description: Access to income statements, balance sheets, and cash flow statements
  - name: Market Data
    description: Real-time and historical price data
  - name: Company Information
    description: Company facts like ticker, name, and description
  - name: Earnings
    description: Earnings press releases and related data
  - name: Crypto
    description: Cryptocurrency price data and market information
  - name: News
    description: Real-time and historical news articles
  - name: SEC Filings
    description: SEC filings and regulatory documents
  - name: Insider Trades
    description: Insider trading activity and transactions
  - name: Institutional Ownership
    description: Equity holdings of investment managers
  - name: Financial Metrics
    description: Financial ratios, metrics, and key performance indicators
paths:
  /news:
    get:
      tags:
        - News
      summary: 获取新闻文章
      description: >-
        获取特定公司或整体市场的近期新闻文章。传入 ticker 可获取公司特定新闻，省略 ticker 则获取一般市场新闻。文章来源于 The
        Motley Fool、Investing.com、Reuters 等发布商的 RSS 订阅源。
      operationId: getNews
      parameters:
        - name: ticker
          in: query
          description: 公司的股票代码。若查询大盘市场新闻，请省略。
          required: false
          schema:
            type: string
        - name: limit
          in: query
          description: 要返回的新闻文章最大数量（默认值：5，最大值：10）。
          required: false
          schema:
            type: integer
            default: 5
            maximum: 10
      responses:
        '200':
          description: 新闻文章响应
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NewsResponse'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '402':
          $ref: '#/components/responses/PaymentRequiredError'
        '404':
          $ref: '#/components/responses/NotFoundError'
components:
  schemas:
    NewsResponse:
      type: object
      properties:
        news:
          type: array
          items:
            $ref: '#/components/schemas/News'
    News:
      type: object
      properties:
        ticker:
          type: string
          description: 股票代码。
        title:
          type: string
          description: 新闻文章的标题。
        author:
          type: string
          description: 新闻文章的作者。
        source:
          type: string
          description: 新闻文章的来源。
        date:
          type: string
          format: date
          description: 新闻文章的发布日期。
        url:
          type: string
          format: uri
          description: 新闻文章的 URL。
        sentiment:
          type: string
          description: 新闻文章的情感倾向。
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: 简短的错误消息。
        message:
          type: string
          description: 更详细的错误消息。
  responses:
    BadRequestError:
      description: 错误请求
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: Bad Request
            message: Invalid request parameters
    UnauthorizedError:
      description: 未授权
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: Unauthorized
            message: Invalid API key provided
    PaymentRequiredError:
      description: 该请求需要付费订阅
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: Payment Required
            message: >-
              This endpoint requires a paid subscription. Please upgrade your
              plan.
    NotFoundError:
      description: 未找到指定的资源
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: Not Found
            message: Ticker XXXX not found
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````