just/mocks_
mockzilla.org →
Catalog /media /Hacker News

Hacker News

PROVIDER · Hacker News SPEC v0.0.1 · OpenAPI 3.0.1 MOCK · LIVE
▸ TRY IT
https://api.justmocks.com/hackernews
Open mock →

Mock the Hacker News Firebase API to feed simulated stories, comments, users, and ranked lists into demos and tests.

[01]

About

overview

Emulate item lookups, user profiles, latest item ID, and the top/new/best/ask/show/job ranking feeds so you can develop against an HN-shaped data model without polling the live Firebase backend.

Endpoints
6 across 3 resource groups
Methods
GET 6 none deprecated
OpenAPI
3.0.1 spec version 0.0.1
Source spec
7 KB · YAML
[02]

Endpoints

6 operations · 3 resource groups
GET /item/{id}.json
item
Get item
Stories, comments, jobs, Ask HNs and even polls are just items. They're identified by their ids, which are unique integers. Mocked via Mockzilla.
GET /user/{id}.json
user
Get user contributions
Users are identified by case-sensitive ids. Only users that have public activity (comments or story submissions) on the site are available through the API.
GET /maxitem.json
live
Latest item
Get the current largest item id. You can walk backward from here to discover all items.
GET /{type}.json
live
Latest Ask, Show, and Job stories
Up to 200 of the latest Ask HN, Show HN, and Job stories.
GET /{topcategory}.json
live
Top stories, news and best stories
Up to 500 top and new stories (also contains jobs).
GET /updates.json
live
Updates
Get the item and profile changes. Available as a Mockzilla mock endpoint.