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.
fetchZrs
kajgod
fetchZrs
An interactive, runnable TypeScript val by kajgod
Cron
nameTopHNThread
elsif_maj
nameTopHNThread
An interactive, runnable TypeScript val by elsif_maj
Script
safeMessageBoard
jahabeebs
safeMessageBoard
Remix of: stevekrouse/safeMessageBoard
HTTP
hnAuthors
akkartik
hnAuthors
An interactive, runnable TypeScript val by akkartik
Script
hnCommentToHTML
rodrigotello
hnCommentToHTML
Remix of: stevekrouse/hnCommentToText
Script
tanLadybug
stevekrouse
tanLadybug
Remix of: jahabeebs/safeMessageBoard
HTTP
tahirsTil
tfayyaz
tahirsTil
Remix of: stevekrouse/linkInBioTemplate
HTTP
big_story_visualization
tmcw
big_story_visualization
The Big Story This val, along with @tmcw.big_story , which requests from the New York Times API , and @tmcw.big_stories_ranks , which contains the data, generates a visualization of top stories on the NYTimes homepage. This is here just to ask the question – what happens to cover stories over time? Do they slowly drop down the page, or just get replaced by a fully new lede? So far it doesn't have quite enough data to answer that question. But also, it might be neat because it'll show which kinds of stories make the front page - is it climate, war, politics, or something else? 👉 The Big Story (visualization)
Express (deprecated)
newsletter
joseforonda
newsletter
An interactive, runnable TypeScript val by joseforonda
Script
greenWren
deepfates
greenWren
Remix of: deepfates/HTMX_template
HTTP
valle_tmp_3011947751662660376708881415586205
janpaul123
valle_tmp_3011947751662660376708881415586205
// Initialize sample stories and store them in blob storage
HTTP
valle_tmp_701816702132716405607952805626981
janpaul123
valle_tmp_701816702132716405607952805626981
// Initialize sample stories and store them in blob storage
HTTP
njuskaloCrawl
kajgod
njuskaloCrawl
Njuškalo Crawler Crawler for the most popular Croatian eBay-like online store. Allows for several search strings & e-mails if anything new is listed. Also has a password-protected frontend where you can set keywords: https://www.val.town/v/kajgod.njuskaloIndex create a val with only: 'const njuskaloData = {};' fork: Frontend Backend create secret in your profile: njuskalo_password open express endpoint on njuskaloIndex & set cron for njuskaloCrawl to run every hour or 15 min.
Script
esmTown
jdan
esmTown
Remix of: jdan/blobImages
HTTP
starlightFaker
kylem
starlightFaker
Remix of: kylem/loremIpsumMarkdownGenerator
HTTP
rssSummarizerTest
jamiedubs
rssSummarizerTest
uses this glif to summarize a given feed using code. planning to use this in other stuff
Script