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
jamiedubs
rssSummarizerTest
uses this glif to summarize a given feed using code. planning to use this in other stuff
Script

yawnxyz
breakdown
This project is an argument summarizer that leverages AI to analyze and extract key arguments from a given text. Goals: Provide a user-friendly interface for inputting text Process the input using a large language model (LLama3 via Groq) Extract and structure key arguments, explanations, and relevant quotes Present the summarized arguments in a clear, organized format The main pipeline: User inputs text through a web interface The input is sent to an AI model for processing The AI extracts and structures the arguments The results are validated against a predefined schema The structured arguments are displayed to the user This tool aims to help users quickly understand the main points and supporting evidence in complex texts or discussions, making it valuable for research, debate preparation, or general comprehension of argumentative content.
HTTP
jamiedubs
wikipediaToday
fetch the contents of the Wikipedia "On this day in history" page. defaults to JSON output, but specify ?format=text or ?format=html for other outputs. e.g. https://jamiedubs-wikipediatoday.web.val.run/?format=json https://jamiedubs-wikipediatoday.web.val.run/?format=text https://jamiedubs-wikipediatoday.web.val.run/?format=html #wikipedia
HTTP