# Naver DataLab Trends Scraper (`searchapi/naver-datalab-trends-scraper`) Actor

Scrapes public keyword trend data from Naver DataLab (datalab.naver.com). Extracts relative search volume indices for up to 5 keyword groups over a specified period, with optional device/gender/age filters.

- **URL**: https://apify.com/searchapi/naver-datalab-trends-scraper.md
- **Developed by:** [Search API](https://apify.com/searchapi) (community)
- **Categories:** Developer tools, SEO tools, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.99 / 1,000 search results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Naver DataLab Trends Scraper

Collect relative public search-volume indices from Naver DataLab for up to five keyword groups. Each group may combine related spellings or terms. The output preserves Naver's numeric 0–100 series as typed `dataPoints`, plus the exact requested range, time unit, device, gender, age buckets, and source provenance.

Use `timeUnit` values `date`, `week`, or `month`. Device is all, `pc`, or `mo`; gender is all, `f`, or `m`. Age codes follow the public DataLab form: 1 is under 13, 2 is 13–18, 3 is 19–24, continuing through 11 for 60+. Dates must be between 2016-01-01 and today and must be ordered.

```json
{
  "keywords": [{"name":"AI","keywords":["인공지능","AI"]}],
  "startDate":"2026-01-01",
  "endDate":"2026-03-31",
  "timeUnit":"month",
  "device":"",
  "gender":"",
  "ages":[]
}
```

Each dataset row represents one group. `id` identifies the group and complete filter request. `dataPoints` contains `{period, value}` objects; values are relative indices, not absolute search counts and should not be compared across independently normalized requests. `pointCount` is validated against the array length. Empty or unstructured chart fallbacks fail closed rather than storing page text as trend data.

The Actor automates the public DataLab form, captures the returned `graph_data` payload, applies the requested granularity and filters, and performs bounded single-page execution. It does not require Naver credentials or use private APIs. Run `npm test`, `npm run check`, `apify validate-schema`, and `node validate-datasets.js` for QA. Use modest request volume and comply with Naver's terms and applicable law.

# Actor input Schema

## `keywords` (type: `array`):

List of keyword groups to track. Each group has a main keyword and optional sub-keywords.

## `startDate` (type: `string`):

Start date in YYYY-MM-DD format (from 2016-01-01)

## `endDate` (type: `string`):

End date in YYYY-MM-DD format

## `timeUnit` (type: `string`):

Time granularity for trend data

## `device` (type: `string`):

Filter by device: empty for all, pc for desktop, mo for mobile

## `gender` (type: `string`):

Filter by gender: empty for all, f for female, m for male

## `ages` (type: `array`):

Naver DataLab age-bucket codes: 1=under 13, 2=13–18, 3=19–24, …, 11=60+.

## `proxyConfiguration` (type: `object`):

Proxy settings for the scraper

## Actor input object example

```json
{
  "keywords": [
    {
      "name": "Camping",
      "keywords": [
        "캠핑",
        "Camping"
      ]
    }
  ],
  "startDate": "2025-01-01",
  "endDate": "2025-12-31",
  "timeUnit": "month",
  "device": "",
  "gender": "",
  "ages": []
}
```

# Actor output Schema

## `dataset` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "keywords": [
        {
            "name": "Keyword Group 1",
            "keywords": [
                "인공지능",
                "AI",
                "Artificial Intelligence"
            ]
        },
        {
            "name": "Keyword Group 2",
            "keywords": [
                "머신러닝",
                "Machine Learning"
            ]
        }
    ],
    "ages": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("searchapi/naver-datalab-trends-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "keywords": [
        {
            "name": "Keyword Group 1",
            "keywords": [
                "인공지능",
                "AI",
                "Artificial Intelligence",
            ],
        },
        {
            "name": "Keyword Group 2",
            "keywords": [
                "머신러닝",
                "Machine Learning",
            ],
        },
    ],
    "ages": [],
}

# Run the Actor and wait for it to finish
run = client.actor("searchapi/naver-datalab-trends-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "keywords": [
    {
      "name": "Keyword Group 1",
      "keywords": [
        "인공지능",
        "AI",
        "Artificial Intelligence"
      ]
    },
    {
      "name": "Keyword Group 2",
      "keywords": [
        "머신러닝",
        "Machine Learning"
      ]
    }
  ],
  "ages": []
}' |
apify call searchapi/naver-datalab-trends-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,searchapi/naver-datalab-trends-scraper"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/6qkW4wxDC5bh1081I/builds/nPja2ENrr0kq1gJcq/openapi.json
