# Content Analysis – 評分分布 API

**API:** Data API

**Endpoint:** `POST /v1/beta/dataforseo/content_analysis/rating_distribution/live`

**Tags:** DataForSEO

將某個關鍵字的引用依評分區間劃分，並回報每個區間的完整指標集。每個區間傳回一筆，包含 `min`、`max` 與一個 `metrics` 物件，後者包含 `total_count`、`rank`、`top_domains`（每項包含 `domain` 與 `count`）、`sentiment_connotations`（anger、happiness、love、sadness、share、fun）、`connotation_types`（positive、negative、neutral）、`text_categories`、`page_categories`、`page_types`、`countries` 與 `languages`。`rank_scale` 決定分組方式。若需要同樣但不分組的指標，請使用 `post_dataforseo_content_summary_live`；若只需要情感，請使用 `post_dataforseo_content_sentiment_analysis_live`。

### 計費參考

- 計量方式：依回報的回應成本計量。
- 參考請求估算：0.0276 美元。
- 參考客戶倍率：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`)

## Request body

Required: **no**

### application/json

Schema:

```json
{
  "type": "array",
  "items": {
    "type": [
      "object",
      "null"
    ],
    "oneOf": [
      {
        "type": "object",
        "properties": {
          "keyword": {
            "type": "string",
            "description": "<em>目標關鍵字</em><br><strong>必填欄位</strong><br>UTF-8 編碼<br>關鍵字將轉換為小寫格式；<br><strong>注意</strong>：如需比對完整片語而非單一關鍵字，請使用雙引號與反斜線； <br>範例： <br><code>\"keyword\": \"\\\"tesla palo alto\\\"\"</code><p>有關 DataForSEO API 中 <code>keyword</code> 與 <code>keywords</code> 欄位的規則與限制，請參閱這篇 <a href=\"https://dataforseo.com/help-center/rules-and-limitations-of-keyword-and-keywords-fields-in-dataforseo-apis\" rel=\"noopener noreferrer\" target=\"_blank\">說明中心文章</a>"
          },
          "keyword_fields": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": {
              "type": [
                "string",
                "null"
              ]
            },
            "description": "<em>目標關鍵字欄位與目標關鍵字</em><br>選填欄位<br>使用此參數依特定欄位應包含的關鍵字篩選資料集；<br>可指定的欄位：<code>title</code>、<code>main_title</code>、<code>previous_title</code>、<code>snippet</code><br>可指定多個欄位；<br><strong>注意</strong>：如需比對完整片語而非單一關鍵字，請使用雙引號與反斜線； <br>範例：<br>`\"keyword_fields\": {<br>\"snippet\": \"\\\"logitech mouse\\\"\",<br>\"main_title\": \"sale\"<br>}`"
          },
          "page_type": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "<em>目標頁面類型</em><br>選填欄位<br>使用此參數依頁面類型篩選資料集<br>可能的值： <br><code>\"ecommerce\"</code>、<code>\"news\"</code>、<code>\"blogs\"</code>、<code>\"message-boards\"</code>、<code>\"organization\"</code>"
          },
          "internal_list_limit": {
            "type": [
              "integer",
              "null"
            ],
            "description": "<em>內部陣列中的最大元素數量</em><br>選填欄位<br>可使用此欄位限制以下陣列中的元素數量：<br><code>top_domains</code><br><code>text_categories</code><br><code>page_categories</code><br><code>countries</code><br><code>languages</code><br>預設值：<code>1</code><br>最大值：<code>20</code>"
          },
          "search_mode": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>結果分組類型</em><br>選填欄位<br>可用的分組類型：<br><code>as_is</code> - 傳回目標 <code>keyword</code> 的所有引用資料<br><code>one_per_domain</code> - 每個網域傳回一筆 <code>keyword</code> 的引用資料<br>預設值：<code>as_is</code>"
          },
          "positive_connotation_threshold": {
            "type": [
              "number",
              "null"
            ],
            "description": "<em>正面情感閾值</em><br>選填欄位<br>以與引用內容相關的正面情感機率指數閾值表示<br>如果指定此欄位，回應中的 <code>connotation_types</code> 物件將僅包含 <code>positive</code> 情感機率大於或等於指定值的引用資料<br>可能的值：<code>0</code> 到 <code>1</code><br>預設值：<code>0.4</code>"
          },
          "sentiments_connotation_threshold": {
            "type": [
              "number",
              "null"
            ],
            "description": "<em>情感含意閾值</em><br>選填欄位<br>以與引用內容相關的情感含意機率指數閾值表示<br>如果指定此欄位，回應中的 <code>sentiment_connotations</code> 物件將僅包含各情感機率均大於或等於指定值的引用資料<br>可能的值：<code>0</code> 到 <code>1</code><br>預設值：<code>0.4</code>"
          },
          "initial_dataset_filters": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": [
                "object",
                "null"
              ]
            },
            "description": "<em>初始資料集篩選參數</em><br>選填欄位<br>適用於 <a href=\"/v3/content_analysis/search/live/?bash\" target=\"_blank\">Search 端點</a>中欄位的初始篩選參數<br><strong>可同時新增多個篩選條件（最多 8 個）</strong><br>應在條件之間設定邏輯運算子 <code>and</code>、<code>or</code><br>支援以下運算子：<br><code>regex</code>、<code>not_regex</code>、<code>&lt;</code>、<code>&lt;=</code>、<code>&gt;</code>、<code>&gt;=</code>、<code>=</code>、<code>&lt;&gt;</code>、<code>in</code>、<code>not_in</code>、<code>like</code>、<code>not_like</code>、<code>has</code>、<code>has_not</code>、<code>match</code>、<code>not_match</code><br>可在 <code>like</code> 與 <code>not_like</code> 中使用 <code>%</code> 運算子，比對任意長度（零個或多個字元）的字串<br>範例：<br><code>[\"domain\",\"&lt;&gt;\", \"logitech.com\"]</code><p><code>[[\"domain\",\"&lt;&gt;\",\"logitech.com\"],\"and\",[\"content_info.connotation_types.negative\",\"&gt;\",1000]]</code><p><code>[[\"domain\",\"&lt;&gt\",\"logitech.com\"]],<br>\"and\",<br>[[\"content_info.connotation_types.negative\",\"&gt;\",1000],<br>\"or\",<p>[\"content_info.text_category\",\"has\",10994]]]</code><br>如需進一步瞭解篩選條件，請參閱 <a href=\"/v3/content_analysis/filters\" target=\"_blank\" rel=\"noopener noreferrer\">Content Analysis API 的篩選條件</a><br>如需進一步瞭解初始資料集篩選條件，請參閱<a href=\"https://dataforseo.com/help-center/what-are-the-initial-dataset-filters-and-how-do-they-work\" rel=\"noopener noreferrer\" target=\"_blank\">這篇說明中心文章。</a>"
          },
          "rank_scale": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>定義用於計算與顯示 <code>rank</code> 值的級距</em><br>選填欄位<p>可使用此參數選擇 rank 值要以 0–100 或 0–1000 的級距呈現<p>可能的值：<br><code>one_hundred</code> — rank 值以 0–100 的級距顯示<br><code>one_thousand</code> — rank 值以 0–1000 的級距顯示<p>預設值：<code>one_thousand</code><p>如需進一步瞭解此參數的運作方式，請參閱<a href=\"https://dataforseo.com/help-center/using-the-rank_scale-parameter-in-content-analysis-api\">這篇說明中心文章</a>"
          },
          "tag": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>使用者自訂任務識別碼</em><br>選填欄位<br><em>字元數上限為 255</em><br>可使用此參數識別任務，並將其與結果對應<br>可在回應的 <code>data</code> 物件中找到指定的 <code>tag</code> 值"
          }
        },
        "example": [
          {
            "keyword": "logitech",
            "search_mode": "as_is",
            "internal_list_limit": 10
          }
        ]
      }
    ]
  },
  "example": [
    {
      "keyword": "logitech",
      "search_mode": "as_is",
      "internal_list_limit": 10
    }
  ]
}
```

## Responses

### 200 — 操作成功

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

**application/json**

Schema: object | null

```json
{
  "type": [
    "object",
    "null"
  ],
  "oneOf": [
    {
      "$ref": "#/components/schemas/Response36Afe1097B20_ContentAnalysisRatingDistributionLiveResponseInfo"
    }
  ]
}
```

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

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

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

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

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

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

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

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

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

**application/json**

Schema:

```json
{}
```

## Schema definitions

### Response36Afe1097B20_BaseResponseInfo

`#/components/schemas/Response36Afe1097B20_BaseResponseInfo`

```json
{
  "properties": {
    "version": {
      "type": [
        "string",
        "null"
      ],
      "description": "API 的目前版本"
    },
    "status_code": {
      "type": [
        "integer",
        "null"
      ],
      "description": "一般狀態碼\n完整回應碼清單請見此處"
    },
    "status_message": {
      "type": [
        "string",
        "null"
      ],
      "description": "一般資訊訊息\n完整的一般資訊訊息清單請見此處"
    },
    "time": {
      "type": [
        "string",
        "null"
      ],
      "description": "總執行時間，秒"
    },
    "cost": {
      "type": [
        "number",
        "null"
      ],
      "description": "任務總費用，美元",
      "format": "double"
    },
    "tasks_count": {
      "type": [
        "integer",
        "null"
      ],
      "description": "tasks 陣列中的任務數",
      "format": "int64"
    },
    "tasks_error": {
      "type": [
        "integer",
        "null"
      ],
      "description": "tasks 陣列中傳回錯誤的任務數",
      "format": "int64"
    }
  }
}
```

### Response36Afe1097B20_BaseResponseTaskInfo

`#/components/schemas/Response36Afe1097B20_BaseResponseTaskInfo`

```json
{
  "properties": {
    "id": {
      "type": [
        "string",
        "null"
      ],
      "description": "任務識別碼\n我們系統中 UUID 格式的唯一任務識別碼"
    },
    "status_code": {
      "type": [
        "integer",
        "null"
      ],
      "description": "任務的狀態碼\n由 DataForSEO 產生，範圍如下：10000-60000\n完整回應碼清單請見此處"
    },
    "status_message": {
      "type": [
        "string",
        "null"
      ],
      "description": "任務的資訊訊息\n完整的一般資訊訊息清單請見此處"
    },
    "time": {
      "type": [
        "string",
        "null"
      ],
      "description": "執行時間，秒"
    },
    "cost": {
      "type": [
        "number",
        "null"
      ],
      "description": "任務總費用，美元",
      "format": "double"
    },
    "result_count": {
      "type": [
        "integer",
        "null"
      ],
      "description": "result 陣列中的元素數",
      "format": "int64"
    },
    "path": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": [
          "string",
          "null"
        ]
      },
      "description": "URL 路徑"
    },
    "data": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": {
        "type": [
          "object",
          "null"
        ]
      },
      "description": "包含你在 POST 請求中指定的相同參數"
    }
  }
}
```

### Response36Afe1097B20_ContentAnalysisCategoriesInfo

`#/components/schemas/Response36Afe1097B20_ContentAnalysisCategoriesInfo`

```json
{
  "properties": {
    "category": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": [
          "integer",
          "null"
        ]
      }
    },
    "count": {
      "type": [
        "integer",
        "null"
      ],
      "format": "int64"
    }
  }
}
```

### Response36Afe1097B20_ContentAnalysisRatingDistributionLiveResponseInfo

`#/components/schemas/Response36Afe1097B20_ContentAnalysisRatingDistributionLiveResponseInfo`

```json
{
  "type": "object",
  "allOf": [
    {
      "$ref": "#/components/schemas/Response36Afe1097B20_BaseResponseInfo"
    },
    {
      "type": "object",
      "properties": {
        "tasks": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": [
              "object",
              "null"
            ],
            "oneOf": [
              {
                "$ref": "#/components/schemas/Response36Afe1097B20_ContentAnalysisRatingDistributionLiveTaskInfo"
              }
            ]
          },
          "description": "<em>任務陣列</em>"
        }
      }
    }
  ]
}
```

### Response36Afe1097B20_ContentAnalysisRatingDistributionLiveResultInfo

`#/components/schemas/Response36Afe1097B20_ContentAnalysisRatingDistributionLiveResultInfo`

```json
{
  "type": "object",
  "properties": {
    "type": {
      "type": [
        "string",
        "null"
      ],
      "description": "元素類型"
    },
    "min": {
      "type": [
        "number",
        "null"
      ],
      "description": "<em>分佈量表上的最低評分</strong></em>"
    },
    "max": {
      "type": [
        "number",
        "null"
      ],
      "description": "<em>分佈量表上的最高評分</strong></em>"
    },
    "metrics": {
      "type": [
        "object",
        "null"
      ],
      "oneOf": [
        {
          "$ref": "#/components/schemas/Response36Afe1097B20_ContentAnalysisSummaryInfo"
        }
      ],
      "description": "<em>包含評分分佈指標</strong></em>"
    }
  }
}
```

### Response36Afe1097B20_ContentAnalysisRatingDistributionLiveTaskInfo

`#/components/schemas/Response36Afe1097B20_ContentAnalysisRatingDistributionLiveTaskInfo`

```json
{
  "type": "object",
  "allOf": [
    {
      "$ref": "#/components/schemas/Response36Afe1097B20_BaseResponseTaskInfo"
    },
    {
      "type": "object",
      "properties": {
        "result": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": [
              "object",
              "null"
            ],
            "oneOf": [
              {
                "$ref": "#/components/schemas/Response36Afe1097B20_ContentAnalysisRatingDistributionLiveResultInfo"
              }
            ]
          },
          "description": "<em>結果陣列</em>"
        }
      }
    }
  ]
}
```

### Response36Afe1097B20_ContentAnalysisSummaryInfo

`#/components/schemas/Response36Afe1097B20_ContentAnalysisSummaryInfo`

```json
{
  "type": "object",
  "properties": {
    "type": {
      "type": [
        "string",
        "null"
      ],
      "description": "元素類型"
    },
    "total_count": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em>我們資料庫中與你的請求相關的結果總數</em>",
      "format": "int64"
    },
    "rank": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em>引用 <code>keyword</code> 的所有 URL 排名</em><br>引用目標 <code>keyword</code> 的所有 URL 排名正規化總和"
    },
    "top_domains": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": [
          "object",
          "null"
        ],
        "oneOf": [
          {
            "$ref": "#/components/schemas/Response36Afe1097B20_TopDomainInfo"
          }
        ]
      },
      "description": "<em>引用目標關鍵字的熱門網域</em><br>包含引用目標關鍵字的熱門網域物件，以及每個網域的引用次數"
    },
    "sentiment_connotations": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": {
        "type": [
          "integer",
          "null"
        ],
        "format": "int64"
      },
      "description": "<em>情感含意</em><br>包含與目標關鍵字引用相關的情感（情緒反應），以及每種情感的引用次數<br>可能的情感含意：<code>anger</code>、<code>happiness</code>、<code>love</code>、<code>sadness</code>、<code>share</code>、<code>fun</code>"
    },
    "connotation_types": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": {
        "type": [
          "integer",
          "null"
        ],
        "format": "int64"
      },
      "description": "<em>情感含意類型</em><br>包含與關鍵字引用相關的情感類型（情感極性），以及每種情感類型的引用次數<br>可能的情感含意類型：<code>positive</code>、<code>negative</code>、<code>neutral</code>"
    },
    "text_categories": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": [
          "object",
          "null"
        ],
        "oneOf": [
          {
            "$ref": "#/components/schemas/Response36Afe1097B20_ContentAnalysisCategoriesInfo"
          }
        ]
      },
      "description": "<em>文字類別</em><br>包含文字類別物件及每個文字類別的引用次數<br>如需取得可用類別的完整清單，請參閱 <a href=\"/v3/content_analysis/categories/\" rel=\"noopener noreferrer\" target=\"_blank\">Categories</a> 端點"
    },
    "page_categories": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": [
          "object",
          "null"
        ],
        "oneOf": [
          {
            "$ref": "#/components/schemas/Response36Afe1097B20_ContentAnalysisCategoriesInfo"
          }
        ]
      },
      "description": "<em>頁面類別</em><br>包含頁面類別物件及每個頁面類別的引用次數<br>如需取得可用類別的完整清單，請參閱 <a href=\"/v3/content_analysis/categories/\" rel=\"noopener noreferrer\" target=\"_blank\">Categories</a> 端點"
    },
    "page_types": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": {
        "type": [
          "integer",
          "null"
        ],
        "format": "int64"
      },
      "description": "<em>頁面類型</em><br>包含頁面類型及每種頁面類型的引用次數"
    },
    "countries": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": {
        "type": [
          "integer",
          "null"
        ],
        "format": "int64"
      },
      "description": "<em>國家/地區</em><br>包含國家/地區及每個國家/地區的引用次數<br>如需取得可用國家/地區的完整清單，請參閱 <a href=\"/v3/content_analysis/locations/\" rel=\"noopener noreferrer\" target=\"_blank\">Locations</a> 端點"
    },
    "languages": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": {
        "type": [
          "integer",
          "null"
        ],
        "format": "int64"
      },
      "description": "<em>語言</em><br>包含語言及每種語言的引用次數<br>如需取得可用語言的完整清單，請參閱 <a href=\"/v3/content_analysis/languages/\" rel=\"noopener noreferrer\" target=\"_blank\">Languages</a> 端點"
    }
  }
}
```

### Response36Afe1097B20_TopDomainInfo

`#/components/schemas/Response36Afe1097B20_TopDomainInfo`

```json
{
  "properties": {
    "domain": {
      "type": [
        "string",
        "null"
      ]
    },
    "count": {
      "type": [
        "integer",
        "null"
      ],
      "format": "int64"
    }
  }
}
```
