# 搜索特定财务指标

**API:** Data API

**Endpoint:** `POST /v1/beta/financial/financials/search/line-items`

**Tags:** Financial Data

在一次调用中跨一家或多家公司获取指定的财务行项目。请求体接收 `tickers` 和 `line_items`（两者均为必填，且均为数组），以及 `period`（annual、quarterly 或 ttm）和 `limit`。返回 `search_results`，每个 ticker 和期间一行，只包含你请求的字段，并附带 `report_period`、`period` 和 `currency`。用于构建对比表，而无需为每家公司拉取三张完整报表。项目名称与报表工具返回的字段名相同，不确定时可先在那里查询。若需单个公司的全部信息，请用 `get_financial_financials`。

### 计费参考

- 计量方式：按成功请求的固定成本计费。
- 参考请求估算：0.02 美元。
- 参考客户倍率：1.0。不得对已结算的客户金额再次应用。

仅供参考的元数据，不是账户报价、保证价格或消费上限。资源额度不同于 Felo 额度。最终扣费以 Felo 计费记录为准。

## Base URL

- `https://openapi.felo.ai`

## Authentication

- `FeloBearerAuth` (http bearer, bearer format Felo API Key)
- `FeloApiKey` (apiKey in header `X-API-Key`)

## Request body

Required: **yes**

### application/json

Schema:

```json
{
  "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": "要搜索的 ticker。"
      },
      "minItems": 1,
      "description": "要应用到搜索的 ticker 数组。"
    },
    "period": {
      "type": "string",
      "enum": [
        "annual",
        "quarterly",
        "ttm"
      ],
      "default": "ttm",
      "description": "财务数据的时间段。"
    },
    "limit": {
      "type": "integer",
      "minimum": 1,
      "default": 1,
      "description": "要返回的最大结果数。"
    }
  }
}
```

## Responses

### 200 — 搜索成功响应

Headers:
- `X-Request-Id` (string) — 联系 Felo 支持时需提供的请求标识符。

**application/json**

Schema: `ResponseE40Feb4D3D6B_FinancialsSearchResponse` (`#/components/schemas/ResponseE40Feb4D3D6B_FinancialsSearchResponse`)

### 400 — 无法处理该请求。请检查请求参数。

### 401 — 需要有效的 Felo API 密钥。

### 402 — 由于未满足计费要求，请求无法继续。

### 403 — 该账户无权执行此操作。

### 429 — 已达到请求或支出限额。

### 502 — 服务无法完成该请求。

### 503 — API 或计费服务暂时不可用。

### 504 — 服务在处理请求时超时。

### default — 错误响应；上游透传响应可能采用提供方格式

**application/json**

Schema:

```json
{}
```

## Schema definitions

### ResponseE40Feb4D3D6B_FinancialsSearchResponse

`#/components/schemas/ResponseE40Feb4D3D6B_FinancialsSearchResponse`

```json
{
  "type": "object",
  "properties": {
    "search_results": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "ticker": {
            "type": "string",
            "description": "公司的 ticker 代码。"
          },
          "report_period": {
            "type": "string",
            "format": "date",
            "description": "财务数据的报告期。"
          },
          "period": {
            "type": "string",
            "enum": [
              "annual",
              "quarterly",
              "ttm"
            ],
            "description": "财务数据的时间段。"
          },
          "currency": {
            "type": "string",
            "description": "财务数据的货币。"
          }
        },
        "additionalProperties": {
          "type": "string",
          "description": "基于搜索条件的其他财务指标。"
        }
      }
    }
  }
}
```
