# Hacker News Scraper: Top Stories, Show HN & Hiring Leads (`authoritative_glen/hackernews-trends-stories-leads`) Actor

Scrape Hacker News front page top stories, Show HN launches, Ask HN questions, Who is Hiring job leads, and keyword searches. Fast, structured, zero login required.

- **URL**: https://apify.com/authoritative_glen/hackernews-trends-stories-leads.md
- **Developed by:** [Rahmad Rizki](https://apify.com/authoritative_glen) (community)
- **Categories:** Developer tools, AI, Business
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-usage

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Hacker News Scraper: Top Stories, Show HN & Hiring Leads

Extract Hacker News front page top stories, breakout "Show HN" products, community "Ask HN" discussions, monthly "Who Is Hiring" tech job leads, and custom keyword searches.

Fast, reliable, structured JSON output, zero login or API keys required. Designed for developers, founders, AI Agents (Model Context Protocol / MCP), recruiters, and market intelligence researchers.

***

### Features

- **Front Page & Top Stories:** Track what the global tech community is discussing in real-time.
- **Show HN Launches:** Discover breakthrough startup products, developer tools, and open-source projects.
- **Ask HN Discussions:** Monitor engineering advice, industry questions, and technical debates.
- **Monthly "Who Is Hiring" Leads:** Automatically extracts remote tech job openings, salaries, and company postings from official YC hiring threads.
- **Custom Keyword Search:** Query historical and current Hacker News archives by keyword (e.g. `LLM`, `Agent`, `PostgreSQL`, `YC`).
- **Flexible Sorting:** Rank results by Popularity (Points/Comments) or Date (Newest first).
- **Clean Text Formatting:** Strips HTML clutter into readable plain text while retaining links.

***

### Input Parameters

| Parameter | Type | Default | Description |
|---|---|---|---|
| `mode` | Select | `"top"` | Feed mode: `top` (Front page), `new`, `show_hn`, `ask_hn`, `who_is_hiring`, or `custom_query`. |
| `query` | String | `"ai agent"` | Search keyword when using `custom_query` or to filter stories. |
| `sortBy` | Select | `"popularity"` | Ranking strategy: `popularity` (Upvotes & comments) or `date` (Newest first). |
| `maxResults` | Integer | `20` | Maximum number of items to return (1 to 200). |

***

### Sample JSON Output

```json
[
  {
    "id": "50242939",
    "title": "Anthropic S-1",
    "author": "simonw",
    "authorProfileUrl": "https://news.ycombinator.com/user?id=simonw",
    "points": 1523,
    "commentsCount": 1486,
    "url": "https://www.sec.gov/Archives/edgar/data/2130357/000162828026067168/anthropicpbc-sx1.htm",
    "hnUrl": "https://news.ycombinator.com/item?id=50242939",
    "storyText": "",
    "category": "top",
    "createdAt": "2026-10-26T18:30:12Z",
    "createdTimestamp": 1793041812
  },
  {
    "id": "50192873",
    "title": "Stripe | Full-Stack & Systems Engineers | Seattle / SF / Remote",
    "author": "patrickc",
    "authorProfileUrl": "https://news.ycombinator.com/user?id=patrickc",
    "points": 12,
    "commentsCount": 0,
    "url": "https://news.ycombinator.com/item?id=50192873",
    "hnUrl": "https://news.ycombinator.com/item?id=50192873",
    "storyText": "Stripe is hiring senior engineers to scale our financial infrastructure globally. Fully remote in US/Canada/EU. Tech stack: Ruby, Go, Java, React.",
    "category": "who_is_hiring",
    "createdAt": "2026-10-02T16:20:00Z",
    "createdTimestamp": 1792947600
  }
]
```

***

### Integration with AI Agents & MCP

This Actor outputs clean structured datasets ready for direct consumption by AI Agents, LangChain, LlamaIndex, or AutoGPT via Apify's Model Context Protocol (MCP) server (`apify-default-dataset-item`).

# Actor input Schema

## `mode` (type: `string`):

Select the Hacker News feed or stream to extract.

## `query` (type: `string`):

Optional search query to filter stories or when mode is 'custom_query' (e.g., 'ai agent', 'YC', 'rust').

## `sortBy` (type: `string`):

Sort stories by popularity (points/engagement) or date (newest first).

## `maxResults` (type: `integer`):

Maximum number of items to extract (1 to 200).

## Actor input object example

```json
{
  "mode": "top",
  "query": "",
  "sortBy": "popularity",
  "maxResults": 20
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("authoritative_glen/hackernews-trends-stories-leads").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("authoritative_glen/hackernews-trends-stories-leads").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call authoritative_glen/hackernews-trends-stories-leads --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,authoritative_glen/hackernews-trends-stories-leads"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/RtB7ge8uHGZh7iDwA/builds/O3ehWhKSoIJ13ZAhB/openapi.json
