# Kepadatan Kata Kunci

**API:** Data API

**Endpoint:** `POST /v1/beta/dataforseo/on_page/keyword_density`

**Tags:** DataForSEO

Frekuensi kata dan frasa di seluruh crawl, dengan `keyword_length` menentukan ukuran n-gram. Mengembalikan `total_items_count`, `items_count`, dan `items`. Membaca crawl yang sudah selesai, jadi memerlukan `id` dari `post_dataforseo_on_page_submit` dan mengembalikan `crawl_progress` plus `crawl_status` berisi `max_crawl_pages`, `pages_in_queue`, dan `pages_crawled` - periksa nilai tersebut sebelum memercayai hasil yang sedikit, karena crawl yang masih berjalan memang punya lebih sedikit hal untuk dilaporkan. Ini menjelaskan apa yang dikatakan situs tentang dirinya sendiri; untuk apa yang dikatakan web tentangnya gunakan `post_dataforseo_backlinks_anchors_live`, dan untuk apa yang orang cari gunakan `post_dataforseo_keywords_gads_search_volume_live`. 💰 Gratis di sisi upstream: menanyakan crawl yang sudah selesai tidak dikenakan biaya, hanya crawl itu sendiri.

### Referensi harga

- Metering: Biaya respons yang dilaporkan.
- Estimasi referensi per permintaan: USD 0.012.
- Pengali pelanggan referensi: 1.0. Jangan terapkan lagi pada jumlah pelanggan yang telah diselesaikan.

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

## Related links

- [Task POST](<https://docs.dataforseo.com/v3/on_page/task_post/>)
- [tautan ini.](<https://docs.dataforseo.com/v3/on_page/filters_and_thresholds/?bash>)

## 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": {
          "id": {
            "type": "string",
            "description": "<em>ID tugas</em><br><strong>field wajib</strong><br>Anda dapat memperoleh ID ini di respons endpoint Task POST<br>contoh:<br>\"07131248-1535-0216-1000-17384017ad04\""
          },
          "keyword_length": {
            "type": "integer",
            "description": "<em>jumlah kata untuk kata kunci</em><br><strong>field wajib</strong><br>nilai yang mungkin:<br><code>1</code>, <code>2</code>, <code>3</code>, <code>4</code>, <code>5</code>"
          },
          "url": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>URL halaman</em><br>field opsional<br><strong>jika Anda tidak menentukan halaman di sini, hasil akan diberikan untuk seluruh situs web</strong><br>jika Anda menggunakan field ini, respons API hanya akan berisi kata kunci dari halaman yang ditentukan<br>halaman harus ditentukan dengan URL absolut (termasuk <code>http://</code> atau <code>https://</code>)"
          },
          "limit": {
            "type": [
              "integer",
              "null"
            ],
            "description": "<em>jumlah maksimum kata kunci yang dikembalikan</em><br>field opsional<br>nilai default: <code>100</code><br>nilai maksimum: <code>1000</code>"
          },
          "filters": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": [
                "object",
                "null"
              ]
            },
            "description": "<em>array parameter filter hasil</em><br>field opsional<br><strong>Anda dapat menambahkan beberapa filter sekaligus (maksimum 8 filter)</strong><br>Anda harus menetapkan operator logika <code>and</code>, <code>or</code> di antara kondisi<br>operator berikut didukung:<br><code>regex</code>, <code>not_regex</code>, <code>=</code>, <code>&lt;&gt;</code>, <code>in</code>, <code>not_in</code>, <code>like</code>, <code>not_like</code><br>Anda dapat menggunakan operator <code>%</code> dengan <code>like</code> dan <code>not_like</code> untuk mencocokkan string apa pun dengan nol atau lebih karakter<br>contoh:<br><code>[\"keyword\",\"=\",\"%seo%\"]</code><p><code>[[\"keyword\",\"=\",\"%seo%\"],<br>\"and\",<br>[\"frequency\",\"&lt;\",\"6\"]]</code><p><code>[[\"keyword\",\"not_like\",\"%seo%\"],<br>\"and\",<br>[[\"frequency\",\"&gt;\",\"6\"],\"or\",[\"density\",\"&gt;\",\"0.02\"]]]</code><p>Daftar lengkap filter yang mungkin tersedia di tautan ini."
          },
          "order_by": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "<em>aturan pengurutan hasil</em><br>field opsional<br>Anda dapat menggunakan nilai yang sama seperti di array <code>filters</code> untuk mengurutkan hasil<br>jenis pengurutan yang mungkin:<br><code>asc</code> - hasil akan diurutkan dalam urutan menaik<br><code>desc</code> - hasil akan diurutkan dalam urutan menurun<br>Anda harus menggunakan koma untuk menyiapkan jenis pengurutan<br>contoh:<br><code>[\"frequency,desc\"]</code><br><strong>perhatikan bahwa Anda tidak dapat menetapkan lebih dari tiga aturan pengurutan dalam satu permintaan</strong><br>Anda harus menggunakan koma untuk memisahkan beberapa aturan pengurutan<br>contoh:<br><code>[\"keyword,asc\",\"frequency,desc\"]</code>"
          },
          "tag": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>pengenal tugas yang ditentukan pengguna</em><br>field opsional<br><em>batas karakter adalah 255</em><br>Anda dapat menggunakan parameter ini untuk mengidentifikasi tugas dan mencocokkannya dengan hasil<br>Anda akan menemukan nilai <code>tag</code> yang ditentukan di objek <code>data</code> pada respons"
          }
        },
        "example": [
          {
            "id": "09101923-1535-0216-0000-2389a8854b70",
            "url": "https://dataforseo.com/",
            "keyword_length": 2,
            "filters": [
              "frequency",
              ">",
              5
            ]
          }
        ]
      }
    ]
  },
  "example": [
    {
      "id": "09101923-1535-0216-0000-2389a8854b70",
      "url": "https://dataforseo.com/",
      "keyword_length": 2,
      "filters": [
        "frequency",
        ">",
        5
      ]
    }
  ]
}
```

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

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

`#/components/schemas/Response36Afe1097B20_CrawlStatusInfo`

```json
{
  "type": "object",
  "properties": {
    "max_crawl_pages": {
      "type": [
        "integer",
        "null"
      ],
      "description": "jumlah halaman maksimum untuk dirayapi\nmenunjukkan batas max_crawl_pages yang Anda tentukan saat membuat tugas",
      "format": "int64"
    },
    "pages_in_queue": {
      "type": [
        "integer",
        "null"
      ],
      "description": "jumlah halaman yang saat ini berada dalam antrean perayapan",
      "format": "int64"
    },
    "pages_crawled": {
      "type": [
        "integer",
        "null"
      ],
      "description": "jumlah halaman yang dirayapi",
      "format": "int64"
    }
  }
}
```

### Response36Afe1097B20_OnPageKeywordDensityItem

`#/components/schemas/Response36Afe1097B20_OnPageKeywordDensityItem`

```json
{
  "type": "object",
  "properties": {
    "keyword": {
      "type": [
        "string",
        "null"
      ],
      "description": "<em>kata kunci yang dikembalikan</em>"
    },
    "frequency": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em>frekuensi kata kunci</em><br>jumlah kemunculan kata kunci di situs web (atau halaman web jika Anda menentukan <code>url</code>)"
    },
    "density": {
      "type": [
        "number",
        "null"
      ],
      "description": "<em>kepadatan kata kunci</em><br>dihitung sebagai rasio <code>frequency</code> terhadap total kata kunci dengan <code>keyword_length</code> yang ditetapkan di halaman web atau situs web"
    }
  }
}
```

### Response36Afe1097B20_OnPageKeywordDensityResponseInfo

`#/components/schemas/Response36Afe1097B20_OnPageKeywordDensityResponseInfo`

```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_OnPageKeywordDensityTaskInfo"
              }
            ]
          },
          "description": "<em>array tugas</em>"
        }
      }
    }
  ]
}
```

### Response36Afe1097B20_OnPageKeywordDensityResultInfo

`#/components/schemas/Response36Afe1097B20_OnPageKeywordDensityResultInfo`

```json
{
  "type": "object",
  "properties": {
    "crawl_progress": {
      "type": [
        "string",
        "null"
      ],
      "description": "<em>status sesi crawl</em><br>nilai yang mungkin: <code>in_progress</code>, <code>finished</code>"
    },
    "crawl_status": {
      "type": [
        "object",
        "null"
      ],
      "oneOf": [
        {
          "$ref": "#/components/schemas/Response36Afe1097B20_CrawlStatusInfo"
        }
      ],
      "description": "<em>detail sesi crawl</em>"
    },
    "total_items_count": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em>total item relevan</em><br>total kata kunci di situs web atau halaman web yang ditentukan yang cocok dengan <code>keyword_length</code> dan <code>filters</code> yang ditetapkan",
      "format": "int64"
    },
    "items_count": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em>jumlah item dalam array hasil</em>",
      "format": "int64"
    },
    "items": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": [
          "object",
          "null"
        ],
        "oneOf": [
          {
            "$ref": "#/components/schemas/Response36Afe1097B20_OnPageKeywordDensityItem"
          }
        ]
      },
      "description": "<em>array items</em>"
    }
  }
}
```

### Response36Afe1097B20_OnPageKeywordDensityTaskInfo

`#/components/schemas/Response36Afe1097B20_OnPageKeywordDensityTaskInfo`

```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_OnPageKeywordDensityResultInfo"
              }
            ]
          },
          "description": "<em>array hasil</em>"
        }
      }
    }
  ]
}
```
