ThriftDB missing capability to get by id

147 views
Skip to first unread message

Joseph Adams

unread,
Dec 19, 2012, 1:15:52 PM12/19/12
to hnse...@googlegroups.com
Hi there,

I am rather new to the HNSearch API, so I have a question which seems to have not been answered properly yet.

So, I would like to use the API in one of my projects, but the ability I am missing is retrieving posts/discussions/comments etc. by a given ID.
On the API documentation site I have seen that the id's are not searchable, why is that? Are there any plans on being able to do this.
If you are not planing on permitting this kind of search, can you suggest an alternative?
Also, when looking at the ThriftDB doc, I see that there should be a way of accessing any item by ID, with something like /items/ID-HERE. Unfortunately that doesn't work!

Thanks!

Andres Morey

unread,
Dec 20, 2012, 10:29:36 PM12/20/12
to hnse...@googlegroups.com
Hi Joseph,

The HNSearch API is a search API so it's not designed to allow crawling posts/discussions/comments by iterating through ids.

However, all the items returned by a search have an "_id" attribute which you can use to fetch items individually: 

In addition, comments have a "discussion" object whose "sigid" attribute can be used as a search filter to fetch all comments in the discussion together:

Hope that helps!

Andres

Harp B

unread,
Dec 28, 2012, 4:59:56 PM12/28/12
to hnse...@googlegroups.com
According to HN:
We've limited requests for old items.  If you're running a crawler,
    you can get this data a lot more easily from http://hnsearch.com/api.
Reply all
Reply to author
Forward
0 new messages