> ## 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 POST /financials/search/line-items
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:
  /financials/search/line-items:
    post:
      tags:
        - Financial Statements
      summary: 搜索特定财务指标
      description: 在一组股票代码的利润表、资产负债表和现金流量表中搜索特定财务指标。
      operationId: searchLineItems
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SearchLineItemsRequest'
      responses:
        '200':
          description: 搜索成功响应
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FinancialsSearchResponse'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '402':
          $ref: '#/components/responses/PaymentRequiredError'
        '404':
          $ref: '#/components/responses/NotFoundError'
components:
  schemas:
    SearchLineItemsRequest:
      type: object
      required:
        - line_items
        - tickers
      properties:
        line_items:
          type: array
          items:
            type: string
            description: 要搜索的财务指标。
          minItems: 1
          description: 要应用于搜索的行项目数组。
        tickers:
          type: array
          items:
            type: string
            description: 要搜索的股票代码。
          minItems: 1
          description: 要应用于搜索的股票代码数组。
        period:
          type: string
          enum:
            - annual
            - quarterly
            - ttm
          default: ttm
          description: 财务数据的时间段。
        limit:
          type: integer
          minimum: 1
          default: 1
          description: 要返回的最大结果数量。
    FinancialsSearchResponse:
      type: object
      properties:
        search_results:
          type: array
          items:
            type: object
            properties:
              ticker:
                type: string
                description: 公司的股票代码。
              report_period:
                type: string
                format: date
                description: 财务数据的报告期。
              period:
                type: string
                enum:
                  - annual
                  - quarterly
                  - ttm
                description: 财务数据的时间周期。
              currency:
                type: string
                description: 财务数据的货币。
            additionalProperties:
              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

````