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.
elsif_maj avatar
topHNThreadByHour
@elsif_maj
Email
// set at Thu Nov 30 2023 14:22:53 GMT+0000 (Coordinated Universal Time)
pomdtr avatar
hackernews
@pomdtr
Script
An interactive, runnable TypeScript val by pomdtr
janpaul123 avatar
valle_tmp_42249988258651369468890296933772
@janpaul123
HTTP
// Initialize sample stories and store them in blob storage
janpaul123 avatar
valle_tmp_4674518929569141580380318140624
@janpaul123
HTTP
// Initialize sample stories and store them in blob storage
janpaul123 avatar
valle_tmp_066236646798213175732405021232028
@janpaul123
HTTP
// This val creates a simple Hacker News clone with clickable story titles.
cocodrilette avatar
hnResume
@cocodrilette
Cron
Send the top 5 HackerNews post to your email every day at a given Datetime.
janpaul123 avatar
valle_tmp_7637538511907467267008900862313
@janpaul123
HTTP
* Hacker News Clone (HTML frontend) * This script sets up an HTTP Val to serve a simple HTML page that mimics Hacker News. * The page contains static, fake example stories for now.
stevekrouse avatar
hnTopStory
@stevekrouse
HTTP
// Get the title of the top story on Hacker News
janpaul123 avatar
valle_tmp_62963168422172378076257133989442
@janpaul123
HTTP
An interactive, runnable TypeScript val by janpaul123
cw12 avatar
hnResume
@cw12
Cron
Send the top 5 HackerNews post to your email every day at a given Datetime.
janpaul123 avatar
valle_tmp_583694900399154559282687336321139
@janpaul123
HTTP
* This val will create a simple Hacker News clone with hardcoded example stories. * We'll use basic HTML for the layout and styling.
janpaul123 avatar
valle_tmp_821221338019192827080648147114728
@janpaul123
HTTP
// This HTTP val will generate an HTML frontend for a simple Hacker News clone.
janpaul123 avatar
valle_tmp_115772121902645334646172151872623
@janpaul123
HTTP
* This val creates a simple hacker news clone with 30 fake sample stories. * It uses blob storage to store story data, including the ability to submit * new stories and upvote existing stories.
janpaul123 avatar
valle_tmp_3735050494903109427870190455998034
@janpaul123
HTTP
// This val will serve an HTML page emulating a Hacker News clone.
janpaul123 avatar
valle_tmp_6738558784733152514997198308998394
@janpaul123
HTTP
// This val will serve an HTML page emulating a Hacker News clone.
janpaul123 avatar
valle_tmp_8524715891926958662818742653551
@janpaul123
HTTP
// This val will serve an HTML page emulating a Hacker News clone.