# 网站流量趋势

**API:** Data API

**Endpoint:** `GET /v1/beta/similarweb/website-traffic-trend`

**Tags:** Website Analytics

域名在最近可用窗口内的月度流量时间序列（data.points，每月一个条目）。该窗口会自动选取，并在 meta.start_date / meta.end_date 中回显。

### 计费参考

- 计量方式：套餐资源单位。
- 参考请求估算：0.45 美元。
- 单位成本基准：0.075 美元。
- 资源单位：`similarweb_credit`。
- 参考客户倍率：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`)

## Parameters

| Name | In | Required | Type | Description |
| --- | --- | --- | --- | --- |
| `country` | query | no | string, enum: "ww", default: "ww" |  |
| `domain` | query | yes | string |  |
| `end_date` | query | no | string |  |
| `metrics` | query | no | string, default: "visits" |  |
| `start_date` | query | no | string |  |

## Responses

### 200 — 规范化后的成功响应

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

**application/json**

Schema: object

```json
{
  "additionalProperties": false,
  "properties": {
    "data": {
      "additionalProperties": false,
      "properties": {
        "domain": {
          "type": "string"
        },
        "metrics": {
          "items": {
            "enum": [
              "average_visit_duration",
              "bounce_rate",
              "new_users",
              "page_views",
              "pages_per_visit",
              "returning_users",
              "unique_visitors",
              "visits"
            ],
            "type": "string"
          },
          "maxItems": 4,
          "minItems": 1,
          "type": "array",
          "uniqueItems": true
        },
        "points": {
          "items": {
            "additionalProperties": false,
            "properties": {
              "month": {
                "pattern": "^[0-9]{4}-[0-9]{2}$",
                "type": "string"
              },
              "values": {
                "additionalProperties": false,
                "properties": {
                  "average_visit_duration": {
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "bounce_rate": {
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "new_users": {
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "page_views": {
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "pages_per_visit": {
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "returning_users": {
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "unique_visitors": {
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "visits": {
                    "type": [
                      "number",
                      "null"
                    ]
                  }
                },
                "type": "object"
              }
            },
            "required": [
              "month",
              "values"
            ],
            "type": "object"
          },
          "minItems": 1,
          "type": "array"
        }
      },
      "required": [
        "domain",
        "metrics",
        "points"
      ],
      "type": "object"
    },
    "meta": {
      "additionalProperties": false,
      "properties": {
        "country": {
          "enum": [
            "ww"
          ],
          "type": "string"
        },
        "end_date": {
          "pattern": "^[0-9]{4}-[0-9]{2}$",
          "type": "string"
        },
        "granularity": {
          "const": "monthly",
          "type": "string"
        },
        "request_id": {
          "type": "string"
        },
        "retrieved_at": {
          "format": "date-time",
          "type": "string"
        },
        "source": {
          "const": "similarweb",
          "type": "string"
        },
        "start_date": {
          "pattern": "^[0-9]{4}-[0-9]{2}$",
          "type": "string"
        }
      },
      "required": [
        "source",
        "request_id",
        "retrieved_at",
        "country",
        "granularity",
        "start_date",
        "end_date"
      ],
      "type": "object"
    }
  },
  "required": [
    "data",
    "meta"
  ],
  "type": "object"
}
```

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

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

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

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

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

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

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

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

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

**application/json**

Schema:

```json
{}
```
