# 选股筛选

`POST` `/v1/quote/ai/screener/search`

按策略 ID 或自定义指标条件筛选股票，支持分页。

## Parameters

### Request Body

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `market` | string | Yes | 选股市场，如 `US`、`HK`、`CN`。使用策略时取自策略。 |
| `filters` | array | Yes | 筛选条件。每项为 `{ "key": "filter_pettm", "min": "10", "max": "30", "tech_values": {} }`。 |
| `returns` | array | Yes | 每个匹配项需返回的指标 key 列表，如 `filter_pettm`。 |
| `page` | integer | Yes | 页码（从 0 开始）。 |
| `size` | integer | Yes | 每页数量。 |

## Request Example

```bash
curl --request POST \
  --url 'https://openapi.longbridge.com/v1/quote/ai/screener/search' \
  --header 'Authorization: Bearer <access_token>' \
  --header 'Content-Type: application/json' \
  --data '{"market":"<market>","filters":[],"returns":[],"page":0,"size":0}'
```

## Response

### Response Properties

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `total` | integer | No | 满足条件的股票总数。 |
| `items` | object[] | No | 匹配的股票列表。 |
| `└ symbol` | string | No | 标的代码，如 `WXT.US`。 |
| `└ name` | string | No | 标的名称。 |
| `└ indicators` | object[] | No | 该股票的指标值。 |
| `└ ∟ key` | string | No | 指标键名，如 `filter_pettm`。 |
| `└ ∟ name` | string | No | 指标显示名称。 |
| `└ ∟ value` | string | No | 指标值（字符串），无数据时为空。 |
| `└ ∟ unit` | string | No | 数值单位，如 `%`、` 亿`。 |

### Response JSON Example

```json
{
  "code": 0,
  "message": "success",
  "data": {
    "total": 88,
    "page": 0,
    "market": "US",
    "items": [
      {
        "symbol": "AAPL.US",
        "name": "Apple Inc.",
        "prevchg": 0.62,
        "marketcap": 3241500000000,
        "pettm": 32.15,
        "pbmrq": 50.21,
        "salesgrowthyoy": 8.04
      },
      {
        "symbol": "MSFT.US",
        "name": "Microsoft",
        "prevchg": 1.05,
        "marketcap": 3085000000000,
        "pettm": 35.42,
        "pbmrq": 12.87,
        "salesgrowthyoy": 12.61
      }
    ]
  }
}
```
