Loading...
Loading...
Hacker News API via curl. Use this skill to fetch top stories, new posts, comments, and user profiles from Hacker News.
npx skill4agent add vm0-ai/vm0-skills hackernewscurlOfficial docs:https://github.com/HackerNews/API
https://hacker-news.firebaseio.com/v0Important: When usingin a command that pipes to another command, wrap the command containing$VARin$VAR. Due to a Claude Code bug, environment variables are silently cleared when pipes are used directly.bash -c '...'bashbash -c 'curl -s "https://api.example.com" -H "Authorization: Bearer $API_KEY"'
bash -c 'curl -s "https://hacker-news.firebaseio.com/v0/topstories.json"' | jq '.[:10]'bash -c 'curl -s "https://hacker-news.firebaseio.com/v0/beststories.json"' | jq '.[:10]'bash -c 'curl -s "https://hacker-news.firebaseio.com/v0/newstories.json"' | jq '.[:10]'bash -c 'curl -s "https://hacker-news.firebaseio.com/v0/askstories.json"' | jq '.[:10]'bash -c 'curl -s "https://hacker-news.firebaseio.com/v0/showstories.json"' | jq '.[:10]'bash -c 'curl -s "https://hacker-news.firebaseio.com/v0/jobstories.json"' | jq '.[:10]'<item-id>curl -s "https://hacker-news.firebaseio.com/v0/item/<item-id>.json"| Field | Description |
|---|---|
| Unique item ID |
| |
| Username of author |
| Unix timestamp |
| Story title (stories only) |
| Story URL (if external link) |
| Content text (Ask HN, comments) |
| Upvote count |
| Total comment count |
| Array of child comment IDs |
<item-id>bash -c 'curl -s "https://hacker-news.firebaseio.com/v0/topstories.json"' | jq '.[:5][]' | while read id; do
curl -s "https://hacker-news.firebaseio.com/v0/item/${id}.json" | jq '{id, title, score, url, by}'
done<story-id>curl -s "https://hacker-news.firebaseio.com/v0/item/<story-id>.json" | jq '{title, score, descendants, kids}'kids<comment-id>curl -s "https://hacker-news.firebaseio.com/v0/item/<comment-id>.json" | jq '{by, text, score}'<username>curl -s "https://hacker-news.firebaseio.com/v0/user/<username>.json"| Field | Description |
|---|---|
| Username |
| Account creation timestamp |
| User's karma score |
| User bio (HTML) |
| Array of item IDs submitted |
<username>curl -s "https://hacker-news.firebaseio.com/v0/user/<username>.json" | jq '.submitted[:5]'curl -s "https://hacker-news.firebaseio.com/v0/maxitem.json"curl -s "https://hacker-news.firebaseio.com/v0/updates.json"bash -c 'curl -s "https://hacker-news.firebaseio.com/v0/topstories.json"' | jq '.[:10][]' | while read id; do
curl -s "https://hacker-news.firebaseio.com/v0/item/${id}.json" | jq -r '"\(.score) points | \(.title) | \(.url // "Ask HN")"'
donebash -c 'curl -s "https://hacker-news.firebaseio.com/v0/topstories.json"' | jq '.[:30][]' | while read id; do
curl -s "https://hacker-news.firebaseio.com/v0/item/${id}.json" | jq -r 'select(.score >= 100) | "\(.score) | \(.title)"'
donebash -c 'curl -s "https://hacker-news.firebaseio.com/v0/topstories.json"' | jq '.[:50][]' | while read id; do
curl -s "https://hacker-news.firebaseio.com/v0/item/${id}.json" | jq -r 'select(.title | test("AI|GPT|LLM|Machine Learning|Neural"; "i")) | "\(.score) | \(.title)"'
done| Endpoint | Description |
|---|---|
| Top 500 stories |
| Best stories |
| Newest 500 stories |
| Ask HN stories |
| Show HN stories |
| Job postings |
| Item details |
| User profile |
| Current max item ID |
| Changed items/profiles |
url