# Hacker News API: Stories, Comments, Search & Who's Hiring Jobs (`localwire/hacker-news`) Actor

Hacker News front page, search, full comment threads and structured jobs from the monthly "Who is hiring?" threads (company, role, location, remote, visa, salary). Official Firebase and Algolia APIs, no scraping or proxies. Monitor mode returns only new items.

- **URL**: https://apify.com/localwire/hacker-news.md
- **Developed by:** [Local Wire](https://apify.com/localwire) (community)
- **Categories:** News, Jobs, Developer tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 jobs

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## 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 API: Stories, Comments, Search & Who's Hiring Jobs

Get **Hacker News** data as clean JSON from the official Hacker News APIs: front-page stories for **$0.30 per 1,000**, comments for **$0.10 per 1,000**, and **structured jobs from the monthly "Ask HN: Who is hiring?" threads** for **$2 per 1,000**, with no start fee. One Actor covers the front page and other lists, full-text **search** of stories and comments, complete **comment threads**, and Who is hiring posts parsed into company, role, location, remote, visa and salary fields.

It uses only the **official Hacker News API** (Firebase) and the **HN Search API** (Algolia). It does not scrape web pages and needs no proxies or login. **Monitor mode** returns only items you have not had before, so it suits scheduled alerts.

### What you get

Every record has a `type`: `story`, `comment` or `job`. The dataset has a table view for each.

#### Who is hiring job

On the first weekday of each month Hacker News opens an "Ask HN: Who is hiring?" thread. Employers post one top-level comment each, usually starting with a line like:

`Acme | Senior Backend Engineer | Berlin, Germany | REMOTE (EU) | Full-time | €90k–€120k | https://acme.example/jobs`

The Actor reads that line and the rest of the post into fields:

```json
{
  "type": "job",
  "id": 50300001,
  "threadId": 50298765,
  "threadTitle": "Ask HN: Who is hiring? (November 2026)",
  "threadMonth": "2026-11",
  "company": "Acme",
  "companyNote": "YC W24",
  "roles": ["Senior Backend Engineer"],
  "locations": ["Berlin, Germany"],
  "remote": true,
  "hybrid": false,
  "onsite": false,
  "remoteScope": "EU",
  "employmentTypes": ["full-time"],
  "visaSponsorship": true,
  "salary": "€90k–€120k",
  "salaryMin": 90000,
  "salaryMax": 120000,
  "salaryCurrency": "EUR",
  "salaryPeriod": "year",
  "applyUrl": "https://acme.example/jobs",
  "urls": ["https://acme.example/jobs"],
  "tags": [],
  "headline": "Acme (YC W24) | Senior Backend Engineer | Berlin, Germany | REMOTE (EU) | Full-time | €90k–€120k | https://acme.example/jobs",
  "description": "Acme builds … (the whole post as plain text)",
  "author": "acme_hiring",
  "postedAt": "2026-11-02T16:05:23.000Z",
  "hnUrl": "https://news.ycombinator.com/item?id=50300001",
  "parseQuality": "structured"
}
```

Parsing is deterministic and has been tested against real monthly threads. In November and October 2026 the company was found for **98-99%** of posts, and an office location or remote flag for **93-94%**. A field is only filled when the post states it: roles, salary and visa sponsorship appear only when the employer gives them. `parseQuality` is `structured` when the post has the usual `|`-separated first line and `freeform` when it does not. The full post text is always in `description`, and the original post is linked in `hnUrl`.

#### Story

```json
{
  "type": "story",
  "id": 50391456,
  "storyType": "story",
  "title": "Tesla to wind down Cybertruck production",
  "url": "https://www.example.com/article",
  "domain": "example.com",
  "text": null,
  "author": "someone",
  "points": 619,
  "commentCount": 1364,
  "createdAt": "2026-11-06T10:12:00.000Z",
  "hnUrl": "https://news.ycombinator.com/item?id=50391456",
  "list": "top",
  "rank": 3,
  "source": "firebase",
  "fetchedAt": "2026-11-06T20:00:00.000Z"
}
```

`storyType` is `story`, `ask`, `show`, `launch`, `job` or `poll`. `list` and `rank` are filled in lists mode. `source` says which API the record came from.

#### Comment

```json
{
  "type": "comment",
  "id": 50397540,
  "storyId": 50397219,
  "storyTitle": "Firecracker VM Escape: PwnEscape Part 2",
  "storyUrl": "https://www.example.com/blog/firecracker-escape",
  "parentId": 50397219,
  "depth": 1,
  "author": "someone",
  "text": "Plain text, with links written out in full.",
  "replyCount": 2,
  "createdAt": "2026-11-06T19:40:00.000Z",
  "hnUrl": "https://news.ycombinator.com/item?id=50397540",
  "source": "algolia",
  "fetchedAt": "2026-11-06T20:00:00.000Z"
}
```

`depth` is 1 for a direct reply to the story. In search results `depth` and `replyCount` are `null`, because search hits do not carry their position in the thread.

The run's key-value store also gets an `OUTPUT` record. It counts what was scanned, filtered out, already returned (monitor mode) and returned, and gives each Who is hiring thread's job count.

### Quick start

The Actor runs with no input at all: you get the current top 30 front-page stories for less than one cent.

```json
{}
```

The jobs from the latest Who is hiring thread that mention Python and offer remote work:

```json
{
  "mode": "whoIsHiring",
  "hiringKeywords": ["python"],
  "hiringRemoteOnly": true
}
```

Stories about SQLite from the last week, most relevant first:

```json
{
  "mode": "search",
  "query": "sqlite",
  "lastDays": 7,
  "maxResults": 100
}
```

Every comment on one story:

```json
{
  "mode": "comments",
  "storyIds": ["https://news.ycombinator.com/item?id=8863"]
}
```

### Modes

| Mode | What you get | Typical input |
|---|---|---|
| `lists` (default) | Stories from the top, new, best, Ask HN, Show HN and job lists, with rank | `{"lists": ["top"], "maxItemsPerList": 30}` |
| `search` | Stories and/or comments matching a query, by relevance or newest first | `{"mode": "search", "query": "sqlite", "lastDays": 7}` |
| `comments` | Every comment in one or more threads, in thread order, with depth and parent | `{"mode": "comments", "storyIds": ["https://news.ycombinator.com/item?id=8863"]}` |
| `whoIsHiring` | One structured job record per employer post in "Ask HN: Who is hiring?" | `{"mode": "whoIsHiring", "hiringRemoteOnly": true}` |

### Input reference

| Field | Used in | Type | Default | What it does |
|---|---|---|---|---|
| `mode` | all | text | `lists` | `lists`, `search`, `comments` or `whoIsHiring`. |
| `lists` | lists | list | `["top"]` | `top`, `new`, `best`, `ask`, `show`, `job`. A story in several lists is returned once. |
| `maxItemsPerList` | lists | number 1-500 | `30` | How far down each list to read. The front page is the first 30. |
| `query` | search | text | empty | Words to find in titles, URLs, story text and comments. Empty lists everything in the date window. |
| `searchTypes` | search | list | `["story"]` | `story`, `comment`, `ask_hn`, `show_hn`, `poll`, `front_page`. Several values return any of them. |
| `sortBy` | search | text | `relevance` | `relevance` or `date` (newest first). In monitor mode the default is `date`. |
| `lastDays` | search | number 1-3650 | none | Only items from the last N days. Ignored when `dateFrom` is set. |
| `dateFrom` / `dateTo` | search | date | none | A date window, e.g. `2026-01-01` to `2026-01-31` (inclusive). |
| `minPoints` | lists, search | number | none | Only stories with at least this many points. |
| `minComments` | lists, search | number | none | Only stories with at least this many comments. |
| `storyIds` | comments | list | required in this mode | Story ids or links like `https://news.ycombinator.com/item?id=8863`. |
| `includeStory` | comments | true/false | `false` | Also return the story record before its comments. |
| `maxCommentsPerStory` | comments | number 1-20,000 | `1000` | Stop after this many comments for each story. |
| `hiringMonths` | whoIsHiring | list | latest | Which monthly threads to read, like `2026-11`. |
| `hiringThreads` | whoIsHiring | number 1-24 | `1` | When no months are given, how many of the latest threads to read. |
| `hiringKeywords` | whoIsHiring | list | none | Only posts that mention ANY of these words in the company, roles or text. |
| `hiringLocations` | whoIsHiring | list | none | Only posts that name ANY of these places in their locations, remote region or first line. |
| `hiringRemoteOnly` | whoIsHiring | true/false | `false` | Only posts that offer remote work. |
| `hiringVisaOnly` | whoIsHiring | true/false | `false` | Only posts that say they sponsor visas. |
| `onlyNew` | all | true/false | `false` | Monitor mode: return, and charge for, only items no earlier run with the same settings returned. |
| `monitorKey` | all | text | automatic | A name for the monitor's memory. Without one, each set of settings gets its own. |
| `maxResults` | all | number 1-100,000 | `1000` | Stop after this many records in total. |

Invalid input fails at once with a message that lists every problem, so a person or an AI agent can fix it in one go.

### Monitor mode: only new items

Set `onlyNew: true` and schedule the Actor. Each run returns, and charges for, only stories, comments or jobs that no earlier run with the same settings returned. Typical uses:

- **Mentions of your brand:** `{"mode": "search", "query": "yourproduct", "searchTypes": ["story", "comment"], "onlyNew": true}` every hour.
- **New jobs as they are posted:** `{"mode": "whoIsHiring", "hiringKeywords": ["rust"], "onlyNew": true}` every day; employers keep posting all month.
- **Front-page alerts:** `{"lists": ["top"], "minPoints": 300, "onlyNew": true}` every 30 minutes.

The memory lives in a key-value store named `hacker-news-monitor` in your account. Dates and limits are not part of it, so a rolling `lastDays` window does not reset a monitor. Give a monitor its own name with `monitorKey`, or delete the store to start over.

### Use cases

- **Job hunting and recruiting research.** Turn each month's Who is hiring posts into a filterable table, for example "remote Rust jobs in Europe that sponsor visas".
- **Brand and competitor monitoring.** Get an alert when your product, a competitor or a topic is mentioned in a story or a comment.
- **Tech trend tracking.** Count stories and comments about a technology by week, or snapshot the front page with points, comment counts and rank.
- **Discussion analysis.** Download a whole thread, with each comment's depth and parent, for sentiment analysis, summaries or retrieval.
- **Salary research.** Published pay ranges from Who is hiring posts as numbers with currency and period.
- **AI agents.** Small, predictable records that an agent can fetch as a tool through Apify's MCP server.

### Pricing

You pay per record returned and nothing to start a run:

| Record | Price | Per 1,000 |
|---|---|---|
| Story | $0.0003 | $0.30 |
| Comment | $0.0001 | $0.10 |
| Who is hiring job | $0.002 | $2.00 |

There is no monthly rental. You pay nothing for records that your filters drop or that a monitor has already returned.

| What you run | Records returned | Cost |
|---|---|---|
| The default run: top 30 stories | 30 stories | $0.009 |
| A search that returns 1,000 stories | 1,000 stories | $0.30 |
| A large thread's comments | 1,000 comments | $0.10 |
| A whole Who is hiring thread | about 300 jobs | about $0.60 |
| Remote Python jobs from the latest thread | about 40 jobs | about $0.08 |
| An hourly brand monitor that finds 5 comments and 1 story a day | about 180 a month | about $0.02 a month |

A monthly Who is hiring thread usually holds 200 to 400 employer posts. To cap spending, set **Max cost per run** in the run options, or lower `maxResults`. The Actor stops cleanly at the limit and says so in its status message.

### Use it from the API

Run the Actor and get the records back in one request:

```bash
curl -X POST "https://api.apify.com/v2/acts/localwire~hacker-news/run-sync-get-dataset-items" \
  -H "Authorization: Bearer <YOUR_APIFY_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"mode": "whoIsHiring", "hiringKeywords": ["python"], "hiringRemoteOnly": true}'
```

That endpoint waits up to five minutes, which is enough for most runs. For a very large search or thread, start the Actor with `POST /v2/acts/localwire~hacker-news/runs` and read the run's dataset when it has finished.

With the Apify client for JavaScript:

```js
import { ApifyClient } from "apify-client";

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor("localwire/hacker-news").call({
  mode: "search",
  query: "postgres",
  searchTypes: ["story"],
  lastDays: 30,
  minPoints: 100,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
```

With the Apify client for Python:

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("localwire/hacker-news").call(run_input={
    "mode": "comments",
    "storyIds": ["https://news.ycombinator.com/item?id=8863"],
    "includeStory": True,
})
records = list(client.dataset(run["defaultDatasetId"]).iterate_items())
```

Results can be downloaded from the dataset as JSON, CSV, Excel, XML or JSON Lines.

### Use it from an AI agent (MCP)

Apify's hosted MCP server is at `https://mcp.apify.com`. Add it to any MCP client that supports remote servers and sign in with your Apify account when the browser opens (or send an `Authorization: Bearer <APIFY_TOKEN>` header).

To give the agent only this Actor as a tool, use this server URL:

```
https://mcp.apify.com?tools=localwire/hacker-news
```

```json
{
  "mcpServers": {
    "apify": {
      "url": "https://mcp.apify.com?tools=localwire/hacker-news"
    }
  }
}
```

The agent then sees the Actor's input fields with their descriptions and defaults. No field is required: an empty input returns the front page, and `mode` selects everything else. Questions that work well:

- "Which companies in this month's Who is hiring thread sponsor visas for ML roles in London?"
- "What is on the Hacker News front page right now with more than 300 points?"
- "Summarise what people said about SQLite on Hacker News this week."

### Integrations

Runs can be started on a schedule or by another system, and results can be sent on:

- **Make, n8n and Zapier** have Apify integrations that run an Actor and pass its dataset to the next step, for example to a spreadsheet, email or a chat channel.
- **Webhooks** call your endpoint when a run succeeds or fails.
- **LangChain** and other agent frameworks can use Apify Actors as tools.
- **The Apify API** and the JavaScript and Python clients cover everything else.

### FAQ

#### Is there an official Hacker News API?

Yes, two. The [Hacker News API](https://github.com/HackerNews/API) on Firebase serves the live lists and single items, and the [HN Search API](https://hn.algolia.com/api) by Algolia serves full-text search, date ranges and whole threads. Both are free and need no key. This Actor uses both and adds what they do not do themselves: one record format, paging past the search limit, structured Who is hiring jobs, monitor mode, scheduling and exports.

#### How do I get the Hacker News "Who is hiring?" thread as JSON or CSV?

Run the Actor with `{"mode": "whoIsHiring"}`. Each employer's post becomes one record with company, roles, locations, remote, visa and salary fields, and you can download the dataset as JSON, CSV or Excel. Add `hiringMonths` for earlier months.

#### How do I search Hacker News by keyword and date?

Use `mode: "search"` with a `query` and either `lastDays` or `dateFrom` and `dateTo`. Set `searchTypes` to `["story"]`, `["comment"]` or both, and `sortBy` to `date` for newest first.

#### How do I download all comments from a Hacker News thread?

Use `mode: "comments"` and put the story's id or link in `storyIds`. Every comment comes back once, in thread order, with its `depth` and `parentId`, so you can rebuild the tree.

#### How do I monitor Hacker News for mentions of my company?

Search for your name in stories and comments with `onlyNew: true`, and schedule the run every hour. Each run returns only mentions it has not returned before, and a run that finds nothing new costs nothing.

#### Can I get more than 1,000 search results?

Yes, with `sortBy: "date"`. The HN Search API serves at most 1,000 results per query, so relevance search stops there. Newest-first search continues by moving the date window back automatically.

#### Does it return user profiles or karma?

No. Authors appear as their public Hacker News usernames, and user profiles are never fetched.

#### How much does it cost to get a whole Who is hiring thread?

About $0.40 to $0.80: a thread has roughly 200 to 400 employer posts at $0.002 each.

#### Does it need proxies or a login?

No. Both APIs are public and official. The Actor identifies itself with its own User-Agent.

#### Is it affiliated with Hacker News?

No. This Actor is not affiliated with or endorsed by Y Combinator, Hacker News or Algolia.

### Limitations

- **Sources.** The official [Hacker News API](https://github.com/HackerNews/API) for lists and items, and the [HN Search API](https://hn.algolia.com/api) by Algolia for search, date windows and whole threads. Nothing is scraped from web pages.
- **Relevance search** returns at most 1,000 results per query. Use newest-first search to go further.
- **Points and comment counts** are as of the moment of the run. Search results can be a few minutes behind the live site.
- **Comment points** are not public, so comments have none and `minPoints` applies to stories only.
- **Who is hiring** covers the monthly employer threads only. "Who wants to be hired?" and the freelancer threads are not read, because those posts are individuals' personal details. Replies to job posts are not returned, and posts that follow the "Who wants to be hired?" template but were placed in the hiring thread are skipped.
- **Job fields are parsed from free text.** Posts that do not follow the usual first-line format are returned with fewer fields filled (`parseQuality: "freeform"`). Check `description` when a field matters.
- **If an API is unavailable or rate-limits requests,** the Actor waits and retries a few times, honouring `Retry-After`, then reports the problem in the status message and the `OUTPUT` record. It does not use proxies or any other way round a limit.

### Data, privacy and terms

Authors are their public Hacker News usernames, as the official APIs return them. User profiles are never fetched. Email addresses and phone numbers are removed from all text and replaced with `[email removed]` and `[phone removed]`, and `mailto:` links are dropped, so **apply through the links in each post** (`applyUrl` and `urls`).

The Who wants to be hired and freelancer threads are never read.

This Actor is not affiliated with or endorsed by Y Combinator, Hacker News or Algolia. Please respect the Hacker News guidelines when you use the data.

### More from this developer

Jobs:

- [Career Site Jobs API](https://apify.com/localwire/ats-jobs): jobs straight from company career sites on Workday, Greenhouse, Lever and eight more platforms.
- [Workday Jobs API](https://apify.com/localwire/workday-jobs): every job from a Workday career site.
- [Reed.co.uk Jobs Scraper](https://apify.com/localwire/reed-jobs): UK job-board search with salaries.
- [Wellfound Jobs Scraper](https://apify.com/localwire/wellfound-jobs): startup jobs with pay and equity.

Other data:

- [Google Trends Trending Now](https://apify.com/localwire/google-trends-trending-now): trending searches for 125 countries.
- [Telegram Channel Scraper](https://apify.com/localwire/telegram-channels): posts from public channels.
- [App Store Reviews](https://apify.com/localwire/app-store-reviews): reviews, app details and top charts.
- [Public Tenders API](https://apify.com/localwire/uk-public-tenders): UK and EU tenders and contract awards.
- [ESPN Sports Data](https://apify.com/localwire/espn-sports) and [Flashscore Results & Fixtures](https://apify.com/localwire/flashscore-sports): scores, standings and fixtures.
- [Eventbrite Scraper](https://apify.com/localwire/eventbrite-events) and [Meetup Scraper](https://apify.com/localwire/meetup-events): events by place and topic.
- [Gumtree Scraper](https://apify.com/localwire/gumtree-listings): UK classified listings.

### Feedback

Spotted a job post that was read wrongly, or want another field? Open an issue on the Actor's **Issues** tab with the post's link and we will improve the parser.

# Actor input Schema

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

What to fetch. "lists": front-page lists (top, new, best, Ask HN, Show HN, YC jobs). "search": full-text search of stories and comments. "comments": the whole comment thread of each story in "storyIds" (required in this mode). "whoIsHiring": structured jobs from the monthly "Ask HN: Who is hiring?" threads.

## `lists` (type: `array`):

Lists mode only. Which front-page lists to read: top, new, best, ask, show, job. A story that appears in several lists is returned once.

## `maxItemsPerList` (type: `integer`):

How far down each list to read (the front page is the first 30).

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

Search mode only. Words to search for in titles, URLs, story text and comments, e.g. sqlite or "vector database". Leave empty to list everything in the date window.

## `searchTypes` (type: `array`):

What to return. Pick several to get any of them.

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

Search mode only. "relevance" (points and match quality) or "date" (newest first). Newest first can go past the 1,000-result limit of relevance search. Leave empty for the usual choice: relevance, or newest first when monitor mode is on.

## `lastDays` (type: `integer`):

Only items from the last N days. Ignored when 'From date' is set.

## `dateFrom` (type: `string`):

Start of a date window, e.g. 2026-01-01.

## `dateTo` (type: `string`):

End of the date window (inclusive), e.g. 2026-01-31.

## `minPoints` (type: `integer`):

Only stories with at least this many points (lists and search; comments have no public points).

## `minComments` (type: `integer`):

Only stories with at least this many comments (lists and search).

## `storyIds` (type: `array`):

Comments mode only, and required there. Story ids or links like https://news.ycombinator.com/item?id=8863, one per line.

## `includeStory` (type: `boolean`):

Also return the story record before its comments.

## `maxCommentsPerStory` (type: `integer`):

Stop after this many comments for each story.

## `hiringMonths` (type: `array`):

Who is hiring? mode only. Which monthly threads to read, like 2026-11. Leave empty for the latest thread(s).

## `hiringThreads` (type: `integer`):

When no months are given, how many of the latest monthly threads to read.

## `hiringKeywords` (type: `array`):

Only posts that mention ANY of these words (company, roles, or text), e.g. rust, golang, data engineer.

## `hiringLocations` (type: `array`):

Only posts that name ANY of these places (office locations, remote region, or headline), e.g. London, Berlin, Europe.

## `hiringRemoteOnly` (type: `boolean`):

Only posts that offer remote work.

## `hiringVisaOnly` (type: `boolean`):

Only posts that say they sponsor visas.

## `onlyNew` (type: `boolean`):

Return, and charge for, only items no earlier run with the same settings has returned. Ideal for scheduled alerts. The memory lives in your 'hacker-news-monitor' key-value store.

## `monitorKey` (type: `string`):

Optional name for this monitor's memory. Runs with the same name share it; leave empty to keep one memory per set of settings.

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

Stop after this many records in total (stories, comments and jobs together). Each record returned is charged once, so this is also the cost cap. 1000 when left out; the form starts at 100 so that a first run is small.

## Actor input object example

```json
{
  "mode": "lists",
  "lists": [
    "top"
  ],
  "maxItemsPerList": 30,
  "query": "sqlite",
  "searchTypes": [
    "story"
  ],
  "storyIds": [
    "https://news.ycombinator.com/item?id=8863"
  ],
  "includeStory": false,
  "maxCommentsPerStory": 1000,
  "hiringThreads": 1,
  "hiringRemoteOnly": false,
  "hiringVisaOnly": false,
  "onlyNew": false,
  "maxResults": 100
}
```

# Actor output Schema

## `stories` (type: `string`):

Front-page and search results (type = story).

## `comments` (type: `string`):

Comment threads and comment search results (type = comment).

## `jobs` (type: `string`):

Structured job posts from the monthly hiring threads (type = job).

## `allResults` (type: `string`):

Every record in the run's default dataset, all fields.

# 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 = {
    "query": "sqlite",
    "storyIds": [
        "https://news.ycombinator.com/item?id=8863"
    ],
    "maxResults": 100
};

// Run the Actor and wait for it to finish
const run = await client.actor("localwire/hacker-news").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 = {
    "query": "sqlite",
    "storyIds": ["https://news.ycombinator.com/item?id=8863"],
    "maxResults": 100,
}

# Run the Actor and wait for it to finish
run = client.actor("localwire/hacker-news").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 '{
  "query": "sqlite",
  "storyIds": [
    "https://news.ycombinator.com/item?id=8863"
  ],
  "maxResults": 100
}' |
apify call localwire/hacker-news --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,localwire/hacker-news"
        }
    }
}
```

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/mouGtzYs2W3quMHeo/builds/7WbO2Qk7GC0a6ug6d/openapi.json
