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

# 流式查询

> NDJSON 分块查询响应。

```http theme={null}
GET  /api/v1/query/stream
POST /api/v1/query/stream
```

始终返回 NDJSON 分块响应。`GET` 用查询参数（`sql`、`stream`、`stream_type`、`from`、`to`、`limit`）；
`POST` 用与[执行查询](/zh-Hans/api/query/execute)相同的请求体。请在入口关闭代理缓冲
（`proxy_buffering off`）以便分块及时下发。每一行是以列名为 key 的 JSON 对象，最后一行包含
`{"__meta__":{"scanned_rows":...,"took_ms":...}}`。该接口需要 `streams.query`，系统作用域也可使用
`sys.telemetry.read`。
