Hacker news scraper

Search Hacker News stories and comments using the free Algolia API.

How to use it

  1. Hit Copy the whole skill.
  2. Claude: ⋯ → Download .md, then Customize → Skills → Add → Upload skill.
    ChatGPT: make a Project and paste it into Instructions.
    Neither? Paste it at the top of a new chat — it works for that chat.
  3. Describe your job in plain words. The AI follows the skill from there.
Claude Code — installs the whole folder, not just SKILL.md
npx degit gooseworks-ai/goose-skills/skills/monitoring/capabilities/hacker-news-scraper#main ~/.claude/skills/hacker-news-scraper

For one project only, change the path to .claude/skills/hacker-news-scraper.

Not working?
  • Check which app you pasted it into — the steps above name the right one.
  • Some skills need the paid tier of Claude or ChatGPT.
Step-by-step guide with screenshots · Ask in the forum

Paste into Claude, ChatGPT or Cursor.

Show the full text70 lines
hacker-news-scraper/SKILL.md70 lines2.1 KBpushed 96d agoRawView on GitHub

Hacker News Scraper

Search Hacker News using the free Algolia HN Search API. No Apify token or API key needed.

Quick Start

Only dependency: pip install requests.

# Stories about AI content marketing in last week
python3 skills/hacker-news-scraper/scripts/search_hn.py \
  --query "AI content marketing" --days 7

# Show HN posts in last month (summary view)
python3 skills/hacker-news-scraper/scripts/search_hn.py \
  --query "" --tags show_hn --days 30 --output summary

# Comments mentioning a specific tool
python3 skills/hacker-news-scraper/scripts/search_hn.py \
  --query "LangChain" --tags comment --days 14 --max-results 20

How the Script Works

  1. Queries the Algolia HN Search API (search_by_date endpoint)
  2. Uses numericFilters=created_at_i>{unix_timestamp} for server-side date filtering
  3. Paginates until max-results reached
  4. Normalizes results to a consistent schema
  5. Applies optional keyword filtering (client-side)
  6. Sorts by points (descending) and outputs JSON or summary

CLI Reference

Flag Default Description
--query required Search query
--days 7 How many days back to search
--tags story Item type: story, comment, ask_hn, show_hn
--max-results 50 Max results to return
--keywords none Additional filter keywords (comma-separated, OR logic)
--output json Output format: json or summary

Output Format

{
  "id": "12345678",
  "title": "Show HN: My new tool",
  "url": "https://example.com",
  "author": "username",
  "points": 42,
  "num_comments": 15,
  "created_at": "2026-02-18T12:00:00.000Z",
  "hn_url": "https://news.ycombinator.com/item?id=12345678",
  "text": ""
}

Cost

Free. No API key, no rate limits (within reason), no Apify credits.

1---
2name: hacker-news-scraper
3description: >
4 Search Hacker News stories and comments using the free Algolia API.
5 No Apify token needed. Use when you need to find HN discussions, track mentions,
6 discover Show HN launches, or monitor tech community sentiment.
7---
8 
9# Hacker News Scraper
10 
11Search Hacker News using the free [Algolia HN Search API](https://hn.algolia.com/api). No Apify token or API key needed.
12 
13## Quick Start
14 
15Only dependency: `pip install requests`.
16 
17```bash
18# Stories about AI content marketing in last week
19python3 skills/hacker-news-scraper/scripts/search_hn.py \
20 --query "AI content marketing" --days 7
21 
22# Show HN posts in last month (summary view)
23python3 skills/hacker-news-scraper/scripts/search_hn.py \
24 --query "" --tags show_hn --days 30 --output summary
25 
26# Comments mentioning a specific tool
27python3 skills/hacker-news-scraper/scripts/search_hn.py \
28 --query "LangChain" --tags comment --days 14 --max-results 20
29```
30 
31## How the Script Works
32 
331. Queries the Algolia HN Search API (`search_by_date` endpoint)
342. Uses `numericFilters=created_at_i>{unix_timestamp}` for server-side date filtering
353. Paginates until max-results reached
364. Normalizes results to a consistent schema
375. Applies optional keyword filtering (client-side)
386. Sorts by points (descending) and outputs JSON or summary
39 
40## CLI Reference
41 
42| Flag | Default | Description |
43|------|---------|-------------|
44| `--query` | *required* | Search query |
45| `--days` | 7 | How many days back to search |
46| `--tags` | story | Item type: `story`, `comment`, `ask_hn`, `show_hn` |
47| `--max-results` | 50 | Max results to return |
48| `--keywords` | none | Additional filter keywords (comma-separated, OR logic) |
49| `--output` | json | Output format: `json` or `summary` |
50 
51## Output Format
52 
53```json
54{
55 "id": "12345678",
56 "title": "Show HN: My new tool",
57 "url": "https://example.com",
58 "author": "username",
59 "points": 42,
60 "num_comments": 15,
61 "created_at": "2026-02-18T12:00:00.000Z",
62 "hn_url": "https://news.ycombinator.com/item?id=12345678",
63 "text": ""
64}
65```
66 
67## Cost
68 
69**Free.** No API key, no rate limits (within reason), no Apify credits.
70 

Discussion

Alternatives

Also in Company & contact data