-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
287 lines (245 loc) · 13.1 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
<!doctype html>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
<title>Hacker News RSS</title>
<link rel="stylesheet" type="text/css" href="style.css?ver=2020.11.14-02">
<link rel="alternate" type="application/rss+xml" title="hnrss.org updates" href="https://hnrss.github.io/updates.xml">
<header>
<h1 class="title">Hacker News RSS</h1>
</header>
<h2 id="overview">Overview</h2>
<p>hnrss.org provides custom, realtime RSS feeds for <a href="https://news.ycombinator.com/">Hacker News</a>.</p>
<p>The following feed types are available:</p>
<table>
<tbody>
<tr >
<td ><a href="#firehose-feeds"><strong>Firehose</strong></a></td>
<td>New <a href="https://hnrss.org/newest">posts</a> and <a href="https://hnrss.org/newcomments">comments</a> as they arrive.</td>
</tr>
<tr >
<td ><a href="#search-feeds"><strong>Searches</strong></a></td>
<td>New <a href="https://hnrss.org/newest?q=redis">posts</a> and <a href="https://hnrss.org/newcomments?q=linux">comments</a> matching a given search term.</td>
</tr>
<tr >
<td ><a href="#reply-feeds"><strong>Replies</strong></a></td>
<td>New comments in reply to a particular <a href="https://hnrss.org/replies?id=jerf">user</a> or <a href="https://hnrss.org/replies?id=17752464">comment</a>.</td>
</tr>
<tr>
<td><a href="#bestcomments"><strong>Best Comments</strong></a></td>
<td>The <a href="https://hnrss.org/bestcomments">best comments</a> from across Hacker News.</td>
</tr>
<tr >
<td ><a href="#activity-parameters"><strong>Points</strong></a></td>
<td>New <a href="https://hnrss.org/newest?points=300">posts</a> with more than N points.</td>
</tr>
<tr >
<td ><a href="#activity-parameters"><strong>Activity</strong></a></td>
<td>New <a href="https://hnrss.org/newest?comments=250">posts</a> with more than N comments.</td>
</tr>
<tr >
<td ><a href="#firehose-feeds"><strong>Front Page</strong></a></td>
<td>New <a href="https://hnrss.org/frontpage">posts</a> as they appear on the front page.</td>
</tr>
<tr >
<td ><a href="#self-post-feeds"><strong>Self-posts</strong></a></td>
<td>New “<a href="https://hnrss.org/ask">Ask HN</a>” and “<a href="https://hnrss.org/show">Show HN</a>” posts, along with <a href="https://hnrss.org/polls">polls</a>.</td>
</tr>
<tr>
<td><a href="#alternative-feeds"><strong>Alternative</strong></a></td>
<td>Follow Hacker News through some alternative homepages.</td>
</tr>
<tr >
<td ><a href="#job-feeds"><strong>Jobs</strong></a></td>
<td>New <a href="https://hnrss.org/jobs">hiring posts</a> made by YC startups along with comments from the monthly <a href="https://hnrss.org/whoishiring/jobs">“Who is hiring?”</a> threads.</td>
</tr>
<tr >
<td ><a href="#user-feeds"><strong>Users</strong></a></td>
<td>New <a href="https://hnrss.org/submitted?id=jacquesm">posts</a> and <a href="https://hnrss.org/threads?id=tptacek">comments</a> made by a given user.</td>
</tr>
<tr >
<td ><a href="#favorite-feeds"><strong>Favorites</strong></a></td>
<td>New posts that have been <a href="https://hnrss.org/favorites?id=edavis">favorited</a> by a particular user</td>
</tr>
<tr >
<td ><a href="#thread-feeds"><strong>Threads</strong></a></td>
<td>New comments made <a href="https://hnrss.org/item?id=23778510">in a given thread</a>, optionally <a href="https://hnrss.org/item?id=23778510&author=edavis">filtered by username</a>.</td>
</tr>
<tr >
<td ><a href="#feed-formats"><strong>Formats</strong></a></td>
<td>In addition to RSS, all of the above are also available in <a href="https://hnrss.org/newest.atom">Atom</a> and <a href="https://hnrss.org/newest.jsonfeed">JSON Feed</a> formats.</td>
</tr>
</tbody>
</table>
<h2 id="details">Feeds</h2>
<p>Each feed is <a href="https://validator.w3.org/feed/check.cgi?url=https%3A%2F%2Fhnrss.org%2Fnewest">valid RSS</a> served over <a href="https://www.ssllabs.com/ssltest/analyze.html?d=hnrss.org">HTTPS</a>.</p>
<h3 id="firehose-feeds">Firehose Feeds</h3>
<p>The “firehose” feeds contain all new posts and comments as they appear on Hacker News:</p>
<pre>
https://hnrss.org/newest
https://hnrss.org/newcomments
</pre>
<p>For just the posts that have appeared on the front page:</p>
<pre>
https://hnrss.org/frontpage
</pre>
<p>If the firehose feeds are a bit too noisy for you, <a href="#activity-parameters">read below</a> on filtering them with the <code>points</code> and/or <code>comments</code> parameters.</p>
<h3 id="search-feeds">Search Feeds</h3>
<p>You can get a feed of new posts and/or comments containing keywords by using the <code>q=KEYWORD</code> parameter. For example:</p>
<pre>
https://hnrss.org/newest?q=Django
https://hnrss.org/newcomments?q=WordPress
</pre>
<p>If you want a single search feed but multiple keywords, separate the keywords with " OR ":</p>
<pre>
https://hnrss.org/newest?q=git+OR+linux
</pre>
<p>If your query contains <a href="https://en.wikipedia.org/wiki/Percent-encoding#Percent-encoding_reserved_characters">reserved characters</a> (especially the plus sign), you'll need to percent-encode those characters:</p>
<pre>
# This is the percent-encoded form of C++
https://hnrss.org/newest?q=C%2B%2B
</pre>
<h3 id="reply-feeds">Reply Feeds</h3>
<p>Keep an eye on replies to your comments:</p>
<pre>
https://hnrss.org/replies?id=jerf
</pre>
<p>Use a comment ID to follow replies to a particular comment:</p>
<pre>
https://hnrss.org/replies?id=17752464
</pre>
<h3 id="bestcomments">Best Comments</h3>
<p>Recent, highly voted comments from across Hacker News:</p>
<pre>
https://hnrss.org/bestcomments
</pre>
<p>Some great stuff in here in threads you may not normally have opened. Definitely recommended.</p>
<h3 id="self-post-feeds">Self Post Feeds</h3>
<p>Ask HN, Show HN, and polls are available:</p>
<pre>
https://hnrss.org/ask
https://hnrss.org/show
https://hnrss.org/polls
</pre>
<h3 id="alternative-feeds">Alternative Feeds</h3>
<p>Hacker News <a href="https://news.ycombinator.com/classic">Classic</a> only counts votes from "early users" (accounts created before February 13, 2008):</p>
<pre>
https://hnrss.org/classic
</pre>
<p>Hacker News <a href="https://news.ycombinator.com/best">Best</a> for top vote getters from the past few days:</p>
<pre>
https://hnrss.org/best
</pre>
<p>Hacker News <a href="https://news.ycombinator.com/invited">Invited</a> and <a href="https://news.ycombinator.com/pool">Pool</a> for reposted stories invited back by the mods and given a <a href="https://news.ycombinator.com/item?id=26998308">second chance</a>:</p>
<pre>
https://hnrss.org/invited
https://hnrss.org/pool
</pre>
<p>Hacker News <a href="https://news.ycombinator.com/active">Active</a> for posts with the most active, ongoing discussions:</p>
<pre>
https://hnrss.org/active
</pre>
<p>Hacker News <a href="https://news.ycombinator.com/launches">Launches</a> for "Launch HN" posts from YC affiliated startups:</p>
<pre>
https://hnrss.org/launches
</pre>
<h3 id="job-feeds">Job Feeds</h3>
<p>Job opportunities from YC funded startups:</p>
<pre>
https://hnrss.org/jobs
</pre>
<p>Top level comments in threads created by the whoishiring bot:</p>
<pre>
# 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
</pre>
<p>If you’re interested in something in particular, you can apply a <code>q=KEYWORD</code> parameter to only return relevant comments. For example, filter the top-level “Who is hiring?” comments to only those containing “React Native”:</p>
<pre>
https://hnrss.org/whoishiring/jobs?q=React+Native
</pre>
<h3 id="user-feeds">User Feeds</h3>
<p>If you don’t want to miss a post or comment by a given user, you can subscribe to that user’s feed:</p>
<pre>
https://hnrss.org/submitted?id=USERNAME # posts
https://hnrss.org/threads?id=USERNAME # comments
https://hnrss.org/user?id=USERNAME # everything
</pre>
<h3 id="favorite-feeds">Favorite Feeds</h3>
<p>Supply a username and get a feed of posts that have been "favorited" by that user:</p>
<pre>
https://hnrss.org/favorites?id=edavis
</pre>
<p>At the moment this only returns posts, not comments.</p>
<p>Note: This scrapes Hacker News first and then fetches from Algolia. For this reason, please be extra conservative with your refresh schedule. Thanks in advance.</p>
<h3 id="thread-feeds">Thread Feeds</h3>
<p>A chronological feed of new comments on a particular post can be found at:</p>
<pre>
https://hnrss.org/item?id=THREAD_ID
</pre>
<p>You can filter this feed by author by providing the <code>author</code> parameter:</p>
<pre>
https://hnrss.org/item?id=THREAD_ID&author=USERNAME
</pre>
<p>With <code>THREAD_ID</code> the numerical ID found in the URL when viewing the comments page and <code>USERNAME</code> being the author's username.</p>
<h2 id="feed-options">Feed Options</h2>
<p>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.</p>
<h3 id="activity-parameters">Activity Parameters</h3>
<p>You can apply a <code>points=N</code> or <code>comments=N</code> parameter to any feed to filter the results so only entries with more than N points or comments are shown:</p>
<pre>
https://hnrss.org/newest?points=100
https://hnrss.org/ask?comments=25
</pre>
<p>You can also combine both parameters:</p>
<pre>
https://hnrss.org/show?points=100&comments=25
</pre>
<p>Unfortunately, <code>/newcomments</code> <a href="https://github.com/algolia/hn-search/issues/55#issuecomment-73599729">does not work</a> with a <code>points=N</code> parameter.</p>
<h3 id="search-parameter">Search Parameter</h3>
<p>By default, searches on posts only look at titles. If you want to search against the submitted URLs themselves, use the <code>search_attrs</code> parameter.</p>
<p>Here are some examples:</p>
<pre>
# 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
</pre>
<h3 id="link-parameter">Link Parameter</h3>
<p>By default, the RSS <code><link></code> element points to the submitted article’s URL. The <code><link></code> element can be changed to point to the Hacker News comment page by appending <code>link=comments</code> to the end of the URL. For example:</p>
<pre>https://hnrss.org/newest?link=comments</pre>
<h3 id="description-parameter">Description Parameter</h3>
<p>You can disable the <code><description></code> element entirely by passing the <code>description=0</code> parameter:</p>
<pre>https://hnrss.org/newest?description=0</pre>
<h3 id="count-parameter">Count Parameter</h3>
<p>By default, feeds return 20 RSS items. This can be increased via the <code>count=N</code> parameter:</p>
<pre>https://hnrss.org/newest?count=50</pre>
<p>There is a hardcoded limit of 100 entries, so keep that in mind.</p>
<h3 id="feed-formats">Feed Formats</h3>
<p>By default, feeds come back as RSS. But if you add “.atom” or “.jsonfeed” to any endpoint you’ll receive the contents in <a href="https://validator.w3.org/feed/docs/atom.html">Atom</a> or <a href="https://jsonfeed.org/">JSON Feed</a>, respectively.</p>
<pre>
# 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
</pre>
<p>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 <a href="https://github.com/hnrss/hnrss/issues/new">open an issue</a> with as much information as possible. Thanks!</p>
<h2 id="credits">Credits</h2>
<p>Thanks to <a href="https://www.algolia.com/">Algolia</a> for providing their <a href="https://hn.algolia.com/api">REST API</a>. Without it, hnrss.org simply would not exist.</p>
<p>Thanks to <a href="https://github.com/jaredandrews">Jared Andrews</a> for the <a href="https://github.com/hnrss/hnrss/pull/23">PR</a> that created the /whoishiring/ endpoints.</p>
<p>Thanks to <a href="https://github.com/zmwangx">Zhiming Wang</a> for adding Python 3 support.</p>
<p>Thanks to <a href="https://github.com/grantjenks">Grant Jenks</a> for the idea of adding the Article URL and Points to the description.</p>
<p>Thanks to <a href="https://github.com/cagrimmett">Chuck Grimmett</a> for being a sounding board when it comes to adding new features to hnrss.org as well as suggesting the /jobs endpoint.</p>
<p>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.</p>
<h2 id="colophon">Colophon</h2>
<p>hnrss.org is powered by the Gin web framework, served by nginx, and hosted on DigitalOcean. HTTPS is provided by Let’s Encrypt. DNS is provided by Namecheap.</p>
<p class="updated">This documentation was last updated on December 14, 2022.</p>