Back to APIs list

Hacker News API examples & templates

Use these vals as a playground to view and fork Hacker News API examples and templates on Val Town. Run any example below or find templates that can be used as a pre-built solution.
stevekrouse avatar
hnGetPost
@stevekrouse
Script
An interactive, runnable TypeScript val by stevekrouse
elsif_maj avatar
nameTopHNThreadCron
@elsif_maj
Cron
Forked from elsif_maj/nameTopHNThread
tmcw avatar
limeBadger
@tmcw
HTTP (deprecated)
@jsxImportSource npm:hono@3/jsx
janpaul123 avatar
valle_tmp_41699613582383728637218416331187
@janpaul123
HTTP (deprecated)
// Initialize stories with some fake sample data
stevekrouse avatar
hnGetMaxId
@stevekrouse
Script
An interactive, runnable TypeScript val by stevekrouse
owen avatar
runHnBotTask
@owen
Script
An interactive, runnable TypeScript val by owen
janpaul123 avatar
valle_tmp_893740469510018430011448967223986
@janpaul123
HTTP (deprecated)
// Initialize stories with sample data
stevekrouse avatar
firmIvorySawfish
@stevekrouse
Script
Forked from stevekrouse/demoSDK
tmcw avatar
big_stories_ranks
@tmcw
Script
// set by tmcw.big_story at 2023-07-21T13:27:35.553Z
stevekrouse avatar
crimsonLynx
@stevekrouse
HTTP (deprecated)
Forked from willthereader/personalWebsite
willthereader avatar
honoExample
@willthereader
HTTP (deprecated)
Forked from maxm/honoExample
pranjaldotdev avatar
scraper
@pranjaldotdev
Script
An interactive, runnable TypeScript val by pranjaldotdev
stevekrouse avatar
personalWebsite
@stevekrouse
HTTP (deprecated)
Forked from willthereader/personalWebsite
ajax avatar
resume
@ajax
Script
// set by ajax.resumeHtml at 2023-06-07T20:30:59.005Z
vawogbemi avatar
whoIsHiring
@vawogbemi
HTTP
WIP Searcher for HN whos hiring posts HonoJs doesn't support render for async components so the style is off for the home page. And the state changes don't register in html rendering so thinking of using react instead.
pranjaldotdev avatar
poller
@pranjaldotdev
Cron
bytes.dev newsletter notifier Tech Stack val.town - Infrastructure SQLite - Database Deno - Runtime Pushover - Notifications How it works At the lowest level it is powered by 3 main scripts, which are invoked by a scheduled cron job that runs daily scraper Goes to bytes.dev and scrapes latest published newsletter inserter Insert it to SQLite if this newsletter already not exists notifier Uses Pushover API to send ios mobile notifications Pushover notifications