Documentation Index

Fetch the complete documentation index at: https://api.ncloud-docs.com/llms.txt

Use this file to discover all available pages before exploring further.

キーワードトレンドの照会

Prev Next

Classic/VPC環境で利用できます。

検索キーワードトレンド APIは、NAVER DataLab検索キーワードトレンドを照会する RESTful APIです。テーマでグループ化した検索キーワードについて、NAVER統合検索での検索推移データを確認できます。

リクエスト

リクエスト形式を説明します。リクエスト形式は次の通りです。

メソッド URI
POST /search-trend/v1/search

リクエストヘッダ

NAVER API HUBで共通して使用されるヘッダの詳細は、NAVER API HUBのリクエストヘッダをご参照ください。

リクエストボディ

リクエストボディの説明は次の通りです。

フィールド タイプ 必須の有無 説明
startDate String Required 照会期間の開始日 (yyyy-mm-dd)
  • 2016年1月1日から照会可能
endDate String Required 照会期間の終了日 (yyyy-mm-dd)
timeUnit String Required 区間の単位
  • date | week | month
    • date: 日間
    • week: 週間
    • month: 月間
keywordGroups Array Required テーマとテーマに該当する検索キーワードグループペアの配列: keywordGroups
  • 最大5つのペアまで設定可能
device String Optional 検索機器
  • pc | mo
    • pc: PCでの検索の推移
    • mo: モバイルでの検索の推移
  • デフォルト: すべての環境
gender String Optional 検索ユーザーの性別
  • m | f
    • m: 男性
    • f: 女性
  • デフォルト: 全性別
ages Array Optional 検索ユーザーの年齢
  • 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11
    • 1: 0~12才
    • 2: 13~18才
    • 3: 19~24才
    • 4: 25~29才
    • 5: 30~34才
    • 6: 35~39才
    • 7: 40~44才
    • 8: 45~49才
    • 9: 50~54才
    • 10: 55~59才
    • 11: 60才以上
  • デフォルト: 全年齢

keywordGroups

keywordGroupsの説明は次の通りです。

フィールド タイプ 必須の有無 説明
groupName String Required テーマ
  • 検索キーワードグループを代表する名前
keywords Array Required テーマに該当する検索キーワード
  • 最大20個の検索キーワードを設定可能

リクエスト例

リクエストのサンプルコードは次の通りです。

curl --location --request POST https://naverapihub.apigw.ntruss.com/search-trend/v1/search
--header X-NCP-APIGW-API-KEY-ID: {Client ID}
--header X-NCP-APIGW-API-KEY: {Client Secret}
--header Content-Type: application/json
--data '{
    "startDate": "2023-01-01",
    "endDate": "2023-06-30",
    "timeUnit": "month",
    "keywordGroups": [
        { "groupName": "ハングル", "keywords": ["ハングル", "korean"] },
        { "groupName": "英語", "keywords": ["英語", "english"] }
    ],
    "device": "pc",
    "gender": "f",
    "ages": ["3", "4", "5", "6", "7", "8", "9", "10", "11"]
}'

レスポンス

レスポンス形式を説明します。

レスポンスボディ

レスポンスボディの説明は次の通りです。

フィールド タイプ 必須の有無 説明
startDate String - 照会期間の開始日 (yyyy-mm-dd)
endDate String - 照会期間の終了日 (yyyy-mm-dd)
timeUnit String - 区間単位
results Array - 照会結果リスト: results

results

resultsの説明は次の通りです。

フィールド タイプ 必須の有無 説明
title String - テーマ
keywords Array - テーマに該当する検索キーワード
data Array - 区間別の検索推移データ: data

data

dataの説明は次の通りです。

フィールド タイプ 必須の有無 説明
period String - 区間別開始日 (yyyy-mm-dd)
ratio Number - 区間ごとの検索数の相対的な割合
  • 区間ごとの結果のうち、最も大きな値を100として設定した相対値

レスポンスステータスコード

NAVER API HUBで共通して使用されるレスポンスステータスコードの詳細は、NAVER API HUBのレスポンスステータスコードをご参照ください。

レスポンス例

レスポンスのサンプルコードは次の通りです。

{
    "startDate": "2023-01-01",
    "endDate": "2023-06-30",
    "timeUnit": "month",
    "results": [
        {
            "title": "ハングル",
            "keywords": [
                "ハングル",
                "korean"
            ],
            "data": [
                {
                    "period": "2023-01-01",
                    "ratio": 70.15342
                },
                {
                    "period": "2023-02-01",
                    "ratio": 74.21207
                },
                {
                    "period": "2023-03-01",
                    "ratio": 100
                },
                {
                    "period": "2023-04-01",
                    "ratio": 84.46829
                }
            ]
        },
        {
            "title": "英語",
            "keywords": [
                "英語",
                "english"
            ],
            "data": [
                {
                    "period": "2023-01-01",
                    "ratio": 26.67976
                },
                {
                    "period": "2023-02-01",
                    "ratio": 25.81815
                },
                {
                    "period": "2023-03-01",
                    "ratio": 29.68029
                },
                {
                    "period": "2023-04-01",
                    "ratio": 27.57161
                }
            ]
        }
    ]
}