Hacker News RSS

Overview

hnrss.org provides custom, realtime RSS feeds for Hacker News.

The following feed types are available:

Firehose New posts and comments as they arrive.
Front Page New posts as they appear on the front page.
Searches New posts and comments matching a given search term.
Replies new New comments in reply to a particular user or comment.
Points New posts with more than N points.
Activity New posts with more than N comments.
Self-posts New “Ask HN” and “Show HN” posts, along with polls.
Jobs New hiring posts made by YC startups along with comments from the monthly “Who is hiring?” threads.
Users New posts and comments made by a given user.
Threads New comments made in a given thread.
Formats new In addition to RSS, all of the above are also available in Atom and JSON Feed formats.

Details

Each feed is valid RSS served over HTTPS.

Firehose Feeds

The “firehose” feeds contain all new posts and comments as they appear on Hacker News:

https://hnrss.org/newest
https://hnrss.org/newcomments

For just the posts that have appeared on the front page:

https://hnrss.org/frontpage

If the firehose feeds are a bit too noisy for you, read below on filtering them with the points and/or comments parameters.

Search Feeds

You can get a feed of new posts and/or comments containing keywords by using the q=KEYWORD parameter. For example:

https://hnrss.org/newest?q=Django
https://hnrss.org/newcomments?q=WordPress

If you want a single search feed but multiple keywords, separate the keywords with " OR ":

https://hnrss.org/newest?q=git+OR+linux

Reply Feeds new

Keep an eye on replies to your comments:

https://hnrss.org/replies?id=jerf

Use a comment ID to follow replies to a particular comment:

https://hnrss.org/replies?id=17752464

Self Post Feeds

Ask HN, Show HN, and polls are available:

https://hnrss.org/ask
https://hnrss.org/show
https://hnrss.org/polls

Job Feeds

Job opportunities from YC funded startups:

https://hnrss.org/jobs

Top level comments in threads created by the whoishiring bot:

# Comments from "Who is hiring?" threads
https://hnrss.org/whoishiring/jobs

# Comments from "Who wants to be hired?" threads
https://hnrss.org/whoishiring/hired

# Comments from "Freelancer? Seeking freelancer?" threads
https://hnrss.org/whoishiring/freelance

# All of the above
https://hnrss.org/whoishiring

new If you’re interested in something in particular, you can apply a q=KEYWORD parameter to only return relevant comments. For example, filter the top-level “Who is hiring?” comments to only those containing “React Native”:

https://hnrss.org/whoishiring/jobs?q=React+Native

User Feeds

If you don’t want to miss a post or comment by a given user, you can subscribe to that user’s feed:

https://hnrss.org/submitted?id=USERNAME # posts
https://hnrss.org/threads?id=USERNAME   # comments
https://hnrss.org/user?id=USERNAME      # everything

Thread Feeds

A feed of new comments on a particular post can be found at:

https://hnrss.org/item?id=THREAD_ID

With THREAD_ID the numerical ID found in the URL when viewing the comments page.

Feed Options

You can modify any feed’s output using URL parameters. Multiple parameters can be applied at the same time by joining them with an ampersand.

Activity Parameters

You can apply a points=N or comments=N parameter to any feed to filter the results so only entries with more than N points or comments are shown:

https://hnrss.org/newest?points=100
https://hnrss.org/ask?comments=25

You can also combine both parameters:

https://hnrss.org/show?points=100&comments=25

Unfortunately, /newcomments does not work with a points=N parameter.

Search Parameter

By default, searches on posts only look at titles. If you want to search against the submitted URLs themselves, use the search_attrs parameter.

Here are some examples:

# Search for posts with "WordPress" in the title only
https://hnrss.org/newest?q=WordPress

# Search for posts with 'WordPress' in the URL only
https://hnrss.org/newest?q=WordPress&search_attrs=url

# Search for posts with 'WordPress' in the title or URL
https://hnrss.org/newest?q=WordPress&search_attrs=title,url

# Don't restrict search attributes at all. This searches for posts
# containing 'WordPress' in all attributes indexed by Algolia. This was
# the behavior of searches prior to June 3, 2015
https://hnrss.org/newest?q=WordPress&search_attrs=default

By default, the RSS <link> element points to the submitted article’s URL. The <link> element can be changed to point to the Hacker News comment page by appending link=comments to the end of the URL. For example:

https://hnrss.org/newest?link=comments

Description Parameter

You can disable the <description> element entirely by passing the description=0 parameter:

https://hnrss.org/newest?description=0

Count Parameter

By default, feeds return 20 RSS items. This can be increased via the count=N parameter:

https://hnrss.org/newest?count=50

There is a hardcoded limit of 100 entries, so keep that in mind.

Feed Formats new

By default, feeds come back as RSS. But if you add “.atom” or “.jsonfeed” to any endpoint you’ll receive the contents in Atom or JSON Feed, respectively.

# The front page as Atom
https://hnrss.org/frontpage.atom

# "Ask HN" with 10 or more comments as JSON Feed
https://hnrss.org/ask.jsonfeed?comments=10

Note: These formats are a lot less battle-tested than the RSS format. If you see any wonkiness or they don’t play nicely with your feed reader, please open an issue with as much information as possible. Thanks!

Changelog

2018

2017

2016

2015

2014

Support

If hnrss.org has made your job or hobby project easier, and you want to show some gratitude, donations are very much appreciated.

new Another way to support hnrss.org is to use this DigitalOcean referral link and receive $10 in credit. Once you’ve spent $25 with DigitalOcean, hnrss.org will receive $25 in credit.

Thanks!

Credits

Thanks to Algolia for providing their REST API. Without it, hnrss.org simply would not exist.

Thanks to Jared Andrews for the PR that created the /whoishiring/ endpoints.

Thanks to Zhiming Wang for adding Python 3 support.

Thanks to Grant Jenks for the idea of adding the Article URL and Points to the description.

Thanks to Chuck Grimmett for being a sounding board when it comes to adding new features to hnrss.org as well as suggesting the /jobs endpoint.

And many, many thanks to all those who have donated in support of the project over the years. You all mean the world to me.

Colophon

hnrss.org is served by nginx on DigitalOcean. HTTPS is provided by Let’s Encrypt. DNS is provided by Namecheap.

As of September 2018, the feeds are generated using the Gin web framework. From May 2014 to August 2018, the feeds were generated using the Flask web framework.

Repositories

A brief primer on the various repositories that make up hnrss.org:

When hnrss.org was created in May 2014, code and documentation lived inside the edavis/hnrss repository.

In April 2017, the documentation was revamped, migrated into Hugo, and was given its own repository at edavis/hnrss-docs. The built assets were copied into the docs/ folder on edavis/hnrss and published at https://edavis.github.io/hnrss/.

In August/September 2018, hnrss.org underwent a rewrite from Flask to Gin. This new code lives at edavis/go-hnrss.

So, as of September 2018, that’s the state of play. The documentation source lives at edavis/hnrss-docs. The Gin source that powers hnrss.org lives at edavis/go-hnrss.

edavis/hnrss contains the Flask code that powered the site from May 2014 to August 2018 as well as the docs/ folder that contains the built HTML copied from edavis/hnrss-docs.

At some point I’d like to simplify all of this and run everything out of one repository, but it’ll do for now.