# API Analisis Sentimen – Analisis Konten

**API:** Data API

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

**Tags:** DataForSEO

Distribusi sentimen untuk sitasi sebuah kata kunci: `positive_connotation_distribution` (positive, negative, neutral) dan `sentiment_connotation_distribution` (anger, happiness, love, sadness, share, fun). `positive_connotation_threshold` dan `sentiments_connotation_threshold` menetapkan seberapa yakin klasifikasi harus agar dihitung. ⚠️ Kedua blok sudah ada di dalam `post_dataforseo_content_summary_live`, yang berbiaya sama dan menambahkan domain, kategori, negara, dan bahasa - pilih itu kecuali respons yang lebih kecil penting. Untuk melihat pemisahan sentimen menurut peringkat bintang, gunakan `post_dataforseo_content_rating_distribution_live`.

### Referensi harga

- Pengukuran: biaya respons yang dilaporkan.
- Perkiraan referensi per permintaan: USD 0,024.
- Pengali referensi pelanggan: 1,0. Jangan menerapkannya lagi pada jumlah tagihan pelanggan yang telah diselesaikan.

Hanya metadata referensi, bukan penawaran akun, harga yang dijamin, atau batas pengeluaran. Kredit sumber daya bukan kredit Felo. Biaya akhir mengikuti catatan penagihan Felo.

## Related links

- [Categories](<https://docs.dataforseo.com/v3/content_analysis/categories/>)
- [Locations](<https://docs.dataforseo.com/v3/content_analysis/locations/>)
- [Languages](<https://docs.dataforseo.com/v3/content_analysis/languages/>)

## 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": "kata kunci target\nfield wajib\npengodean UTF-8\nkata kunci akan diubah ke format huruf kecil;\nCatatan: untuk mencocokkan frasa persis alih-alih kata kunci mandiri, gunakan tanda kutip ganda dan garis miring terbalik;\ncontoh:\n\"keyword\": \"\\\"tesla palo alto\\\"\"\npelajari lebih lanjut tentang aturan dan batasan field keyword dan keywords di API DataForSEO di artikel Pusat Bantuan ini"
          },
          "keyword_fields": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": {
              "type": [
                "string",
                "null"
              ]
            },
            "description": "field kata kunci target dan kata kunci target\nfield opsional\ngunakan parameter ini untuk memfilter set data berdasarkan kata kunci yang harus dimuat oleh field tertentu;\nfield yang dapat Anda tentukan: title, main_title, previous_title, snippet\nAnda dapat menunjukkan beberapa field;\nCatatan: untuk mencocokkan frasa persis alih-alih kata kunci mandiri, gunakan tanda kutip ganda dan garis miring terbalik;\ncontoh:\n\"keyword_fields\": {\n   \"snippet\": \"\\\"logitech mouse\\\"\",\n   \"main_title\": \"sale\"\n}"
          },
          "page_type": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "jenis halaman target\nfield opsional\ngunakan parameter ini untuk memfilter set data berdasarkan jenis halaman\nnilai yang mungkin:\n\"ecommerce\", \"news\", \"blogs\", \"message-boards\", \"organization\""
          },
          "internal_list_limit": {
            "type": [
              "integer",
              "null"
            ],
            "description": "jumlah maksimum elemen dalam array internal\nfield opsional\nAnda dapat menggunakan field ini untuk membatasi jumlah elemen dalam array berikut:\ntop_domains\ntext_categories\npage_categories\ncountries\nlanguages\nnilai default: 1\nnilai maksimum: 20"
          },
          "positive_connotation_threshold": {
            "type": [
              "number",
              "null"
            ],
            "description": "ambang konotasi positif\nfield opsional\nditentukan sebagai ambang indeks probabilitas untuk sentimen positif terkait konten sitasi\njika Anda menentukan field ini, objek connotation_types dalam respons hanya akan berisi data sitasi dengan probabilitas sentimen positive lebih besar dari atau sama dengan nilai yang ditentukan\nnilai yang mungkin: dari 0 hingga 1\nnilai default: 0.4"
          },
          "sentiments_connotation_threshold": {
            "type": [
              "number",
              "null"
            ],
            "description": "ambang konotasi sentimen\nfield opsional\nditentukan sebagai ambang indeks probabilitas untuk konotasi sentimen terkait konten sitasi\njika Anda menentukan field ini, objek sentiment_connotations dalam respons hanya akan berisi data sitasi yang probabilitas setiap sentimennya lebih besar dari atau sama dengan nilai yang ditentukan\nnilai yang mungkin: dari 0 hingga 1\nnilai default: 0.4"
          },
          "initial_dataset_filters": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": [
                "object",
                "null"
              ]
            },
            "description": "parameter filter set data awal\nfield opsional\nparameter filter awal yang berlaku untuk field di Search endpoint\nAnda dapat menambahkan beberapa filter sekaligus (maksimal 8 filter)\nAnda harus menetapkan operator logika and, or di antara kondisi\noperator berikut didukung:\nregex, not_regex, <, <=, >, >=, =, <>, in, not_in, like,not_like, has, has_not, match, not_match\nAnda dapat menggunakan operator % dengan like dan not_like untuk mencocokkan string apa pun dengan nol atau lebih karakter\ncontoh:\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]]]\nuntuk informasi selengkapnya tentang filter, lihat API Analisis Konten – Filter\npelajari lebih lanjut tentang filter set data awal di artikel pusat bantuan ini."
          },
          "rank_scale": {
            "type": [
              "string",
              "null"
            ],
            "description": "menentukan skala yang digunakan untuk menghitung dan menampilkan nilai rank\nfield opsional\nAnda dapat menggunakan parameter ini untuk memilih apakah nilai rank disajikan pada skala 0–100 atau 0–1000\nnilai yang mungkin:\none_hundred — nilai rank ditampilkan pada skala 0–100\none_thousand — nilai rank ditampilkan pada skala 0–1000\nnilai default: one_thousand\npelajari lebih lanjut tentang cara parameter ini bekerja di artikel Pusat Bantuan ini"
          },
          "tag": {
            "type": [
              "string",
              "null"
            ],
            "description": "pengenal tugas yang ditentukan pengguna\nfield opsional\nbatas karakter adalah 255\nAnda dapat menggunakan parameter ini untuk mengidentifikasi tugas dan mencocokkannya dengan hasil\nAnda akan menemukan nilai tag yang ditentukan di objek data pada respons"
          }
        },
        "example": [
          {
            "keyword": "logitech",
            "internal_list_limit": 1
          }
        ]
      }
    ]
  },
  "example": [
    {
      "keyword": "logitech",
      "internal_list_limit": 1
    }
  ]
}
```

## Responses

### 200 — Operasi berhasil

Headers:
- `X-Request-Id` (string) — Pengenal permintaan yang harus disertakan saat menghubungi dukungan Felo.

**application/json**

Schema: object | null

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

### 400 — Permintaan tidak dapat diproses. Periksa parameter permintaan.

### 401 — Kunci API Felo yang valid diperlukan.

### 402 — Permintaan tidak dapat dilanjutkan karena persyaratan penagihan belum terpenuhi.

### 403 — Akun tidak diizinkan melakukan operasi ini.

### 429 — Batas permintaan atau batas pengeluaran telah tercapai.

### 502 — Layanan tidak dapat menyelesaikan permintaan.

### 503 — API atau layanan penagihan untuk sementara tidak tersedia.

### 504 — Layanan kehabisan waktu saat memproses permintaan.

### default — Respons error; respons passthrough upstream dapat menggunakan format penyedia

**application/json**

Schema:

```json
{}
```

## Schema definitions

### Response36Afe1097B20_BaseResponseInfo

`#/components/schemas/Response36Afe1097B20_BaseResponseInfo`

```json
{
  "properties": {
    "version": {
      "type": [
        "string",
        "null"
      ],
      "description": "versi API saat ini"
    },
    "status_code": {
      "type": [
        "integer",
        "null"
      ],
      "description": "kode status umum; Anda dapat menemukan daftar lengkap kode respons di sini"
    },
    "status_message": {
      "type": [
        "string",
        "null"
      ],
      "description": "pesan informasi umum; Anda dapat menemukan daftar lengkap pesan informasi umum di sini"
    },
    "time": {
      "type": [
        "string",
        "null"
      ],
      "description": "total waktu eksekusi, detik"
    },
    "cost": {
      "type": [
        "number",
        "null"
      ],
      "description": "total biaya tugas, USD",
      "format": "double"
    },
    "tasks_count": {
      "type": [
        "integer",
        "null"
      ],
      "description": "jumlah tugas dalam array tasks",
      "format": "int64"
    },
    "tasks_error": {
      "type": [
        "integer",
        "null"
      ],
      "description": "jumlah tugas dalam array tasks yang dikembalikan dengan error",
      "format": "int64"
    }
  }
}
```

### Response36Afe1097B20_BaseResponseTaskInfo

`#/components/schemas/Response36Afe1097B20_BaseResponseTaskInfo`

```json
{
  "properties": {
    "id": {
      "type": [
        "string",
        "null"
      ],
      "description": "pengenal tugas; pengenal tugas unik di sistem kami dalam format UUID"
    },
    "status_code": {
      "type": [
        "integer",
        "null"
      ],
      "description": "kode status tugas yang dihasilkan oleh DataForSEO; dapat berada dalam rentang berikut: 10000-60000; Anda dapat menemukan daftar lengkap kode respons di sini"
    },
    "status_message": {
      "type": [
        "string",
        "null"
      ],
      "description": "pesan informasi tugas; Anda dapat menemukan daftar lengkap pesan informasi umum di sini"
    },
    "time": {
      "type": [
        "string",
        "null"
      ],
      "description": "waktu eksekusi, detik"
    },
    "cost": {
      "type": [
        "number",
        "null"
      ],
      "description": "total biaya tugas, USD",
      "format": "double"
    },
    "result_count": {
      "type": [
        "integer",
        "null"
      ],
      "description": "jumlah elemen dalam array hasil",
      "format": "int64"
    },
    "path": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": [
          "string",
          "null"
        ]
      },
      "description": "Jalur URL"
    },
    "data": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": {
        "type": [
          "object",
          "null"
        ]
      },
      "description": "berisi parameter yang sama dengan yang Anda tentukan dalam permintaan 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": "array tugas"
        }
      }
    }
  ]
}
```

### Response36Afe1097B20_ContentAnalysisSentimentAnalysisLiveResultInfo

`#/components/schemas/Response36Afe1097B20_ContentAnalysisSentimentAnalysisLiveResultInfo`

```json
{
  "type": "object",
  "properties": {
    "type": {
      "type": [
        "string",
        "null"
      ],
      "description": "jenis elemen"
    },
    "positive_connotation_distribution": {
      "type": [
        "object",
        "null"
      ],
      "oneOf": [
        {
          "$ref": "#/components/schemas/Response36Afe1097B20_PositiveConnotationDistribution"
        }
      ],
      "description": "distribusi kutipan menurut jenis konotasi sentimen\nberisi objek dengan jumlah kutipan dan data relevan yang didistribusikan menurut jenis sentimen (polaritas sentimen);\njenis konotasi sentimen yang tersedia: positive, negative, neutral"
    },
    "sentiment_connotation_distribution": {
      "type": [
        "object",
        "null"
      ],
      "oneOf": [
        {
          "$ref": "#/components/schemas/Response36Afe1097B20_SentimentConnotationDistribution"
        }
      ],
      "description": "distribusi kutipan menurut konotasi sentimen\nberisi objek dengan jumlah kutipan dan data relevan yang didistribusikan menurut sentimen (reaksi emosional);\njenis konotasi sentimen yang tersedia: 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": "array hasil"
        }
      }
    }
  ]
}
```

### Response36Afe1097B20_ContentAnalysisSummaryInfo

`#/components/schemas/Response36Afe1097B20_ContentAnalysisSummaryInfo`

```json
{
  "type": "object",
  "properties": {
    "type": {
      "type": [
        "string",
        "null"
      ],
      "description": "jenis elemen"
    },
    "total_count": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em>jumlah total hasil di basis data kami yang relevan dengan permintaan Anda</em>",
      "format": "int64"
    },
    "rank": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em>peringkat semua URL yang mengutip <code>keyword</code></em><br>jumlah ternormalisasi peringkat semua URL yang mengutip <code>keyword</code> target"
    },
    "top_domains": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": [
          "object",
          "null"
        ],
        "oneOf": [
          {
            "$ref": "#/components/schemas/Response36Afe1097B20_TopDomainInfo"
          }
        ]
      },
      "description": "<em>domain teratas yang mengutip kata kunci target</em><br>berisi objek dengan domain teratas yang mengutip kata kunci target dan jumlah kutipan per domain"
    },
    "sentiment_connotations": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": {
        "type": [
          "integer",
          "null"
        ],
        "format": "int64"
      },
      "description": "<em>konotasi sentimen</em><br>berisi sentimen (reaksi emosional) yang terkait dengan kutipan kata kunci target dan jumlah kutipan per sentimen<br>konotasi sentimen yang tersedia: <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>jenis konotasi</em><br>berisi jenis sentimen (polaritas sentimen) yang terkait dengan kutipan kata kunci dan jumlah kutipan per jenis sentimen<br>jenis konotasi sentimen yang tersedia: <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>kategori teks</em><br>berisi objek dengan kategori teks dan jumlah kutipan di setiap kategori teks<br>untuk mendapatkan daftar lengkap kategori yang tersedia, lihat endpoint Categories"
    },
    "page_categories": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": [
          "object",
          "null"
        ],
        "oneOf": [
          {
            "$ref": "#/components/schemas/Response36Afe1097B20_ContentAnalysisCategoriesInfo"
          }
        ]
      },
      "description": "<em>kategori halaman</em><br>berisi objek dengan kategori halaman dan jumlah kutipan di setiap kategori halaman<br>untuk mendapatkan daftar lengkap kategori yang tersedia, lihat endpoint Categories"
    },
    "page_types": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": {
        "type": [
          "integer",
          "null"
        ],
        "format": "int64"
      },
      "description": "<em>jenis halaman</em><br>berisi jenis halaman dan jumlah kutipan per jenis halaman"
    },
    "countries": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": {
        "type": [
          "integer",
          "null"
        ],
        "format": "int64"
      },
      "description": "<em>negara</em><br>berisi negara dan jumlah kutipan di setiap negara<br>untuk mendapatkan daftar lengkap negara yang tersedia, lihat endpoint Locations"
    },
    "languages": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": {
        "type": [
          "integer",
          "null"
        ],
        "format": "int64"
      },
      "description": "<em>bahasa</em><br>berisi bahasa dan jumlah kutipan di setiap bahasa<br>untuk mendapatkan daftar lengkap bahasa yang tersedia, lihat endpoint Languages"
    }
  }
}
```

### 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"
    }
  }
}
```
