# Hacker News Scraper - Stories, Jobs, Ask HN & Show HN (`lentic_clockss/hacker-news-scraper`) Actor

Export fresh Hacker News stories, comments, jobs, Ask HN, Show HN, and polls into structured datasets for research, hiring signals, and monitoring.

- **URL**: https://apify.com/lentic\_clockss/hacker-news-scraper.md
- **Developed by:** [kane liu](https://apify.com/lentic_clockss) (community)
- **Categories:** Jobs, Developer tools, Automation
- **Stats:** 1 total users, 1 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Hacker News Scraper – Stories, Jobs & Comments API

**Search Hacker News by keyword or export fresh Hacker News feeds into a clean Dataset.** This Actor collects public stories, comments, Ask HN, Show HN, jobs, polls, and poll options from two public HN data surfaces:

- keyword search through the public Algolia-powered Hacker News Search API
- live feed and item collection through the official Firebase API

Use `searchQuery` when you want results for a phrase such as `AI agents`, `vector database`, or `who is hiring`. Leave `searchQuery` empty when you want the current `top`, `new`, `best`, `ask`, `show`, or `job` feeds.

> Architecture: this Apify Actor is a thin client. Collection runs on the **hackernews-com** Cloud Run worker over HTTPS + API key.
>
> **Worker URL is config, not code:** the Actor reads `WORKER_BASE_URL` from Actor environment variables (plus optional per-run `workerBaseUrl`). Migrating the worker host means updating `WORKER_BASE_URL` (and `WORKER_AUTH` if the API key changes) in Apify Console — no Actor code change required.

### What you can do with this Hacker News Scraper

#### 1. Search Hacker News by keyword

Enter a keyword or phrase in `searchQuery` and the Actor returns matching Hacker News items as structured rows. This is useful for research, monitoring, trend discovery, competitive intelligence, and agent workflows that need HN search results without scraping HTML.

| What you enter | Example |
| --- | --- |
| `searchQuery` | `AI agents` |
| `recordTypes` | `story`, `comment`, `job` |
| `maxItems` | `25` |

Search mode returns Algolia HN Search hits directly. Rows include `sourceSearchQuery` and `searchRank` so you can trace which keyword produced each result.

#### 2. Export the current Hacker News front page

Leave `searchQuery` empty and choose one or more official Firebase feeds such as `top`, `new`, or `best`. Each matching item becomes a normalized Dataset row with title, author, score, timestamp, URL, and direct HN link.

| What you enter | Example |
| --- | --- |
| `feeds` | `top`, `new`, or `best` |
| `recordTypes` | `story` |
| `maxItems` | `100` |

#### 3. Collect Ask HN and Show HN discussions

Use the `ask` and `show` feeds to export questions, launches, demos, and the public replies beneath them. Turn on descendant collection when comments matter as much as the root post.

| What you enter | Example |
| --- | --- |
| `feeds` | `ask`, `show` |
| `recordTypes` | `story`, `comment` |
| `includeDescendants` | `true` |
| `maxDepth` | `1` or `2` |

The feed collector schedules roots fairly and walks descendants breadth-first, so a single large thread does not silently monopolize a small run.

#### 4. Build a Hacker News jobs feed

Choose the official `job` feed to capture current HN job posts, or search for hiring-related phrases with `searchQuery`. Keep `recordTypes` set to `job` for a focused export.

#### 5. Retrieve known Hacker News items by ID

If another workflow already has Hacker News item IDs, leave `searchQuery` empty and add them to `itemIds`. The Actor collects those explicit IDs before feed roots and deduplicates all items within the run.

#### 6. Feed a dashboard, agent, or recurring workflow

Every row has stable `itemId`, `hnUrl`, source provenance, and a run timestamp. Export the Dataset to your data warehouse, spreadsheet, CRM enrichment step, or agent workflow without parsing Hacker News HTML.

<details>
<summary>For developers: low-cost JSON inputs</summary>

Keyword search:

```json
{
  "searchQuery": "AI agents",
  "recordTypes": ["story", "comment"],
  "maxItems": 10,
  "maxFetches": 10
}
```

Fresh feed collection:

```json
{
  "feeds": ["top", "job"],
  "recordTypes": ["story", "comment", "job", "poll", "pollopt"],
  "includeDescendants": true,
  "maxDepth": 1,
  "maxItems": 20,
  "maxFetches": 80
}
```

</details>

### More Actors like this

Need another social/content source or a different vertical? Use a **dedicated Actor** below for structured fields. Use this Actor for **Hacker News** stories, comments, jobs, Ask HN, Show HN, and polls.

#### Similar social & content Actors

- [Reddit Scraper](https://apify.com/lentic_clockss/reddit-scraper)
- [YouTube Research Scraper](https://apify.com/lentic_clockss/youtube-research-scraper)
- [TikTok Scraper](https://apify.com/lentic_clockss/tiktok-scraper)
- [YouTube Shorts Scraper](https://apify.com/lentic_clockss/youtube-shorts-scraper)

#### Prefer another specialized scraper?

If your target has a specialized Actor below, use that first — usually cheaper and more structured than a generic scrape.

**Jobs & Freelance**

- [LinkedIn Jobs Scraper](https://apify.com/lentic_clockss/linkedin-jobs-scraper)
- [Indeed Jobs Scraper](https://apify.com/lentic_clockss/indeed-jobs-scraper)
- [Upwork Jobs Scraper](https://apify.com/lentic_clockss/upwork-jobs-scraper)
- [RemoteOK Jobs Scraper](https://apify.com/lentic_clockss/remoteok-all-jobs-scraper)
- [Jobicy Remote Jobs Scraper](https://apify.com/lentic_clockss/jobicy-remote-jobs-scraper)
- [Himalayas Jobs Scraper](https://apify.com/lentic_clockss/himalayas-jobs-scraper)

**E-commerce**

- [Walmart Product Scraper](https://apify.com/lentic_clockss/walmart-scraper)
- [Amazon Search Scraper](https://apify.com/lentic_clockss/amazon-search-results-collector)
- [Shopee Search Scraper](https://apify.com/lentic_clockss/shopee-search-scraper)
- [Etsy Scraper](https://apify.com/lentic_clockss/etsy-scraper)
- [SHEIN Product Scraper](https://apify.com/lentic_clockss/shein-scraper)
- [Allegro Scraper](https://apify.com/lentic_clockss/allegro-scraper)

**Real Estate**

- [Zillow & Zumper Scraper](https://apify.com/lentic_clockss/us-real-estate-scraper)
- [Realtor.com Scraper](https://apify.com/lentic_clockss/realtor-com-scraper)
- [Apartments.com Rental Scraper](https://apify.com/lentic_clockss/apartments-com-rental-scraper)
- [Rightmove Scraper](https://apify.com/lentic_clockss/rightmove-property-scraper)
- [Idealista Scraper](https://apify.com/lentic_clockss/idealista-scraper)
- [realestate.com.au Scraper](https://apify.com/lentic_clockss/realestate-com-au-scraper)

**Travel & Stays**

- [Booking.com Hotels Scraper](https://apify.com/lentic_clockss/booking-hotels-scraper)
- [Airbnb Listings Scraper](https://apify.com/lentic_clockss/airbnb-listings-scraper)
- [Expedia Scraper](https://apify.com/lentic_clockss/expedia-scraper)
- [TripAdvisor Scraper](https://apify.com/lentic_clockss/tripadvisor-scraper)

**Ads Intelligence**

- [Facebook Ad Library Scraper](https://apify.com/lentic_clockss/facebook-ad-library-scraper)
- [TikTok Ads Scraper](https://apify.com/lentic_clockss/tiktok-ads-top-ads-actor)

**Local & Maps**

- [Google Maps Scraper](https://apify.com/lentic_clockss/google-maps-scraper)

**General Tools**

- [Stealth Web Scraper](https://apify.com/lentic_clockss/stealth-web-scraper)
- [Email Risk Validator](https://apify.com/lentic_clockss/email-risk-validator)
- [Phone Number Intelligence](https://apify.com/lentic_clockss/phone-number-intelligence)

→ See the full catalog in [Related Actors](#related-actors) below, or browse [apify.com/lentic\_clockss](https://apify.com/lentic_clockss).

***

### How to use it — no code required

1. Click **Try for free** on this Actor page.
2. To search, enter a keyword in `searchQuery`.
3. To collect live feeds instead, leave `searchQuery` empty and select the Hacker News feeds you want.
4. Choose the item types you want in the Dataset.
5. Set `maxItems` and `maxFetches`, then click **Start**.

Download your results as Excel, CSV, JSON, or JSONL from the Dataset tab, or consume them through the Apify API.

### What you get back

Each output row is a normalized public Hacker News item. The fields stay consistent across stories, comments, jobs, polls, and poll options while preserving what the source supplied.

| Field | What it means |
| --- | --- |
| `itemId` | Stable Hacker News item ID. |
| `type` | `story`, `comment`, `job`, `poll`, or `pollopt`. |
| `title`, `text`, `url` | Public item content when present. |
| `by`, `time`, `createdAt` | Author and source timestamp. |
| `score`, `descendants` | Public engagement metadata when supplied by Hacker News or HN Search. |
| `parentId`, `kids`, `parts` | Thread and poll relationships when available. |
| `hnUrl` | Direct link to the item on Hacker News. |
| `sourceFeeds`, `rootItemId`, `depth` | Feed/item-ID provenance. Search rows use `sourceFeeds: ["algolia-search"]`. |
| `sourceSearchQuery`, `searchRank` | Keyword and rank for search-mode rows. |
| `deleted`, `dead` | Source state flags when supplied. |
| `source` | `hacker-news-algolia-search` or `hacker-news-firebase`. |
| `scrapedAt` | When this Actor collected the row. |

Malformed upstream records fail clearly before Dataset output instead of producing silently invalid rows.

### Input reference

The Apify input form exposes the same controls used at runtime:

| Parameter | Default | Description |
| --- | --- | --- |
| `searchQuery` | empty | Optional keyword or phrase. When set, the Actor runs HN keyword search. |
| `feeds` | `top`, `new`, `best`, `ask`, `show`, `job` | Official Firebase feed roots to collect when `searchQuery` is empty. |
| `recordTypes` | all five supported types | Item types retained in the Dataset. Applies to both search and feed modes. |
| `itemIds` | `[]` | Optional explicit positive Hacker News item IDs for feed/item-ID mode. |
| `includeDescendants` | `true` | Include public comment children and poll parts in feed/item-ID mode. |
| `maxDepth` | `2` | Descendant levels below each root; root depth is `0`. Not used in search mode. |
| `maxItems` | `100` | Maximum deduplicated Dataset records (1–2,000). Free Apify plan: also capped at 1,000/run and **10 total runs** of this Actor. |
| `maxFetches` | `500` | Maximum Firebase item detail requests in feed/item-ID mode; must be at least `maxItems`. |
| `workerBaseUrl` | *(env)* | Optional per-run override of the Cloud Run worker origin. Default: Actor env `WORKER_BASE_URL`. |

#### Keyword search behavior

When `searchQuery` is set, the Actor uses the public Algolia-powered HN Search API and writes matching search hits to the Dataset. Feed traversal, descendant traversal, and `itemIds` are not used in this mode. Unsupported keyword aliases such as `query` and `keywords` are rejected so runs do not silently change scope.

### Data source and run boundaries

Keyword search uses the public [Algolia Hacker News Search API](https://hn.algolia.com/api). Feed and item-ID collection uses the public, unauthenticated [official Hacker News Firebase API](https://github.com/HackerNews/API). Live feeds and search rankings change continuously, so each run is a timestamped snapshot—not a historical archive or a guaranteed complete feed mirror.

Network requests have bounded retries. The Actor also uses an overall collection deadline, positive integer limits, per-run deduplication, source-ID verification for Firebase items, and breadth-first descendant traversal for feed mode. If the source cannot be retrieved or its response does not match the expected public contract, the run writes an `ERROR_SUMMARY` and fails instead of reporting a misleading empty success.

### Run artifacts

Besides the Dataset, the default key-value store contains useful, non-secret run artifacts:

| Artifact | When it is written | What it contains |
| --- | --- | --- |
| `INPUT_ECHO` | After valid input parsing | Normalized scope, keyword, and limits. |
| `RUN_SUMMARY` | After a successful run | Source, keyword, record counts, requested scope, and timestamps. |
| `ERROR_SUMMARY` | When a run fails | Error type, safe error message, and timestamps. |

These artifacts make it straightforward to debug an automation without exposing credentials—this Actor does not require any.

#### Free Apify plan limits (set by this Actor's developer)

| Limit | Free Apify plan | Paid Apify plan |
| --- | --- | --- |
| Runs of this Actor | **10 runs total** | Unlimited |
| Results per run (`maxItems`) | **Up to 1,000** | Up to 2,000 |

When the run cap is hit, the run finishes with a clear status message — not an Apify platform error.

### Pricing

**Pay per event. No subscription.** Apify displays the effective event price before each run.

**Free Apify plan:** up to **10 runs** of this Actor and **1,000 results per run**. Upgrade to a paid Apify plan for unlimited runs. (Limits set by the Actor developer.)

| Event | Price | When it is charged |
| --- | ---: | --- |
| `apify-actor-start` | **$0.005** | Automatically once when a normal Actor run starts. |
| `apify-default-dataset-item` | **$2.00 / 1,000** | Automatically for each item written to the default Dataset. |

For example, a run returning 100 Dataset rows costs **$0.205** in Actor events: $0.005 to start plus $0.200 for results. Platform usage costs are charged to the user in addition to these Actor events, as shown by Apify before a run.

Both listed events are Apify synthetic events: the platform accounts for them automatically, so the Actor does not manually issue duplicate charges in code.

### Live View and Standby endpoints

This Actor has an honest lightweight Live View service. Data collection stays in normal Actor runs; the standby service does not pretend to offer a separate scrape API.

| Endpoint | Purpose |
| --- | --- |
| `GET /` | Readiness and service information. |
| `GET /health` | Fast health check. |
| `GET /input-example` | Low-cost input compatible with the Actor schema. |
| `GET /openapi.json` | The deployed OpenAPI 3.x contract. |

The interactive **Standby** tab on Apify renders these endpoints from the same OpenAPI document served by the Actor.

### Connect from code or an AI workflow

Use this Actor in Apify, Make, Zapier, n8n, or an agent workflow. The Actor ID is `lentic_clockss/hacker-news-scraper`.

<details>
<summary>Python example</summary>

```python
from apify_client import ApifyClient

client = ApifyClient("<APIFY_TOKEN>")
run = client.actor("lentic_clockss/hacker-news-scraper").call(
    run_input={"searchQuery": "AI agents", "recordTypes": ["story", "comment"], "maxItems": 10, "maxFetches": 10}
)
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["type"], item.get("title") or item.get("text"), item["hnUrl"])
```

</details>

### FAQ

#### Does it search Hacker News by a phrase or brand name?

Yes. Set `searchQuery` to the phrase you want. The Actor returns public HN Search hits and records the keyword in `sourceSearchQuery`.

#### Does it use the official Hacker News API?

Feed and item-ID mode uses the official Hacker News Firebase API. Keyword search uses the public Algolia-powered HN Search API because Firebase does not provide keyword search.

#### Can I collect comments?

Yes. In search mode, include `comment` in `recordTypes`. In feed mode, keep `recordTypes` containing `comment`, set `includeDescendants` to `true`, and choose an appropriate `maxDepth`, `maxItems`, and `maxFetches`.

#### Why can a selected type have zero results?

Hacker News live feeds and keyword searches are not guaranteed to contain every item type at every moment. For example, polls can be uncommon in a particular feed snapshot or search result set.

#### What happens when a source returns malformed data or is unavailable?

The Actor retries bounded transient failures. Invalid source records are rejected before Dataset output, and a failed run writes `ERROR_SUMMARY` rather than claiming success with an untrustworthy result.

#### Can I use the Live View endpoints to start a collection?

No. Live View provides readiness, health, input guidance, and its OpenAPI document. Start data collection through a normal Actor run so output stays in the run Dataset and key-value store.

#### I'm on the free Apify plan — are there limits?

Yes. Free Apify plan users get **10 runs** of this Actor and **up to 1,000 results per run**. These limits are set by the Actor developer (not Apify). When you hit the run cap, the run finishes with a clear status message — it is not a platform bug. Upgrade to a paid Apify plan for unlimited runs.

***

Explore more tools from [lentic\_clockss on Apify](https://apify.com/lentic_clockss).

***

### Related Actors

All **77** public Actors from \[[lentic\_clockss](https://apify.com/lentic_clockss)]. Click a name to open the Store detail page.

#### Jobs & Freelance

- [LinkedIn Jobs Scraper](https://apify.com/lentic_clockss/linkedin-jobs-scraper)
- [Bayt Jobs Scraper](https://apify.com/lentic_clockss/bayt-scraper)
- [Fiverr Gigs Scraper](https://apify.com/lentic_clockss/fiverr-programming-tech-gigs-scraper)
- [Freelancer.com Scraper](https://apify.com/lentic_clockss/freelancer-scraper)
- [Glassdoor Scraper](https://apify.com/lentic_clockss/glassdoor-scraper)
- [Himalayas Jobs Scraper](https://apify.com/lentic_clockss/himalayas-jobs-scraper)
- [Indeed Jobs Scraper](https://apify.com/lentic_clockss/indeed-jobs-scraper)
- [Jobicy Remote Jobs Scraper](https://apify.com/lentic_clockss/jobicy-remote-jobs-scraper)
- [RemoteOK Jobs Scraper](https://apify.com/lentic_clockss/remoteok-all-jobs-scraper)
- [SEEK Jobs Scraper](https://apify.com/lentic_clockss/seek-scraper)
- [Upwork Jobs Scraper](https://apify.com/lentic_clockss/upwork-jobs-scraper)

#### Real Estate

- [Zillow & Zumper Scraper](https://apify.com/lentic_clockss/us-real-estate-scraper)
- [Realtor.com Scraper](https://apify.com/lentic_clockss/realtor-com-scraper)
- [99.co Scraper](https://apify.com/lentic_clockss/ninetynine-co-sg-scraper)
- [Realtor.com Agents Scraper](https://apify.com/lentic_clockss/realtor-com-agents-scraper)
- [Apartments.com Rental Scraper](https://apify.com/lentic_clockss/apartments-com-rental-scraper)
- [Bayut Scraper](https://apify.com/lentic_clockss/bayut-uae-scraper)
- [Craigslist Housing Scraper](https://apify.com/lentic_clockss/craigslist-housing-scraper)
- [Daft.ie Scraper](https://apify.com/lentic_clockss/daft-property-scraper)
- [Dot Property Scraper](https://apify.com/lentic_clockss/dot-property-th-scraper)
- [FINN.no Scraper](https://apify.com/lentic_clockss/finn-scraper)
- [Funda Scraper](https://apify.com/lentic_clockss/funda-scraper)
- [Hepsiemlak Scraper](https://apify.com/lentic_clockss/hepsiemlak-scraper)
- [Idealista Scraper](https://apify.com/lentic_clockss/idealista-scraper)
- [Immobiliare.it Scraper](https://apify.com/lentic_clockss/immobiliare-property-scraper)
- [ImmoScout24 Scraper](https://apify.com/lentic_clockss/immobilienscout24-scraper)
- [Naver Land Scraper](https://apify.com/lentic_clockss/naver-land-scraper)
- [OpenSooq Scraper](https://apify.com/lentic_clockss/opensooq-real-estate-scraper)
- [Otodom Scraper](https://apify.com/lentic_clockss/otodom-scraper)
- [Property Finder Scraper](https://apify.com/lentic_clockss/property-finder-uae-scraper)
- [PropertyGuru Scraper](https://apify.com/lentic_clockss/propertyguru-sg-scraper)
- [realestate.com.au Scraper](https://apify.com/lentic_clockss/realestate-com-au-scraper)
- [Realtor.ca Scraper](https://apify.com/lentic_clockss/realtor-ca-scraper)
- [Rightmove Scraper](https://apify.com/lentic_clockss/rightmove-property-scraper)
- [SeLoger Scraper](https://apify.com/lentic_clockss/seloger-property-scraper)
- [SUUMO Scraper](https://apify.com/lentic_clockss/suumo-property-scraper)
- [Zillow Group Scraper](https://apify.com/lentic_clockss/zillow-group-scraper)

#### E-commerce

- [Shopee Search Scraper](https://apify.com/lentic_clockss/shopee-search-scraper)
- [E-commerce Scraper](https://apify.com/lentic_clockss/ecommerce-scraper)
- [1688 Global Product Search Scraper](https://apify.com/lentic_clockss/1688-global-scraper)
- [Allegro Scraper](https://apify.com/lentic_clockss/allegro-scraper)
- [Amazon Search Scraper](https://apify.com/lentic_clockss/amazon-search-results-collector)
- [ASOS Product Scraper](https://apify.com/lentic_clockss/asos-scraper)
- [Cdiscount Product Scraper](https://apify.com/lentic_clockss/cdiscount-scraper)
- [Costco Product Scraper](https://apify.com/lentic_clockss/costco-scraper)
- [Coupang Product Scraper](https://apify.com/lentic_clockss/coupang-scraper)
- [Etsy Scraper](https://apify.com/lentic_clockss/etsy-scraper)
- [Lazada Scraper](https://apify.com/lentic_clockss/lazada-ph-search-results-collector)
- [MercadoLibre Scraper](https://apify.com/lentic_clockss/mercadolibre-scraper)
- [Mercari Japan Scraper](https://apify.com/lentic_clockss/mercari-scraper)
- [Rakuten Japan Scraper](https://apify.com/lentic_clockss/rakuten-scraper)
- [SHEIN Product Scraper](https://apify.com/lentic_clockss/shein-scraper)
- [Target Product Scraper](https://apify.com/lentic_clockss/target-scraper)
- [Temu Product Scraper](https://apify.com/lentic_clockss/temu-scraper)
- [Walmart Product Scraper](https://apify.com/lentic_clockss/walmart-scraper)

#### Travel & Stays

- [Booking.com & Airbnb Scraper](https://apify.com/lentic_clockss/booking-airbnb-scraper)
- [Agoda Scraper](https://apify.com/lentic_clockss/agoda-scraper)
- [Airbnb Listings Scraper](https://apify.com/lentic_clockss/airbnb-listings-scraper)
- [Booking.com Hotels Scraper](https://apify.com/lentic_clockss/booking-hotels-scraper)
- [Despegar Scraper](https://apify.com/lentic_clockss/despegar-scraper)
- [Expedia Scraper](https://apify.com/lentic_clockss/expedia-scraper)
- [Traveloka Scraper](https://apify.com/lentic_clockss/traveloka-scraper)
- [Travelstart Flights Scraper](https://apify.com/lentic_clockss/travelstart-scraper)
- [Trip.com Scraper](https://apify.com/lentic_clockss/trip-com-scraper)
- [TripAdvisor Scraper](https://apify.com/lentic_clockss/tripadvisor-scraper)

#### Social & Content

- [TikTok Scraper](https://apify.com/lentic_clockss/tiktok-scraper)
- [Reddit Scraper](https://apify.com/lentic_clockss/reddit-scraper)
- [YouTube Shorts Scraper](https://apify.com/lentic_clockss/youtube-shorts-scraper)
- [YouTube Research Scraper](https://apify.com/lentic_clockss/youtube-research-scraper)
- [Hacker News Scraper](https://apify.com/lentic_clockss/hacker-news-scraper)

#### Ads Intelligence

- [Facebook Ad Library Scraper](https://apify.com/lentic_clockss/facebook-ad-library-scraper)
- [Google Ads Transparency VN](https://apify.com/lentic_clockss/google-ads-transparency-center-vn)
- [TikTok Ads Scraper](https://apify.com/lentic_clockss/tiktok-ads-top-ads-actor)

#### Local & Maps

- [Google Maps Scraper](https://apify.com/lentic_clockss/google-maps-scraper)

#### General Tools

- [Stealth Web Scraper](https://apify.com/lentic_clockss/stealth-web-scraper)
- [Email Risk Validator](https://apify.com/lentic_clockss/email-risk-validator)
- [Phone Number Intelligence](https://apify.com/lentic_clockss/phone-number-intelligence)

→ Browse the full profile: [apify.com/lentic\_clockss](https://apify.com/lentic_clockss)

# Actor input Schema

## `searchQuery` (type: `string`):

Optional keyword or phrase. When set, the Actor runs a Hacker News keyword search through the public Algolia HN Search API. Leave empty to collect live Firebase feeds and explicit item IDs instead.

## `feeds` (type: `array`):

Official Firebase feeds to sample when Search keyword is empty.

## `recordTypes` (type: `array`):

Hacker News item types emitted to the Dataset. Applies to both keyword-search and feed modes.

## `itemIds` (type: `array`):

Optional positive Hacker News item IDs for feed/item-ID mode. Ignored when Search keyword is set.

## `includeDescendants` (type: `boolean`):

For feed/item-ID mode, traverse public kids and poll parts beneath selected roots up to Max depth. Keyword-search mode returns the search hits directly.

## `maxDepth` (type: `integer`):

Depth below each selected root to traverse when descendants are enabled. A root has depth 0. Not used in keyword-search mode.

## `maxItems` (type: `integer`):

Global cap after deduplication and type selection (1–2,000). Free Apify plan users: also limited to 10 total runs of this Actor and capped at 1,000 results per run (Actor developer policy). In keyword-search mode, this is the maximum number of search hits written to the Dataset.

## `maxFetches` (type: `integer`):

Safety cap for Firebase item detail requests in feed/item-ID mode. It must be at least Maximum Dataset records; keyword-search mode does not fetch Firebase item details.

## `workerBaseUrl` (type: `string`):

Override worker origin for this run. Default: Actor env WORKER\_BASE\_URL. Production migrations should update WORKER\_BASE\_URL in Actor settings (no code change).

## Actor input object example

```json
{
  "searchQuery": "AI",
  "feeds": [
    "top",
    "new",
    "best",
    "ask",
    "show",
    "job"
  ],
  "recordTypes": [
    "story",
    "comment",
    "job",
    "poll",
    "pollopt"
  ],
  "itemIds": [],
  "includeDescendants": true,
  "maxDepth": 2,
  "maxItems": 100,
  "maxFetches": 500
}
```

# Actor output Schema

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

Deduplicated public Hacker News records collected from keyword search, selected feeds, or explicit item IDs.

## `runSummary` (type: `string`):

Scope, source, keyword, and record-count summary for a successful run.

## `inputEcho` (type: `string`):

Normalized non-secret input.

## `errorSummary` (type: `string`):

Present when the Actor cannot complete a trustworthy run.

# 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 = {
    "searchQuery": "AI",
    "feeds": [
        "top",
        "new",
        "best",
        "ask",
        "show",
        "job"
    ],
    "recordTypes": [
        "story",
        "comment",
        "job",
        "poll",
        "pollopt"
    ],
    "itemIds": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("lentic_clockss/hacker-news-scraper").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 = {
    "searchQuery": "AI",
    "feeds": [
        "top",
        "new",
        "best",
        "ask",
        "show",
        "job",
    ],
    "recordTypes": [
        "story",
        "comment",
        "job",
        "poll",
        "pollopt",
    ],
    "itemIds": [],
}

# Run the Actor and wait for it to finish
run = client.actor("lentic_clockss/hacker-news-scraper").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "searchQuery": "AI",
  "feeds": [
    "top",
    "new",
    "best",
    "ask",
    "show",
    "job"
  ],
  "recordTypes": [
    "story",
    "comment",
    "job",
    "poll",
    "pollopt"
  ],
  "itemIds": []
}' |
apify call lentic_clockss/hacker-news-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=lentic_clockss/hacker-news-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/Cy2Bw4MCftb2b6ghK/builds/hKgs0vwjB3PDsb1kW/openapi.json
