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.
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)
janpaul123
valle_tmp_3011947751662660376708881415586205
// Initialize sample stories and store them in blob storage
HTTP
janpaul123
valle_tmp_701816702132716405607952805626981
// Initialize sample stories and store them in blob storage
HTTP

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