turbot/hackernews

steampipe plugin install hackernewssteampipe plugin install hackernews

Table: hackernews_item

Stories, comments, jobs, Ask HNs and even polls are just items. This table includes the most recent items posted to Hacker News.

max_items in the connection configuration defines the number of items returned by a list query to this table.

Examples

List recent items

select * from hackernews_item

List all recent stories

select * from hackernews_item where type = 'story'

Recent stories with score > 5

select
*
from
hackernews_item
where
type = 'story'
and score > 5
order by
score desc

Recent stories with no comments

select
*
from
hackernews_item
where
type = 'story'
and kids is null

Which users have made more than 5 submissions recently

select
by,
count(*)
from
hackernews_item
group by
by
having
count(*) > 5
order by
count desc

.inspect hackernews_item

Stories, comments, jobs, Ask HNs and even polls are just items. This table includes the most recent items posted to Hacker News.

NameTypeDescription
bytextThe username of the item's author.
deadbooleanTrue if the item is dead.
deletedbooleanTrue if the item is deleted.
descendantsbigintIn the case of stories or polls, the total comment count.
idbigintThe item's unique id.
kidsjsonbThe ids of the item's comments, in ranked display order.
parentbigintThe comment's parent: either another comment or the relevant story.
partsjsonbA list of related pollopts, in display order.
pollbigintThe pollopt's associated poll.
scorebigintThe story's score, or the votes for a pollopt.
texttextThe comment, story or poll text. HTML.
timetimestamp without time zoneTimestamp when the item was created.
titletextThe title of the story, poll or job. HTML.
typetextThe type of item. One of "job", "story", "comment", "poll", or "pollopt".
urltextThe URL of the story.