---
name: hacker-news-scraper-efefb9377d26
description: >
  Search Hacker News stories and comments using the free Algolia API.
  No Apify token needed. Use when you need to find HN discussions, track mentions,
  discover Show HN launches, or monitor tech community sentiment.
---

# Hacker News Scraper

Search Hacker News using the free [Algolia HN Search API](https://hn.algolia.com/api). No Apify token or API key needed.

## Quick Start

Only dependency: `pip install requests`.

```bash
# 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

```json
{
  "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.


---
Source attribution: gooseworks-ai
Original project: https://github.com/gooseworks-ai/goose-skills/blob/1add09bd8e0d057e91e25c96b9282498e2fcb2a2/skills/shared/hacker-news-scraper/SKILL.md
License: MIT
License information: https://opensource.org/license/mit
Original upstream instructions; downloaded from Mega AI Hub.

## Upstream license notice

MIT License

Copyright (c) 2026 GooseWorks

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.



# Mega AI Hub resource metadata

Creator / publisher: gooseworks-ai
Original project: https://github.com/gooseworks-ai/goose-skills/blob/1add09bd8e0d057e91e25c96b9282498e2fcb2a2/skills/shared/hacker-news-scraper/SKILL.md
Attribution basis: Source repository record

Fields of work: Marketing
Roles: Marketing Analyst, Content Marketer, Growth Marketer
Specialties: API, Cross Platform
Tools: Algolia
Country applicability: Country not specified
Classification basis: Source category, role and specialization labels
Instruction SHA-256: fe97e1bcaffcad0b74f8c7e58b629c3664d9473aecf7b3576a8b57961328baf7
