从Y Combinator的Hacker News提取结构化数据。抓取热门资讯、最新资讯、招聘信息、Ask HN讨论、Show HN项目、评论和用户资料。纯HTTP -- 无需Chrome,无需Playwright。
# 通过Apify API启动一次运行 curl -X POST "https://api.apify.com/v2/acts/santamaria-automations~ycombinator-scraper/runs?token=YOUR_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "mode": "top", "maxResults": 100, "includeComments": true }' # 或通过MCP与AI代理一起使用: # https://mcp.apify.com?tools=santamaria-automations/ycombinator-scraper
| 特性 | NanoScrape | HN API封装 |
|---|---|---|
| Docker镜像 | ~12MB | 不确定 |
| 内存占用 | 128MB | 不确定 |
| 每1k条目成本 | $0.50 | $2 - $10 |
| 输出格式 | 结构化JSON | 原始API格式 |
| 包含评论 | 是(嵌套) | 需要单独调用 |
| 搜索 | 内置 | Algolia API |
| 字段 | 类型 | 示例 |
|---|---|---|
| title | string | Show HN: I built a new database |
| url | string | https://example.com/article |
| score | number | 342 |
| author | string | pg |
| comment_count | number | 187 |
| created_at | string | 2026-04-23T08:15:00Z |
| type | string | story |
| hn_url | string | https://news.ycombinator.com/item?id=... |