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
hnPrefixURL
@stevekrouse
Script
An interactive, runnable TypeScript val by stevekrouse
austinm911 avatar
scheduledNotifier
@austinm911
Cron
Forked from pranjaldotdev/poller
kajgod avatar
findTopNews
@kajgod
Script
An interactive, runnable TypeScript val by kajgod
deepfates avatar
HTMX_template
@deepfates
HTTP (deprecated)
@jsxImportSource https://esm.sh/preact
petermillspaugh avatar
june2024
@petermillspaugh
Script
@jsxImportSource https://esm.sh/preact
kajgod avatar
fetchMnm
@kajgod
Cron
An interactive, runnable TypeScript val by kajgod
akkartik avatar
postprocessHNitem
@akkartik
Script
An interactive, runnable TypeScript val by akkartik
iakovos avatar
rssFeeds
@iakovos
Script
An interactive, runnable TypeScript val by iakovos
gio avatar
theHereTimes
@gio
HTTP
* This application creates "The Here Times", a map-based news aggregator. * It uses the Google Maps JavaScript API for map rendering, Geonames for location data, * and the NewsAPI for fetching news articles. * The app displays news for the top 12 most populous cities/neighborhoods in the current map view. * * We'll use the following approach: * 1. Use Google Maps JavaScript API for rendering the map * 2. Use Geonames API to get top 12 most populous cities within the map bounds * 3. Fetch news data from NewsAPI based on these locations * 4. Display news articles in a side drawer, only showing articles that contain the city's name in the title * 5. Place markers on the map for each location (exactly 12) * 6. Add a search bar to allow users to search for specific locations * 7. Recenter the map when a location is clicked or searched
fab1an avatar
getCNNNews
@fab1an
Script
An interactive, runnable TypeScript val by fab1an
dglazkov avatar
privategooglenews
@dglazkov
HTTP (deprecated)
Forked from dglazkov/googlenews
dglazkov avatar
googlenews
@dglazkov
HTTP (deprecated)
A sample implementation of Breadboard Service Endpoint (BSE) protocol. For more information, see Breadboard service node .
fab1an avatar
getCNNNewsShort
@fab1an
Script
An interactive, runnable TypeScript val by fab1an
kajgod avatar
fetchZrs
@kajgod
Cron
An interactive, runnable TypeScript val by kajgod
elsif_maj avatar
nameTopHNThread
@elsif_maj
Script
An interactive, runnable TypeScript val by elsif_maj
jahabeebs avatar
safeMessageBoard
@jahabeebs
HTTP (deprecated)
Forked from stevekrouse/safeMessageBoard