Available in Classic and VPC
The Search Keyword Trends API is a RESTful API that retrieves data from the Search Keyword Trends section of NAVER DataLab. You can view search trend data from NAVER’s integrated search for search keywords grouped by topic.
Request
This section describes the request format. The method and URI are as follows:
| Method | URI |
|---|---|
| POST | /search-trend/v1/search |
Request headers
For information about the headers common to NAVER API HUB, see NAVER API HUB request headers.
Request body
You can include the following data in the body of your request:
| Field | Type | Required | Description |
|---|---|---|---|
startDate |
String | Required | Query period start date (yyyy-mm-dd)
|
endDate |
String | Required | Query period end date (yyyy-mm-dd) |
timeUnit |
String | Required | Section unit
|
keywordGroups |
Array | Required | An array of keywords and pairs of search keywords corresponding to those keywords: keywordGroups
|
device |
String | Optional | Search device
|
gender |
String | Optional | Gender of search users
|
ages |
Array | Optional | Age of search users
|
keywordGroups
The following describes keywordGroups.
| Field | Type | Required | Description |
|---|---|---|---|
groupName |
String | Required | Topic keyword
|
keywords |
Array | Required | Search keywords corresponding to the topic keyword
|
Request example
The request example is as follows:
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": "Korean", "keywords": ["Korean", "korean"] },
{ "groupName": "English", "keywords": ["English", "english"] }
],
"device": "pc",
"gender": "f",
"ages": ["3", "4", "5", "6", "7", "8", "9", "10", "11"]
}'
Response
This section describes the response format.
Response body
The response body includes the following data:
| Field | Type | Required | Description |
|---|---|---|---|
startDate |
String | - | Query period start date (yyyy-mm-dd) |
endDate |
String | - | Query period end date (yyyy-mm-dd) |
timeUnit |
String | - | Section unit |
results |
Array | - | Query result list: results |
results
The following describes results.
| Field | Type | Required | Description |
|---|---|---|---|
title |
String | - | Topic keyword |
keywords |
Array | - | Search keywords corresponding to the topic keyword |
data |
Array | - | Search trend data by section: data |
data
The following describes data.
| Field | Type | Required | Description |
|---|---|---|---|
period |
String | - | Start date by section (yyyy-mm-dd) |
ratio |
Number | - | Relative proportion of search volume by section
|
Response status codes
For information about the HTTP status codes common to all NAVER API HUB, see NAVER API HUB response status codes.
Response example
The response example is as follows:
{
"startDate": "2023-01-01",
"endDate": "2023-06-30",
"timeUnit": "month",
"results": [
{
"title": "Korean",
"keywords": [
"Korean",
"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": "English",
"keywords": [
"English",
"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
}
]
}
]
}