Loading...
Loading...
Search and monitor Hacker News stories, comments, and users via the free Algolia API. Use when the user asks about HN discussions, wants to find posts about a topic, or monitor HN for mentions. No API key required.
npx skill4agent add dylanfeltus/skills hn-searchhttps://hn.algolia.com/api/v1/search/search_by_datehttps://hn.algolia.com/api/v1/search?query=QUERY&tags=TAG&hitsPerPage=N&numericFilters=FILTERSweb_fetchweb_fetch| Parameter | Description | Example |
|---|---|---|
| Search terms (URL-encoded) | |
| Filter by type (see below) | |
| Results per page (max 1000) | |
| Page number (0-indexed) | |
| Numeric filters (see below) | |
tags| Tag | Description |
|---|---|
| Stories only |
| Comments only |
| Show HN posts |
| Ask HN posts |
| Currently on front page |
| Posts by a specific user |
| Comments on a specific story |
tags=story,show_hntags=(story,comment)| Filter | Description |
|---|---|
| Minimum points/upvotes |
| Minimum comments |
| After Unix timestamp |
| Before Unix timestamp |
numericFilters=points>100,num_comments>50created_at_iexec: date +%s| Window | Subtract from now |
|---|---|
| Last 24 hours | |
| Last 7 days | |
| Last 30 days | |
1705312200numericFilters=created_at_i>1704707400{
"objectID": "12345",
"title": "Story Title",
"url": "https://example.com/article",
"author": "username",
"points": 150,
"num_comments": 42,
"created_at": "2024-01-15T10:30:00Z",
"created_at_i": 1705312200,
"story_text": "Text for Ask HN / Show HN (HTML)",
"_tags": ["story", "author_username", "story_12345"]
}{
"comment_text": "The comment body (HTML)",
"story_id": 12345,
"story_title": "Parent Story Title",
"story_url": "https://example.com",
"parent_id": 12344
}{
"hits": [...],
"nbHits": 1000,
"page": 0,
"nbPages": 50,
"hitsPerPage": 20
}https://news.ycombinator.com/item?id={objectID}https://news.ycombinator.com/item?id={objectID}https://news.ycombinator.com/user?id={author}https://hn.algolia.com/api/v1/search?query=YOUR_QUERY&tags=story&hitsPerPage=10https://hn.algolia.com/api/v1/search?query=YOUR_QUERY&tags=story&numericFilters=points>50,created_at_i>TIMESTAMP&hitsPerPage=10https://hn.algolia.com/api/v1/search?tags=comment,story_STORYID&hitsPerPage=20/search_by_date/searchhttps://hn.algolia.com/api/v1/search_by_date?query=YOUR_QUERY&tags=(story,comment)&hitsPerPage=20https://hn.algolia.com/api/v1/search?tags=author_USERNAME,story&hitsPerPage=20tags=author_USERNAME,comment### HN Results for "query" (N total)
1. **Story Title** (150 pts, 42 comments)
By username · Jan 15, 2024
🔗 https://example.com/article
💬 https://news.ycombinator.com/item?id=12345
2. ...### HN Comments on "Story Title"
1. **username** (12 pts) · Jan 15, 2024
> First ~200 chars of the comment text...
💬 https://news.ycombinator.com/item?id=12345Fetch: https://hn.algolia.com/api/v1/search?query=rust+programming&tags=story&hitsPerPage=5&numericFilters=points>50# Calculate timestamp for 30 days ago, then:
Fetch: https://hn.algolia.com/api/v1/search_by_date?query=ai+agents&tags=show_hn&numericFilters=created_at_i>TIMESTAMP&hitsPerPage=10Fetch: https://hn.algolia.com/api/v1/search_by_date?tags=author_pg&hitsPerPage=10