Skip to content
scrapeatlas.Dashboard

List ranked Hacker News stories

Try in Playground

List the item IDs of a ranked Hacker News list in source rank order: top (the front page), new, best, Ask HN, Show HN or jobs. IDs are returned as data; read the ones you want with the story endpoint. Page through the list with limit and page.

GET/v1/hackernews/storiesx-api-key
x-api-keystringrequiredheader

Your ScrapeAtlas customer key. Create one on /account/ and set SCRAPEATLAS_API_KEY.

Query parameters
3
listenumrequiredquery

Required list to read: top, new, best, ask, show or job.

one of: top, new, best, ask, show, job

Exampletop
limitstringquery

IDs per page, 1–500; defaults to 50.

Example10
pagestringquery

Zero-based page number, 0–999; defaults to 0. A page past the end returns an empty list.

Response fields
18
requestIdstring

Request correlation identifier.

HTTP attempts, decoded bytes and duration for the operation, including the single shared retry.

accounting.upstreamRequestsinteger

Always included.

≥ 0

accounting.responseBytesinteger

Always included.

≥ 0

accounting.durationMsnumber

Always included.

≥ 0

successboolean

True when usable data is returned; inspect status and coverage for omissions.

statusenum

success, partial, failed, or challenged. HTTP 200 can be partial.

one of: success, partial

sourceUrlstring

Public Hacker News search, item or user URL for the request.

absolute HTTPS URL

fetchedAtstring

UTC retrieval time.

Complete means this bounded page or tree was returned without known omissions. It does not imply all matching items were enumerated.

coverage.sourcestring

Always included.

coverage.completeboolean

Always included.

coverage.warningsstring[]

Always included.

listenum

Required list to read: top, new, best, ask, show or job.

one of: top, new, best, ask, show, job

idsinteger[]

Item IDs for the requested page, in source rank order.

up to 500 items

totalinteger

Number of IDs the source list holds.

≥ 0

pageinteger

Zero-based page number, 0–999; defaults to 0. A page past the end returns an empty list.

≥ 0

limitinteger

IDs per page, 1–500; defaults to 50.

≥ 1

HTTP 200 returns the success variant. Check status: partial means usable data with warnings, and failed or challenged requests carry a failure object described in Errors & responses.

Error codes
11
HTTPfailure.codeMeaning
200partialUsable data with comment_limit, depth_limit, children_limit or counts_unavailable warnings.
400invalid_requestMissing, duplicate, malformed or unsupported parameters, including a search that selects nothing.
401unauthorizedMissing or invalid worker API key.
404not_foundThe source reports a missing item or user.
429upstream_rate_limitedSource throttling; no automatic retry.
502upstream_challengedSource rejected the unauthenticated request.
502unsupported_pageMalformed, mismatched or non-JSON source data.
502response_too_large payload_too_complexResponse exceeded byte or parsing limits.
502unsafe_redirect request_limit upstream_errorBounded source retrieval could not complete.
503busyAll worker slots are occupied.
504timeoutTotal request deadline expired.