← 返回
开发者工具 Key

Naver news Search

Search Korean news articles using Naver Search API. Use when searching for Korean news, getting latest news updates, finding news about specific topics, or preparing daily news summaries. Supports relevance and date-based sorting.
使用 Naver Search API 搜索韩语新闻文章。适用于搜索韩语新闻、获取最新动态、查找特定主题新闻或准备每日新闻摘要。支持按相关性和日期排序。
steamb23
开发者工具 clawhub v1.0.2 1 版本 99465.4 Key: 需要
★ 3
Stars
📥 3,289
下载
💾 228
安装
1
版本
#latest

概述

Naver News Search

Search Korean news articles using the Naver Search API.

Quick Start

Use the provided script to search news:

python scripts/search_news.py "검색어" --display 10 --sort date

Options:

  • --display N: Number of results per page (1-100, default: 10)
  • --start N: Start position for pagination (1-1000, default: 1)
  • --sort sim|date: Sort by relevance (sim) or date (date, default: date)
  • --after DATETIME: Only show news published after this time (ISO 8601 format, e.g., 2026-01-29T09:00:00+09:00)
  • --min-results N: Minimum number of results to fetch (enables auto-pagination)
  • --max-pages N: Maximum number of pages to try when auto-paginating (default: 5)
  • --json: Output raw JSON instead of formatted text

Setup

Environment Variables

Required credentials from https://developers.naver.com/:

NAVER_CLIENT_ID=your_client_id
NAVER_CLIENT_SECRET=your_client_secret

Configuration locations:

  • Sandbox (default): Add to agents.defaults.sandbox.docker.env in OpenClaw config
  • Host: Add to env.vars in OpenClaw config

Getting API Credentials

  1. Visit https://developers.naver.com/
  2. Register an application
  3. Enable "검색" (Search) API
  4. Copy Client ID and Client Secret
  5. Add credentials to appropriate config section (see above)

Common Use Cases

Latest news on a topic

python scripts/search_news.py "AI 인공지능" --display 20 --sort date

Search with relevance ranking

python scripts/search_news.py "삼성전자" --sort sim

Filter by time (only recent news)

# News published after 9 AM today
python scripts/search_news.py "경제" --display 50 --sort sim --after "2026-01-29T09:00:00+09:00"

# News from the last hour (programmatic use)
python scripts/search_news.py "속보" --after "$(date -u -d '1 hour ago' '+%Y-%m-%dT%H:%M:%S%z')"

Auto-pagination for guaranteed minimum results

# Fetch at least 30 results (automatically requests multiple pages if needed)
python scripts/search_news.py "AI" --sort sim --after "2026-01-29T09:00:00+09:00" --min-results 30 --display 50

# Limit to 3 pages maximum
python scripts/search_news.py "게임" --min-results 50 --max-pages 3

How auto-pagination works:

  1. Fetches first page (e.g., 50 results)
  2. Applies date filter (e.g., 10 results remain)
  3. If below --min-results, automatically fetches next page
  4. Stops when minimum is reached or --max-pages limit hit

Pagination for more results

# First 10 results
python scripts/search_news.py "경제" --display 10 --start 1

# Next 10 results
python scripts/search_news.py "경제" --display 10 --start 11

Using in Python Code

Import and use the search function directly:

from scripts.search_news import search_news

result = search_news(
    query="경제 뉴스",
    display=10,
    sort="date"
)

for item in result["items"]:
    print(item["title"])
    print(item["description"])
    print(item["link"])

API Details

For complete API reference including response structure, error codes, and rate limits, see:

references/api.md

Notes

  • Search queries must be UTF-8 encoded
  • Results include tags around search term matches (strip them for clean text)
  • Daily limit: 25,000 API calls per application
  • link field may point to Naver News or original source depending on availability

版本历史

共 1 个版本

  • v1.0.2 当前
    2026-03-28 11:07 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

developer-tools

CodeConductor.ai

larsonreever
AI驱动平台,提供快速全栈开发、智能体、工作流自动化及低代码AI集成的可扩展产品创建。
★ 66 📥 179,854
developer-tools

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 667 📥 323,813
productivity

Korea Weather

steamb23
从韩国气象厅(기상청)获取天气信息。提供当前天气状况、预报(3-10天)和天气预警/警告(기상특보)。
★ 1 📥 1,819