# צפיפות מילות מפתח

**API:** Data API

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

**Tags:** DataForSEO

תדירות מילים וביטויים לאורך סריקה, כאשר `keyword_length` קובע את גודל ה-n-gram. מחזיר `total_items_count`, `items_count` ו-`items`. קורא סריקה שהסתיימה, ולכן זקוק ל-`id` מ-`post_dataforseo_on_page_submit` ומחזיר `crawl_progress` עם `crawl_status` של `max_crawl_pages`, `pages_in_queue` ו-`pages_crawled` — בדקו אותם לפני שמסתמכים על תוצאה קטנה, כי סריקה שעדיין רצה פשוט מדווחת על פחות. זה מתאר מה אתר אומר על עצמו; למה שהאינטרנט אומר עליו השתמשו ב-`post_dataforseo_backlinks_anchors_live`, ולמה שאנשים מחפשים — ב-`post_dataforseo_keywords_gads_search_volume_live`. 💰 חינם מהספק: שאילתה על סריקה שהסתיימה אינה עולה דבר, רק הסריקה עצמה.

### מראה תמחור

- מדידה: עלות תגובה מדווחת.
- אומדן בקשת ייחוס: 0.012 דולר ארה״ב.
- מכפיל לקוח לייחוס: 1.0. אין להחיל אותו בשנית על סכום לקוח שכבר נקבע.

זהו מטא-נתון לעיון בלבד, לא הצעת מחיר לחשבון, לא מחיר מובטח ולא תקרת הוצאה. קרדיטי משאבים אינם קרדיטים של Felo. החיוב הסופי נעשה לפי רשומות החיוב של Felo.

## Related links

- [Task POST](<https://docs.dataforseo.com/v3/on_page/task_post/>)
- [בקישור הזה.](<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>מזהה המשימה</em><br><strong>שדה חובה</strong><br>אפשר לקבל את המזהה הזה בתגובה של נקודת הקצה Task POST<br>דוגמה:<br>\"07131248-1535-0216-1000-17384017ad04\""
          },
          "keyword_length": {
            "type": "integer",
            "description": "<em>מספר מילים במילת מפתח</em><br><strong>שדה חובה</strong><br>ערכים אפשריים:<br><code>1</code>, <code>2</code>, <code>3</code>, <code>4</code>, <code>5</code>"
          },
          "url": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>כתובת URL של עמוד</em><br>שדה אופציונלי<br><strong>אם לא מציינים עמוד כאן, התוצאות יסופקו עבור האתר כולו</strong><br>אם משתמשים בשדה הזה, תגובת ה-API תכיל רק מילות מפתח מהעמוד שצוין<br>יש לציין עמוד בכתובת URL מוחלטת (כולל <code>http://</code> או <code>https://</code>)"
          },
          "limit": {
            "type": [
              "integer",
              "null"
            ],
            "description": "<em>המספר המרבי של מילות מפתח מוחזרות</em><br>שדה אופציונלי<br>ברירת מחדל: <code>100</code><br>הערך המרבי: <code>1000</code>"
          },
          "filters": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": [
                "object",
                "null"
              ]
            },
            "description": "<em>מערך של פרמטרים לסינון תוצאות</em><br>שדה אופציונלי<br><strong>אפשר להוסיף כמה מסננים בבת אחת (8 מסננים לכל היותר)</strong><br>יש להגדיר אופרטור לוגי <code>and</code> או <code>or</code> בין התנאים<br>האופרטורים הבאים נתמכים:<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>אפשר להשתמש באופרטור <code>%</code> עם <code>like</code> ו-<code>not_like</code> כדי להתאים כל מחרוזת של אפס תווים או יותר<br>דוגמה:<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>הרשימה המלאה של המסננים האפשריים זמינה בקישור הזה."
          },
          "order_by": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "<em>כללי מיון תוצאות</em><br>שדה אופציונלי<br>אפשר להשתמש באותם ערכים כמו במערך <code>filters</code> כדי למיין את התוצאות<br>סוגי מיון אפשריים:<br><code>asc</code> - התוצאות ימוינו בסדר עולה<br><code>desc</code> - התוצאות ימוינו בסדר יורד<br>יש להשתמש בפסיק כדי להגדיר סוג מיון<br>דוגמה:<br><code>[\"frequency,desc\"]</code><br><strong>שימו לב שאין להגדיר יותר משלושה כללי מיון בבקשה אחת</strong><br>יש להשתמש בפסיק כדי להפריד בין כמה כללי מיון<br>דוגמה:<br><code>[\"keyword,asc\",\"frequency,desc\"]</code>"
          },
          "tag": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>מזהה משימה מוגדר על ידי המשתמש</em><br>שדה אופציונלי<br><em>מגבלת התווים היא 255</em><br>אפשר להשתמש בפרמטר הזה כדי לזהות את המשימה ולהתאים אותה לתוצאה<br>את ערך ה-<code>tag</code> שציינתם תמצאו באובייקט <code>data</code> של התגובה"
          }
        },
        "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 — פעולה מוצלחת

Headers:
- `X-Request-Id` (string) — מזהה בקשה לכלול בעת פנייה לתמיכת Felo.

**application/json**

Schema: object | null

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

### 400 — לא ניתן היה לעבד את הבקשה. בדקו את פרמטרי הבקשה.

### 401 — נדרש מפתח API תקף של Felo.

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

`#/components/schemas/Response36Afe1097B20_CrawlStatusInfo`

```json
{
  "type": "object",
  "properties": {
    "max_crawl_pages": {
      "type": [
        "integer",
        "null"
      ],
      "description": "המספר המרבי של עמודים לסריקה\nמציין את מגבלת max_crawl_pages שהגדרתם בעת הגדרת משימה",
      "format": "int64"
    },
    "pages_in_queue": {
      "type": [
        "integer",
        "null"
      ],
      "description": "מספר העמודים שנמצאים כרגע בתור הסריקה",
      "format": "int64"
    },
    "pages_crawled": {
      "type": [
        "integer",
        "null"
      ],
      "description": "מספר העמודים שנסרקו",
      "format": "int64"
    }
  }
}
```

### Response36Afe1097B20_OnPageKeywordDensityItem

`#/components/schemas/Response36Afe1097B20_OnPageKeywordDensityItem`

```json
{
  "type": "object",
  "properties": {
    "keyword": {
      "type": [
        "string",
        "null"
      ],
      "description": "<em>מילת המפתח שהוחזרה</em>"
    },
    "frequency": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em>תדירות מילת המפתח</em><br>מספר הפעמים שמילת המפתח מופיעה באתר (או בעמוד אם ציינתם <code>url</code>)"
    },
    "density": {
      "type": [
        "number",
        "null"
      ],
      "description": "<em>צפיפות מילות מפתח</em><br>מחושבת כיחס בין <code>frequency</code> לספירה הכוללת של מילות מפתח עם <code>keyword_length</code> מוגדר בעמוד האינטרנט או באתר"
    }
  }
}
```

### 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>מערך משימות</em>"
        }
      }
    }
  ]
}
```

### Response36Afe1097B20_OnPageKeywordDensityResultInfo

`#/components/schemas/Response36Afe1097B20_OnPageKeywordDensityResultInfo`

```json
{
  "type": "object",
  "properties": {
    "crawl_progress": {
      "type": [
        "string",
        "null"
      ],
      "description": "<em>מצב הפעלת הסריקה</em><br>ערכים אפשריים: <code>in_progress</code>, <code>finished</code>"
    },
    "crawl_status": {
      "type": [
        "object",
        "null"
      ],
      "oneOf": [
        {
          "$ref": "#/components/schemas/Response36Afe1097B20_CrawlStatusInfo"
        }
      ],
      "description": "<em>פרטי הפעלת הסריקה</em>"
    },
    "total_items_count": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em>המספר הכולל של פריטים רלוונטיים</em><br>המספר הכולל של מילות מפתח באתר או בעמוד שצוין, שתואמות ל-<code>keyword_length</code> ול-<code>filters</code> שהוגדרו",
      "format": "int64"
    },
    "items_count": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em>מספר הפריטים במערך התוצאות</em>",
      "format": "int64"
    },
    "items": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": [
          "object",
          "null"
        ],
        "oneOf": [
          {
            "$ref": "#/components/schemas/Response36Afe1097B20_OnPageKeywordDensityItem"
          }
        ]
      },
      "description": "<em>מערך הפריטים</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>מערך תוצאות</em>"
        }
      }
    }
  ]
}
```
