← Back to marketplace

Hacker News Stories Jobs and Comments

Hacker News stories, Ask HN, Show HN, jobs, polls and nested comments by keyword search, live feeds or item IDs, one row per entity.

content
by kaneliu103 endpoints100% uptime199ms avg

Endpoints

POST/v1/feeds
$0.0200/req

Live Hacker News feeds (top, new, best, ask, show, job)

Request schema

feedsarray

Hacker News feeds. Choose live feeds: top, new, best, ask, show, or job. Used when Search keyword and Specific item IDs are both empty.

recordTypesarray

Record types to keep. Choose which item types to keep as rows: story, comment, job, poll, or pollopt. Applies to search, feed, and item-ID modes.

includeDescendantsboolean

Include comment and poll descendants. Add separate comment and poll-option rows beneath selected roots in feed or item-ID mode, up to Maximum descendant depth. Each added row is billed like any other row; search mode returns matching rows without expanding threads.

maxDepthinteger

Maximum descendant depth. Depth below each selected root to traverse when descendants are enabled. A root has depth 0. Not used in keyword-search mode.

enrichDetailsboolean

Enrich public author profiles. Add website and social links from public author profiles, without creating extra profile rows. Limited to 25 distinct authors and about 20 seconds per collection part of up to 70 rows; gaps are recorded in leadAbsences.

skipNoLeadsboolean

Only keep records with outreach clues. When enabled, omit records without an email, phone, location, organization, website, or social profile. Author username alone does not count as an outreach clue.

maxFetchesinteger

Maximum candidate reads. Most candidate items to read per collection part of up to 70 rows; must be at least Maximum rows per search, feed, or item ID. Reading stops once the row allowance is filled; public profile enrichment has a separate 25-author and 20-second limit.

maxResultsinteger

Max rows per input (each listed URL, ID or keyword; a single target counts as one input). All row types share this allowance. Each plan caps the rows of one request (BASIC 10, PRO 70, ULTRA 200, MEGA 500); larger values are lowered to your plan's cap. You pay per delivered row (Rows).

requestIdstring

Optional. Your id for this request: repeating it while the job runs returns the same job.

Response schema

{
  "allOf": [
    {
      "type": "object",
      "properties": {
        "jobId": {
          "type": "string"
        },
        "status": {
          "type": "string",
          "enum": [
            "queued",
            "running",
            "succeeded",
            "partial",
            "failed",
            "cancelled"
          ]
        },
        "done": {
          "type": "boolean"
        },
        "rowsAvailable": {
          "type": "integer"
        },
        "rowsDelivered": {
          "type": "integer",
          "description": "Rows already delivered (and billed) to you for this job."
        },
        "rowsLimit": {
          "type": "integer",
          "description": "Most rows this job can deliver."
        },
        "estimatedFinishSec": {
          "type": "integer",
          "description": "While running: estimated seconds until done."
        },
        "statusUrl": {
          "type": "string"
        },
        "resultsUrl": {
          "type": "string"
        },
        "expiresAt": {
          "type": "string",
          "format": "date-time"
        },
        "retentionHours": {
          "type": "integer"
        },
        "error": {
          "$ref": "#/components/schemas/ErrorDetail"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "offset": {
          "type": "integer"
        },
        "nextOffset": {
          "type": "integer"
        },
        "hasMore": {
          "type": "boolean"
        },
        "rowCount": {
          "type": "integer"
        },
        "rowsBilled": {
          "type": "integer",
          "description": "Rows delivered by this response."
        },
        "rows": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/Row"
          }
        },
        "meta": {
          "type": "object",
          "additionalProperties": true
        }
      }
    }
  ]
}
POST/v1/items
$0.0200/req

Hacker News items and comment trees by item ID

Request schema

itemIdsarray

Specific item IDs (optional). Positive Hacker News item IDs (the number after item?id= in a news.ycombinator.com link), used when Search keyword is empty. Ignored when Search keyword is set (they are not collected or billed). Each item ID gets its own Maximum rows per search, feed, or item ID.

recordTypesarray

Record types to keep. Choose which item types to keep as rows: story, comment, job, poll, or pollopt. Applies to search, feed, and item-ID modes.

includeDescendantsboolean

Include comment and poll descendants. Add separate comment and poll-option rows beneath selected roots in feed or item-ID mode, up to Maximum descendant depth. Each added row is billed like any other row; search mode returns matching rows without expanding threads.

maxDepthinteger

Maximum descendant depth. Depth below each selected root to traverse when descendants are enabled. A root has depth 0. Not used in keyword-search mode.

enrichDetailsboolean

Enrich public author profiles. Add website and social links from public author profiles, without creating extra profile rows. Limited to 25 distinct authors and about 20 seconds per collection part of up to 70 rows; gaps are recorded in leadAbsences.

skipNoLeadsboolean

Only keep records with outreach clues. When enabled, omit records without an email, phone, location, organization, website, or social profile. Author username alone does not count as an outreach clue.

maxFetchesinteger

Maximum candidate reads. Most candidate items to read per collection part of up to 70 rows; must be at least Maximum rows per search, feed, or item ID. Reading stops once the row allowance is filled; public profile enrichment has a separate 25-author and 20-second limit.

maxResultsinteger

Max rows per input (each listed URL, ID or keyword; a single target counts as one input). All row types share this allowance. Each plan caps the rows of one request (BASIC 10, PRO 70, ULTRA 200, MEGA 500); larger values are lowered to your plan's cap. You pay per delivered row (Rows).

requestIdstring

Optional. Your id for this request: repeating it while the job runs returns the same job.

Response schema

{
  "allOf": [
    {
      "type": "object",
      "properties": {
        "jobId": {
          "type": "string"
        },
        "status": {
          "type": "string",
          "enum": [
            "queued",
            "running",
            "succeeded",
            "partial",
            "failed",
            "cancelled"
          ]
        },
        "done": {
          "type": "boolean"
        },
        "rowsAvailable": {
          "type": "integer"
        },
        "rowsDelivered": {
          "type": "integer",
          "description": "Rows already delivered (and billed) to you for this job."
        },
        "rowsLimit": {
          "type": "integer",
          "description": "Most rows this job can deliver."
        },
        "estimatedFinishSec": {
          "type": "integer",
          "description": "While running: estimated seconds until done."
        },
        "statusUrl": {
          "type": "string"
        },
        "resultsUrl": {
          "type": "string"
        },
        "expiresAt": {
          "type": "string",
          "format": "date-time"
        },
        "retentionHours": {
          "type": "integer"
        },
        "error": {
          "$ref": "#/components/schemas/ErrorDetail"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "offset": {
          "type": "integer"
        },
        "nextOffset": {
          "type": "integer"
        },
        "hasMore": {
          "type": "boolean"
        },
        "rowCount": {
          "type": "integer"
        },
        "rowsBilled": {
          "type": "integer",
          "description": "Rows delivered by this response."
        },
        "rows": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/Row"
          }
        },
        "meta": {
          "type": "object",
          "additionalProperties": true
        }
      }
    }
  ]
}
POST/v1/search
$0.0200/req

Search Hacker News stories, jobs and comments

Request schema

searchQuerystring

Search keyword. Keyword or phrase to search on Hacker News. When set, Specific item IDs and Hacker News feeds are ignored; clear it to use those inputs.

recordTypesarray

Record types to keep. Choose which item types to keep as rows: story, comment, job, poll, or pollopt. Applies to search, feed, and item-ID modes.

enrichDetailsboolean

Enrich public author profiles. Add website and social links from public author profiles, without creating extra profile rows. Limited to 25 distinct authors and about 20 seconds per collection part of up to 70 rows; gaps are recorded in leadAbsences.

skipNoLeadsboolean

Only keep records with outreach clues. When enabled, omit records without an email, phone, location, organization, website, or social profile. Author username alone does not count as an outreach clue.

maxFetchesinteger

Maximum candidate reads. Most candidate items to read per collection part of up to 70 rows; must be at least Maximum rows per search, feed, or item ID. Reading stops once the row allowance is filled; public profile enrichment has a separate 25-author and 20-second limit.

maxResultsinteger

Max rows per input (each listed URL, ID or keyword; a single target counts as one input). All row types share this allowance. Each plan caps the rows of one request (BASIC 10, PRO 70, ULTRA 200, MEGA 500); larger values are lowered to your plan's cap. You pay per delivered row (Rows).

requestIdstring

Optional. Your id for this request: repeating it while the job runs returns the same job.

Response schema

{
  "allOf": [
    {
      "type": "object",
      "properties": {
        "jobId": {
          "type": "string"
        },
        "status": {
          "type": "string",
          "enum": [
            "queued",
            "running",
            "succeeded",
            "partial",
            "failed",
            "cancelled"
          ]
        },
        "done": {
          "type": "boolean"
        },
        "rowsAvailable": {
          "type": "integer"
        },
        "rowsDelivered": {
          "type": "integer",
          "description": "Rows already delivered (and billed) to you for this job."
        },
        "rowsLimit": {
          "type": "integer",
          "description": "Most rows this job can deliver."
        },
        "estimatedFinishSec": {
          "type": "integer",
          "description": "While running: estimated seconds until done."
        },
        "statusUrl": {
          "type": "string"
        },
        "resultsUrl": {
          "type": "string"
        },
        "expiresAt": {
          "type": "string",
          "format": "date-time"
        },
        "retentionHours": {
          "type": "integer"
        },
        "error": {
          "$ref": "#/components/schemas/ErrorDetail"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "offset": {
          "type": "integer"
        },
        "nextOffset": {
          "type": "integer"
        },
        "hasMore": {
          "type": "boolean"
        },
        "rowCount": {
          "type": "integer"
        },
        "rowsBilled": {
          "type": "integer",
          "description": "Rows delivered by this response."
        },
        "rows": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/Row"
          }
        },
        "meta": {
          "type": "object",
          "additionalProperties": true
        }
      }
    }
  ]
}

Quick start

Easiest way: the APIHub CLI. Credits cover x402, no wallet needed.

# install and set up once
npx @apihubio/cli register
npx @apihubio/cli topup 10

# call this service
npx @apihubio/cli call "https://proxy.apihub.io/hackernews-com/v1/feeds" \
  -d '{"feeds":["top","new","best","ask","show","job"],"recordTypes":["story","comment","job","poll","pollopt"],"includeDescendants":false,"maxDepth":2,"enrichDetails":true,"skipNoLeads":false,"maxFetches":500,"maxResults":3,"requestId":"example requestId"}'

Or call the proxy directly (curl / any HTTP client):

curl -X POST https://proxy.apihub.io/hackernews-com/v1/feeds \
  -H "Authorization: Bearer ahk_your_key" \
  -H "Content-Type: application/json" \
  -d '{"feeds":["top","new","best","ask","show","job"],"recordTypes":["story","comment","job","poll","pollopt"],"includeDescendants":false,"maxDepth":2,"enrichDetails":true,"skipNoLeads":false,"maxFetches":500,"maxResults":3,"requestId":"example requestId"}'

# If credits available: charged automatically, returns 200
# Otherwise: returns 402 (pay via @x402/fetch or top up credits)

Pricing calculator

Estimate your monthly cost for Hacker News Stories Jobs and Comments.

POST /v1/feeds$0.0200/req
-
POST /v1/items$0.0200/req
-
POST /v1/search$0.0200/req
-