# הגדרת משימות ‘DataForSEO Trends Demography’ בזמן אמת

**API:** Data API

**Endpoint:** `POST /v1/beta/dataforseo/keywords_data/dataforseo_trends/demography/live`

**Tags:** DataForSEO

הקהל של Google Trends מאחורי מילת מפתח: פילוח גיל ומגדר על פני אותו חלון שבו משתמש `post_dataforseo_keywords_trends_explore_live`, עם אותם ארגומנטים של `type` ותאריך. התגובה עטופה במעטפת של DataForSEO: הנתונים ב-`tasks[0].result`, והתוצאה ב-`tasks[0].status_code` — גם בקשה שנדחתה מחזירה HTTP 200. זול כמו אחיו. בשביל איפה ולא מי, השתמשו ב-`post_dataforseo_keywords_trends_subregion_interests_live`.

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

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

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

## Related links

- [מאמר במרכז העזרה](<https://dataforseo.com/help-center/rules-and-limitations-of-keyword-and-keywords-fields-in-dataforseo-apis>)

## 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": {
          "keywords": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "<em>מילות מפתח</em><br><strong>שדה חובה</strong><br>המספר המרבי של מילות מפתח שאפשר לציין: 5<br>הימנעו מסימנים ותווים מיוחדים (למשל תווי UTF ואימוג'ים);<br>אם תציינו תווים שאינם לטיניים, תקבלו נתונים עבור המדינות שבהן הם משמשים<p>מידע נוסף על הכללים והמגבלות של השדות <code>keyword</code> ו-<code>keywords</code> ב-DataForSEO API מופיע במאמר במרכז העזרה"
          },
          "location_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>השם המלא של מיקום מנוע החיפוש</em><br>שדה אופציונלי<br>אם לא תשתמשו בשדה הזה, תקבלו תוצאות גלובליות<br><strong>אם תשתמשו בשדה הזה, אין צורך לציין <code>location_code</code></strong><br>אפשר לקבל את רשימת המיקומים הזמינים של מנוע החיפוש עם <code>location_name</code> שלהם על ידי שליחת בקשה נפרדת אל <code>https://api.dataforseo.com/v3/keywords_data/dataforseo_trends/locations</code><br><strong>שימו לב שהנתונים יסופקו עבור המדינה שאליה שייך ה-<code>location_name</code> שצוין;</strong><br>דוגמה:<br><code class=\"long-string\">United Kingdom</code>"
          },
          "location_code": {
            "type": [
              "integer",
              "null"
            ],
            "description": "<em>קוד מיקום מנוע החיפוש</em><br>שדה אופציונלי<br>אם לא תשתמשו בשדה הזה, תקבלו תוצאות גלובליות<br><strong>אם תשתמשו בשדה הזה, אין צורך לציין <code>location_name</code></strong><br>אפשר לקבל את רשימת המיקומים הזמינים של מנועי החיפוש עם <code>location_code</code> שלהם על ידי שליחת בקשה נפרדת אל <code>https://api.dataforseo.com/v3/keywords_data/dataforseo_trends/locations</code><br><strong>שימו לב שהנתונים יסופקו עבור המדינה שאליה שייך ה-<code>location_code</code> שצוין;</strong><br>דוגמה:<br><code class=\"long-string\">2840</code>"
          },
          "type": {
            "type": [
              "string",
              "null"
            ],
            "description": "סוג הרכיב"
          },
          "date_from": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>תאריך התחלה של טווח הזמן</em><br>שדה אופציונלי<br>אם לא מציינים את השדה הזה, ייעשה שימוש ביום ובחודש הנוכחיים של השנה הקודמת כברירת מחדל<br>הערך המזערי לסוג <code>web</code>: <code>2004-01-01</code><br>הערך המזערי לסוגים אחרים: <code>2008-01-01</code><br>פורמט תאריך: <code>\"yyyy-mm-dd\"</code><br>דוגמה:<br><code>\"2019-01-15\"</code>"
          },
          "date_to": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>תאריך סיום של טווח הזמן</em><br>שדה אופציונלי<br>אם לא מציינים את השדה הזה, ייעשה שימוש בתאריך של היום כברירת מחדל<br>פורמט תאריך: <code>\"yyyy-mm-dd\"</code><br>דוגמה:<br><code>\"2019-01-15\"</code>"
          },
          "time_range": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>טווחי זמן מוגדרים מראש</em><br>שדה אופציונלי<br>אם תציינו את הפרמטרים <code>date_from</code> או <code>date_to</code>, השדה הזה ייתעלם בעת הגדרת משימה<br><em>ערכים אפשריים לכל פרמטרי <code>type</code>:</em><br><code>past_4_hours</code>, <code>past_day</code>, <code>past_7_days</code>, <code>past_30_days</code>, <code>past_90_days</code>, <code>past_12_months</code>, <code>past_5_years</code>"
          },
          "tag": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>מזהה משימה מוגדר על ידי המשתמש</em><br>שדה אופציונלי<br><em>מגבלת התווים היא 255</em><br>אפשר להשתמש בפרמטר הזה כדי לזהות את המשימה ולהתאים אותה לתוצאה<br>את ערך ה-<code>tag</code> שציינתם תמצאו באובייקט <code>data</code> של התגובה"
          }
        },
        "example": [
          {
            "keywords": [
              "rugby",
              "cricket"
            ],
            "date_from": "2023-01-01",
            "date_to": "2024-01-01",
            "type": "web",
            "location_name": "United States"
          }
        ]
      }
    ]
  },
  "example": [
    {
      "keywords": [
        "rugby",
        "cricket"
      ],
      "date_from": "2023-01-01",
      "date_to": "2024-01-01",
      "type": "web",
      "location_name": "United States"
    }
  ]
}
```

## Responses

### 200 — פעולה מוצלחת

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

**application/json**

Schema: object | null

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

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

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

### 402 — לא ניתן להמשיך את הבקשה משום שדרישת חיוב אינה מתקיימת.

### 403 — החשבון אינו מורשה לבצע את הפעולה הזו.

### 429 — הגעתם למגבלת בקשות או לתקרת הוצאה.

### 502 — השירות לא הצליח להשלים את הבקשה.

### 503 — שירות ה-API או החיוב אינו זמין באופן זמני.

### 504 — השירות פג בזמן הטיפול בבקשה.

### default — תגובת שגיאה; תגובות מעבר מהמעלה הזרם עשויות להשתמש בפורמטים של הספק

**application/json**

Schema:

```json
{}
```

## Schema definitions

### Response36Afe1097B20_BaseKeywordDataDataforseoTrendsItem

`#/components/schemas/Response36Afe1097B20_BaseKeywordDataDataforseoTrendsItem`

```json
{
  "type": "object",
  "properties": {
    "type": {
      "type": [
        "string",
        "null"
      ],
      "description": "סוג הרכיב"
    },
    "position": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em>היישור של הרכיב</em><br>יכול לקבל את הערכים הבאים: <code>1</code>, <code>2</code>, <code>3</code>, <code>4</code>, וכו'."
    },
    "keywords": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": [
          "string",
          "null"
        ]
      },
      "description": "<em>מילות מפתח במערך POST</em>"
    }
  },
  "additionalProperties": false,
  "discriminator": {
    "propertyName": "type",
    "mapping": {
      "dataforseo_trends_graph": "#/components/schemas/Response36Afe1097B20_DataforseoTrendsDataforseoTrendsGraphElementItem",
      "subregion_interests": "#/components/schemas/Response36Afe1097B20_DataforseoTrendsSubregionInterestsElementItem",
      "demography": "#/components/schemas/Response36Afe1097B20_DataforseoTrendsDemographyElementItem"
    }
  }
}
```

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

`#/components/schemas/Response36Afe1097B20_DataforseoTrendsDataInfo`

```json
{
  "type": "object",
  "properties": {
    "keyword": {
      "type": [
        "string",
        "null"
      ],
      "description": "<em>מילת המפתח הרלוונטית שעבורה מסופקים הנתונים הדמוגרפיים</em>"
    },
    "values": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": [
          "object",
          "null"
        ],
        "oneOf": [
          {
            "$ref": "#/components/schemas/Response36Afe1097B20_DemographyItemValueInfo"
          }
        ]
      },
      "description": "<em>מכיל טווח גילאים וערכי פופולריות של מילת המפתח המתאימים</em>"
    }
  }
}
```

### Response36Afe1097B20_DataforseoTrendsDemographyElementItem

`#/components/schemas/Response36Afe1097B20_DataforseoTrendsDemographyElementItem`

```json
{
  "type": "object",
  "allOf": [
    {
      "$ref": "#/components/schemas/Response36Afe1097B20_BaseKeywordDataDataforseoTrendsItem"
    },
    {
      "type": "object",
      "properties": {
        "demography": {
          "type": [
            "object",
            "null"
          ],
          "oneOf": [
            {
              "$ref": "#/components/schemas/Response36Afe1097B20_Demography"
            }
          ],
          "description": "<em>פילוח דמוגרפי של נתוני פופולריות מילות מפתח עבור כל מונח שצוין</em><br>כולל נתוני פופולריות של מילות מפתח לפי גיל ומין"
        },
        "demography_comparison": {
          "type": [
            "object",
            "null"
          ],
          "oneOf": [
            {
              "$ref": "#/components/schemas/Response36Afe1097B20_DemographyComparisonInfo"
            }
          ],
          "description": "<em>השוואה של נתונים דמוגרפיים על פופולריות מילות מפתח עבור הפרמטרים שצוינו</em><br>כולל נתוני פופולריות של מילות מפתח לפי גיל ומין<br>אם ציינתם מילת מפתח אחת, הערך יהיה <code>null</code>"
        }
      }
    }
  ]
}
```

### Response36Afe1097B20_Demography

`#/components/schemas/Response36Afe1097B20_Demography`

```json
{
  "type": "object",
  "properties": {
    "age": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": [
          "object",
          "null"
        ],
        "oneOf": [
          {
            "$ref": "#/components/schemas/Response36Afe1097B20_DataforseoTrendsDataInfo"
          }
        ]
      },
      "description": "<em>התפלגות פופולריות מילות מפתח לפי גיל</em>"
    },
    "gender": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": [
          "object",
          "null"
        ],
        "oneOf": [
          {
            "$ref": "#/components/schemas/Response36Afe1097B20_DataforseoTrendsDataInfo"
          }
        ]
      },
      "description": "<em>התפלגות פופולריות מילות מפתח לפי מין</em>"
    }
  }
}
```

### Response36Afe1097B20_DemographyComparisonInfo

`#/components/schemas/Response36Afe1097B20_DemographyComparisonInfo`

```json
{
  "type": "object",
  "properties": {
    "age": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": {
        "type": [
          "array",
          "null"
        ],
        "items": {
          "type": [
            "integer",
            "null"
          ]
        }
      },
      "description": "סוג הרכיב"
    },
    "gender": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": {
        "type": [
          "array",
          "null"
        ],
        "items": {
          "type": [
            "integer",
            "null"
          ]
        }
      },
      "description": "סוג הרכיב"
    }
  }
}
```

### Response36Afe1097B20_DemographyItemValueInfo

`#/components/schemas/Response36Afe1097B20_DemographyItemValueInfo`

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

### Response36Afe1097B20_KeywordsDataDataforseoTrendsDemographyLiveResponseInfo

`#/components/schemas/Response36Afe1097B20_KeywordsDataDataforseoTrendsDemographyLiveResponseInfo`

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

### Response36Afe1097B20_KeywordsDataDataforseoTrendsDemographyLiveResultInfo

`#/components/schemas/Response36Afe1097B20_KeywordsDataDataforseoTrendsDemographyLiveResultInfo`

```json
{
  "type": "object",
  "properties": {
    "keywords": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": [
          "string",
          "null"
        ]
      },
      "description": "<em>מילות מפתח במערך POST</em>"
    },
    "type": {
      "type": [
        "string",
        "null"
      ],
      "description": "סוג הרכיב"
    },
    "location_code": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em>קוד מיקום במערך POST</em><br>אם אין נתונים, הערך הוא <code>null</code>"
    },
    "language_code": {
      "type": [
        "string",
        "null"
      ],
      "description": "<em>קוד שפה במערך POST</em><br>אם אין נתונים, הערך הוא <code>null</code>"
    },
    "datetime": {
      "type": [
        "string",
        "null"
      ],
      "description": "<em>התאריך והשעה שבהם התוצאה התקבלה</em><br>בפורמט UTC: “yyyy-mm-dd hh-mm-ss +00:00”<br>דוגמה:<br><code class=\"long-string\">2019-11-15 12:57:46 +00:00</code>"
    },
    "items_count": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em>מספר התוצאות שמוחזרו במערך <strong><code>items</code></strong></em>",
      "format": "int64"
    },
    "items": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": [
          "object",
          "null"
        ],
        "oneOf": [
          {
            "$ref": "#/components/schemas/Response36Afe1097B20_DataforseoTrendsDemographyElementItem"
          }
        ]
      },
      "description": "<em>מכיל את הפופולריות של מילת המפתח ונתונים קשורים</em>"
    }
  }
}
```

### Response36Afe1097B20_KeywordsDataDataforseoTrendsDemographyLiveTaskInfo

`#/components/schemas/Response36Afe1097B20_KeywordsDataDataforseoTrendsDemographyLiveTaskInfo`

```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_KeywordsDataDataforseoTrendsDemographyLiveResultInfo"
              }
            ]
          },
          "description": "<em>מערך תוצאות</em>"
        }
      }
    }
  ]
}
```
