360 Secure SkillHub
360 安全技能中心

Hacker News Surfer

通过公开 API 获取 Hacker News 热门、最新与高分故事列表,并按关键词过滤 AI 相关话题,还可读取故事详情与用户信息;附带 bash 脚本和命令行示例,依赖 curl 与 jq,无需安装和 API Key。

zhaog100
zhaog100
热度 45.74
最近更新 2026-03-11 14:06:48
分类:搜索依赖:代码执行 / 第三方 API应用场景:研究 / 自动化脚本 / 数据处理

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add hacker-news-surfer
Metadata
name
hacker-news-surfer
description
Surf Hacker News for AI and tech discussions. Get top stories, search for AI topics, and analyze trending tech news.

Hacker News Surfer

Hacker News(HN)冲浪技能,获取热门技术话题和 AI 相关讨论。

Features

  • ✅ Top Stories - Get current top stories
  • ✅ New Stories - Get latest submissions
  • ✅ Best Stories - Get highest-rated stories
  • ✅ Search AI Topics - Find AI-related discussions
  • ✅ Story Details - Get comments and metadata

API

Base URL: https://hacker-news.firebaseio.com/v0/

Endpoints:

  • /topstories.json - Top story IDs
  • /newstories.json - New story IDs
  • /beststories.json - Best story IDs
  • /item/{id}.json - Story details
  • /user/{id}.json - User profile

Usage

Get Top Stories

# Get top 10 story IDs
curl -s "https://hacker-news.firebaseio.com/v0/topstories.json" | jq -r '.[:10]'

# Get story details
curl -s "https://hacker-news.firebaseio.com/v0/item/47306655.json" | jq '{
  title: .title,
  url: .url,
  score: .score,
  by: .by,
  time: .time
}'

Search AI Topics

# Get top stories and filter for AI
curl -s "https://hacker-news.firebaseio.com/v0/topstories.json" | \
  jq -r '.[:50]' | \
  while read id; do
    curl -s "https://hacker-news.firebaseio.com/v0/item/$id.json" | \
      jq -r 'select(.title | test("AI|artificial intelligence|machine learning|ML|GPT|Claude"; "i"))'
  done

Quick Test

# Test API connection
curl -s "https://hacker-news.firebaseio.com/v0/topstories.json" | jq -r '.[0]'

Examples

See USAGE.md for detailed examples:

  • Get top AI stories
  • Search specific topics
  • Analyze story trends
  • Get user profiles

Installation

✅ No installation required - uses public API

Rate Limit

  • No official rate limit
  • Be respectful (1 request/second recommended)

Cost

  • ✅ Free - No API key required