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

# 获取表单分析

> GET /forms/{form_id}/analytics/

返回表单的聚合分析 —— 随时间变化的响应/跳过计数，以及按流量来源的细分。

<Note>
  需要具有 `MANAGEMENT_API`（或 `MANAGEMENT_API_SANDBOX`）配额和 `LEAD_GENERATION_ANALYTICS_CAN_VIEW` 权限的管理 API 密钥，作为原始 `Authorization` 标头值发送 —— 参见[管理 API 概述](/zh/api-reference/management-api/overview)。
</Note>

<ParamField path="form_id" type="string" required>
  表单的 `form_id`。
</ParamField>

<ParamField query="from" type="string">
  起始日期（`YYYY-MM-DD`）。需与 `to` 一起提供才能计算 `elevation`（相对于等长前一周期的百分比变化）。
</ParamField>

<ParamField query="to" type="string">
  结束日期（`YYYY-MM-DD`）。
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl --request GET \
    --url 'https://api.scanova.io/forms/F8a9b0c1d2e3f4g5h/analytics/?from=2026-08-01&to=2026-08-31' \
    --header 'Authorization: YOUR_API_KEY'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "entries_count": {
      "total": 42,
      "form_entries": 40,
      "legacy_entries": 2,
      "responses": {
        "total": 38,
        "elevation": { "percent": 15, "previous": 33, "type": "+", "period": { "start": "2026-08-01", "end": "2026-08-31" } }
      },
      "skips": { "total": 4, "elevation": null }
    },
    "responses": [["2026-09-01", 5], ["2026-09-02", 3]],
    "skips": [["2026-09-01", 1]],
    "responses_by_source": [["Direct", 10], ["docs-v2-first-qr-code", 28]]
  }
  ```
</ResponseExample>

除非同时提供 `from` 和 `to`，否则 `entries_count` 下的 `responses` 和 `skips` 中的 `elevation` 均为 `null`。`legacy_entries` 统计从该表单转换来源的潜在客户列表（如有）中沿用的提交数量。`responses_by_source` 始终包含一个 `"Direct"`（未附加 QR 码的提交）分组，即使其值为 `0`。

## 相关内容

* [列出表单响应](/zh/api-reference/management-api/forms/responses-list) —— 这些数字背后的具体提交记录。
* [导出表单响应](/zh/api-reference/management-api/forms/export) —— 下载底层数据。
* [管理 API 概述](/zh/api-reference/management-api/overview) —— 此端点所属的身份验证方案和配额体系。


## OpenAPI

````yaml api-reference/openapi/management-api.json GET /forms/{form_id}/analytics/
openapi: 3.1.0
info:
  title: Scanova Management API (v2)
  description: >-
    The complete Scanova Management API — every endpoint available at
    api.scanova.io (QR codes, folders, tags, leads, forms, analytics, plans,
    shared users & roles), plus the token-creation and usage-stats endpoints
    used to authenticate against it. Every path and request/response shape below
    was verified live against a real API key and the actual running backend
    (Phase 7, 2026-08-16) — not guessed from reading urls.py alone.
  version: 2.0.0
servers:
  - url: https://api.scanova.io
    description: Management API — QR/folder/tag/lead/form/analytics/plans endpoints
security:
  - apiKeyAuth: []
paths:
  /forms/{form_id}/analytics/:
    get:
      summary: Get form analytics
      operationId: getManagedFormAnalytics
      responses:
        '200':
          description: Aggregated analytics for the form.
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        Send your Management API key as the raw value of the Authorization
        header — no "Bearer " or "Token " prefix, and no other characters.
        Example: `Authorization: 401f7ac837da42b97f613d789819ff93537bee6a`. A
        header containing more than one space-separated part is rejected
        outright. Requests also require the request's Host header to be the
        management API host (e.g. api.scanova.io) — the same key sent to the
        regular API host will not authenticate.

````