# 相似網站

**API:** Data API

**Endpoint:** `GET /v1/beta/similarweb/website/similar-sites`

**Tags:** Website Analytics

相似網站。回應採用 SimilarWeb v5 信封結構（meta + data）。日期視窗（SimilarWeb 上游限制）：start_date 與 end_date 必須恰好涵蓋連續 3 個月——1 個月或 2 個月的區間會遭上游錯誤 120（「must span exactly 3 month(s)」）拒絕。該區間也必須是 SimilarWeb 目前支援的最新視窗，且該視窗每個月向前推進；較舊或超出範圍的區間會遭錯誤 101（「Dates not in range」）拒絕。實務上，請要求最近三個已完成的月份（例如最新發布月份為 2026-07 時，使用 start_date=2026-05 與 end_date=2026-07）。若要讀取目前確切支援的範圍，請呼叫 SimilarWeb 針對此 API 的 /describe 端點。

### 計費參考

- 計量方式：依結果筆數計量。
- 參考請求估算：0.375 美元。
- 單位成本基準：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 | yes | string |  |
| `granularity` | query | no | string, enum: "monthly" |  |
| `limit` | query | yes | integer |  |
| `main_domain_only` | query | no | boolean |  |
| `offset` | query | no | integer |  |
| `start_date` | query | yes | string |  |
| `traffic_source` | query | no | string |  |
| `web_source` | query | no | string, enum: "desktop", "mobile_web", "total" |  |

## Responses

### 200 — SimilarWeb v5 信封結構（meta + data）。

Headers:
- `X-Request-Id` (string) — 聯絡 Felo 支援時需提供的請求識別碼。

**application/json**

Schema: object

```json
{
  "type": "object",
  "properties": {
    "meta": {
      "$ref": "#/components/schemas/Response7B51F63Afd06_SimilarWebMeta"
    },
    "data": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "domain": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "rank": {
            "type": "integer"
          },
          "affinity": {
            "type": "number"
          },
          "has_adsense": {
            "type": "boolean"
          }
        }
      }
    }
  }
}
```

Example:

```json
{
  "meta": {
    "query": {
      "limit": 5,
      "offset": 0,
      "asc": null,
      "sort": null
    },
    "request": {
      "format": "json",
      "domain": "cnn.com",
      "granularity": "monthly",
      "start_date": "2026-05-01",
      "end_date": "2026-07-31",
      "metrics": [
        "rank",
        "affinity",
        "has_adsense"
      ],
      "category": null
    },
    "status": "success",
    "last_updated": "2026-07-31"
  },
  "data": [
    {
      "domain": "bbc.com",
      "category": "News_and_Media",
      "rank": 95,
      "affinity": 1,
      "has_adsense": true
    }
  ]
}
```

### 400 — 無法處理該要求。請檢查請求參數。

### 401 — 需要有效的 Felo API 金鑰。

### 402 — 由於未符合計費要求，要求無法繼續。

### 403 — 該帳戶無權執行此操作。

### 429 — 已達到要求或支出上限。

### 502 — 服務無法完成該要求。

### 503 — API 或計費服務暫時無法使用。

### 504 — 服務在處理要求時逾時。

### default — 錯誤回應；上游透傳回應可能採用供應商格式

**application/json**

Schema:

```json
{}
```

## Schema definitions

### Response7B51F63Afd06_SimilarWebMeta

`#/components/schemas/Response7B51F63Afd06_SimilarWebMeta`

```json
{
  "type": "object",
  "description": "SimilarWeb v5 回應信封中繼資料。",
  "properties": {
    "status": {
      "type": "string",
      "description": "上游狀態；呼叫成功時為 'success'。",
      "example": "success"
    },
    "last_updated": {
      "type": "string",
      "description": "上游可用的最新資料點日期（YYYY-MM-DD）。",
      "example": "2026-06-30"
    },
    "request": {
      "type": "object",
      "description": "正規化上游請求的完整回顯（依接收到的參數）。"
    },
    "query": {
      "type": "object",
      "description": "適用時回顯分頁/排序參數（limit、offset、asc、sort）。"
    }
  },
  "required": [
    "status"
  ]
}
```
