Skip to main content

@idiomark/adapter-hackernews

Hacker News adapter for Idiomark (Personality & Content Profile) extraction. This adapter fetches submissions, comments, and user activity from Hacker News for personality analysis.

Features​

  • Submissions: Posts and links submitted by user
  • Comments: Discussion and responses
  • Upvoted Items: Stories upvoted by user
  • User Profile: Karma, account age, bio

Authentication​

No authentication required - Hacker News has a public API.

import { HackerNewsAdapter } from '@idiomark/adapter-hackernews'

const adapter = new HackerNewsAdapter({
username: 'username-here'
})

Usage​

import { HackerNewsAdapter } from '@idiomark/adapter-hackernews'

const adapter = new HackerNewsAdapter({
username: 'pg'
})

await adapter.authenticate()

const result = await adapter.getStructuredOutput({
limit: 100,
includeComments: true,
includeSubmissions: true
})

console.log('Items fetched:', result.rawContent.length)
console.log('Interests:', result.personalitySignals?.interests)

Rate Limiting​

  • API Rate Limit: 10,000 requests per day
  • Minimum Request Interval: 100ms between requests

License​

MIT