# Content Analysis – 感情分析 API

**API:** Data API

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

**Tags:** DataForSEO

キーワードの引用に対する感情分布です。`positive_connotation_distribution`（positive、negative、neutral）と `sentiment_connotation_distribution`（anger、happiness、love、sadness、share、fun）です。`positive_connotation_threshold` と `sentiments_connotation_threshold` は、分類が計上されるために必要な信頼度を設定します。⚠️ どちらのブロックも `post_dataforseo_content_summary_live` にすでに含まれており、同じ料金でドメイン、カテゴリ、国、言語も追加されます。レスポンスの小ささが重要な場合を除き、そちらを優先してください。星評価別の感情分布を見るには `post_dataforseo_content_rating_distribution_live` を使用してください。

### 料金の参考情報

- 計量方式：レスポンスで報告されるコスト。
- 参考リクエスト見積もり：0.024 USD。
- 参考顧客乗数：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": "ターゲットキーワード\n必須フィールド\nUTF-8 エンコーディング\nキーワードは小文字形式に変換されます\n注意: 単独のキーワードではなく完全なフレーズに一致させるには、二重引用符とバックスラッシュを使用します\n例:\n\"keyword\": \"\\\"tesla palo alto\\\"\"\nDataForSEO API の keyword フィールドと keywords フィールドのルールと制限については、こちらのヘルプセンター記事を参照してください"
          },
          "keyword_fields": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": {
              "type": [
                "string",
                "null"
              ]
            },
            "description": "ターゲットキーワードフィールドとターゲットキーワード\n任意フィールド\nこのパラメーターを使用して、特定のフィールドに含まれるキーワードでデータセットをフィルターします\n指定できるフィールド: title、main_title、previous_title、snippet\n複数のフィールドを指定できます\n注意: 単独のキーワードではなく完全なフレーズに一致させるには、二重引用符とバックスラッシュを使用します\n例:\n\"keyword_fields\": {\n   \"snippet\": \"\\\"logitech mouse\\\"\",\n   \"main_title\": \"sale\"\n}"
          },
          "page_type": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "ターゲットページタイプ\n任意フィールド\nこのパラメーターを使用して、ページタイプでデータセットをフィルターします\n使用可能な値:\n\"ecommerce\"、\"news\"、\"blogs\"、\"message-boards\"、\"organization\""
          },
          "internal_list_limit": {
            "type": [
              "integer",
              "null"
            ],
            "description": "内部配列内の要素の最大数\n任意フィールド\nこのフィールドを使用して、次の配列内の要素数を制限できます:\ntop_domains\ntext_categories\npage_categories\ncountries\nlanguages\nデフォルト値: 1\n最大値: 20"
          },
          "positive_connotation_threshold": {
            "type": [
              "number",
              "null"
            ],
            "description": "ポジティブな含意のしきい値\n任意フィールド\n引用内容に関連するポジティブな感情の確率指数のしきい値として指定します\nこのフィールドを指定すると、レスポンスの connotation_types オブジェクトには、positive 感情の確率が指定値以上の引用に関するデータのみが含まれます\n使用可能な値: 0 から 1\nデフォルト値: 0.4"
          },
          "sentiments_connotation_threshold": {
            "type": [
              "number",
              "null"
            ],
            "description": "感情の含意のしきい値\n任意フィールド\n引用内容に関連する感情の含意の確率指数のしきい値として指定します\nこのフィールドを指定すると、レスポンスの sentiment_connotations オブジェクトには、各感情の確率がすべて指定値以上の引用に関するデータのみが含まれます\n使用可能な値: 0 から 1\nデフォルト値: 0.4"
          },
          "initial_dataset_filters": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": [
                "object",
                "null"
              ]
            },
            "description": "初期データセットのフィルターパラメーター\n任意フィールド\nSearch エンドポイントのフィールドに適用される初期フィルターパラメーター\n複数のフィルターを同時に追加できます（最大 8 個）\n条件の間には論理演算子 and、or を設定してください\n次の演算子がサポートされています:\nregex、not_regex、<、<=、>、>=、=、<>、in、not_in、like、not_like、has、has_not、match、not_match\nlike と not_like で % 演算子を使用すると、0 文字以上の任意の文字列に一致させられます\n例:\n[\"domain\",\"<>\", \"logitech.com\"]\n[[\"domain\",\"<>\",\"logitech.com\"],\"and\",[\"content_info.connotation_types.negative\",\">\",1000]]\n[[\"domain\",\"<>\",\"logitech.com\"]],\n\"and\",\n[[\"content_info.connotation_types.negative\",\">\",1000],\n\"or\",\n[\"content_info.text_category\",\"has\",10994]]]\nフィルターの詳細については、Content Analysis API – Filters を参照してください\n初期データセットフィルターの詳細については、こちらのヘルプセンター記事をご覧ください。"
          },
          "rank_scale": {
            "type": [
              "string",
              "null"
            ],
            "description": "rank 値の計算と表示に使用するスケールを定義します\n任意フィールド\nこのパラメーターを使用して、rank 値を 0–100 と 0–1000 のどちらのスケールで表示するかを選択できます\n使用可能な値:\none_hundred — rank 値は 0–100 のスケールで表示されます\none_thousand — rank 値は 0–1000 のスケールで表示されます\nデフォルト値: one_thousand\nこのパラメーターの動作の詳細については、こちらのヘルプセンター記事を参照してください"
          },
          "tag": {
            "type": [
              "string",
              "null"
            ],
            "description": "ユーザー定義のタスク識別子\n任意フィールド\n文字数上限は 255 です\nこのパラメーターを使ってタスクを識別し、結果と照合できます\n指定した tag の値は、レスポンスの data オブジェクトに含まれます"
          }
        },
        "example": [
          {
            "keyword": "logitech",
            "internal_list_limit": 1
          }
        ]
      }
    ]
  },
  "example": [
    {
      "keyword": "logitech",
      "internal_list_limit": 1
    }
  ]
}
```

## Responses

### 200 — 操作成功

Headers:
- `X-Request-Id` (string) — Felo サポートに問い合わせる際に伝えるリクエスト識別子。

**application/json**

Schema: object | null

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

### 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": "タスクの総コスト（USD）",
      "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": "タスクのステータスコード\nDataForSEO によって生成され、次の範囲の値になります: 10000-60000\nレスポンスコードの完全な一覧はこちらです"
    },
    "status_message": {
      "type": [
        "string",
        "null"
      ],
      "description": "タスクの情報メッセージ\n一般的な情報メッセージの完全な一覧はこちらです"
    },
    "time": {
      "type": [
        "string",
        "null"
      ],
      "description": "実行時間（秒）"
    },
    "cost": {
      "type": [
        "number",
        "null"
      ],
      "description": "タスクの総コスト（USD）",
      "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_ContentAnalysisSentimentAnalysisLiveResponseInfo

`#/components/schemas/Response36Afe1097B20_ContentAnalysisSentimentAnalysisLiveResponseInfo`

```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_ContentAnalysisSentimentAnalysisLiveTaskInfo"
              }
            ]
          },
          "description": "タスクの配列"
        }
      }
    }
  ]
}
```

### Response36Afe1097B20_ContentAnalysisSentimentAnalysisLiveResultInfo

`#/components/schemas/Response36Afe1097B20_ContentAnalysisSentimentAnalysisLiveResultInfo`

```json
{
  "type": "object",
  "properties": {
    "type": {
      "type": [
        "string",
        "null"
      ],
      "description": "要素の種類"
    },
    "positive_connotation_distribution": {
      "type": [
        "object",
        "null"
      ],
      "oneOf": [
        {
          "$ref": "#/components/schemas/Response36Afe1097B20_PositiveConnotationDistribution"
        }
      ],
      "description": "感情の含意タイプ別の引用分布\n感情のタイプ（感情の極性）別に分布した引用数と関連データを含むオブジェクトが含まれます；\n可能な感情の含意タイプ: positive、negative、neutral"
    },
    "sentiment_connotation_distribution": {
      "type": [
        "object",
        "null"
      ],
      "oneOf": [
        {
          "$ref": "#/components/schemas/Response36Afe1097B20_SentimentConnotationDistribution"
        }
      ],
      "description": "感情の含意別の引用分布\n感情（感情的反応）別に分布した引用数と関連データを含むオブジェクトが含まれます；\n可能な感情の含意タイプ: anger、happiness、love、sadness、share、fun"
    }
  }
}
```

### Response36Afe1097B20_ContentAnalysisSentimentAnalysisLiveTaskInfo

`#/components/schemas/Response36Afe1097B20_ContentAnalysisSentimentAnalysisLiveTaskInfo`

```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_ContentAnalysisSentimentAnalysisLiveResultInfo"
              }
            ]
          },
          "description": "結果の配列"
        }
      }
    }
  ]
}
```

### 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_PositiveConnotationDistribution

`#/components/schemas/Response36Afe1097B20_PositiveConnotationDistribution`

```json
{
  "type": "object",
  "properties": {
    "positive": {
      "type": [
        "object",
        "null"
      ],
      "oneOf": [
        {
          "$ref": "#/components/schemas/Response36Afe1097B20_ContentAnalysisSummaryInfo"
        }
      ]
    },
    "negative": {
      "type": [
        "object",
        "null"
      ],
      "oneOf": [
        {
          "$ref": "#/components/schemas/Response36Afe1097B20_ContentAnalysisSummaryInfo"
        }
      ]
    },
    "neutral": {
      "type": [
        "object",
        "null"
      ],
      "oneOf": [
        {
          "$ref": "#/components/schemas/Response36Afe1097B20_ContentAnalysisSummaryInfo"
        }
      ]
    }
  }
}
```

### Response36Afe1097B20_SentimentConnotationDistribution

`#/components/schemas/Response36Afe1097B20_SentimentConnotationDistribution`

```json
{
  "type": "object",
  "properties": {
    "anger": {
      "type": [
        "object",
        "null"
      ],
      "oneOf": [
        {
          "$ref": "#/components/schemas/Response36Afe1097B20_ContentAnalysisSummaryInfo"
        }
      ]
    },
    "happiness": {
      "type": [
        "object",
        "null"
      ],
      "oneOf": [
        {
          "$ref": "#/components/schemas/Response36Afe1097B20_ContentAnalysisSummaryInfo"
        }
      ]
    },
    "love": {
      "type": [
        "object",
        "null"
      ],
      "oneOf": [
        {
          "$ref": "#/components/schemas/Response36Afe1097B20_ContentAnalysisSummaryInfo"
        }
      ]
    },
    "sadness": {
      "type": [
        "object",
        "null"
      ],
      "oneOf": [
        {
          "$ref": "#/components/schemas/Response36Afe1097B20_ContentAnalysisSummaryInfo"
        }
      ]
    },
    "share": {
      "type": [
        "object",
        "null"
      ],
      "oneOf": [
        {
          "$ref": "#/components/schemas/Response36Afe1097B20_ContentAnalysisSummaryInfo"
        }
      ]
    },
    "fun": {
      "type": [
        "object",
        "null"
      ],
      "oneOf": [
        {
          "$ref": "#/components/schemas/Response36Afe1097B20_ContentAnalysisSummaryInfo"
        }
      ]
    }
  }
}
```

### Response36Afe1097B20_TopDomainInfo

`#/components/schemas/Response36Afe1097B20_TopDomainInfo`

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