Hacker News API

HealthyRead-only

Hacker News story lists (front page, newest, Ask HN, Show HN) with rank, title, url, site, points, author, comment count and age, plus any item's details and its full nested comment thread. Generated from news.ycombinator.com.

Base URL
https://api.maviapi.com/v1/sites/hackernews
Version
6
Endpoints
1305ms
p50 latency
60
Calls / 30d
GET/front

Front page

Top stories on the Hacker News front page: rank, id, title, url, site, points, author, comment count and age. In HN rank order; ?p pages through (30 per page).

Bearer auth. Pass your key as Authorization: Bearer <key> on every request.
integerOptionalin query

HN page number (30 stories per page, up to 17). data.next holds the next page's params, or null on the last page.

integerOptionalin query

Page size (max 200)

integerOptionalin query

Items to skip

booleanOptionalin query

Bypass and repopulate the 5-minute cache

dataobject
cachedboolean
sourcestring
paginationobject
Try itLive
GET
https://api.maviapi.com/v1/sites/hackernews/front?p=1&limit=10&offset=0&refresh=false
Request
curl "https://api.maviapi.com/v1/sites/hackernews/front?p=1&limit=10&offset=0&refresh=false" \
-H "Authorization: Bearer $MAVI_KEY"
Example808 B
{
  "data": {
    "feed": "front",
    "page": 1,
    "count": 30,
    "stories": [
      {
        "rank": 1,
        "id": 50412318,
        "title": "Person of Interest",
        "url": "https://krthr.co/person-of-interest/",
        "site": "krthr.co",
        "points": 65,
        "author": "krthr",
        "comment_count": 30,
        "age": "1 hour ago",
        "posted_at": "2026-11-08T11:23:28Z",
        "type": "story",
        "hn_url": "https://news.ycombinator.com/item?id=50412318"
      }
    ],
    "next": {
      "p": "2"
    }
  },
  "cached": false,
  "source": "https://hacker-news.firebaseio.com/v0/topstories.json?orderBy=%22%24key%22&startAt=%220%22&endAt=%2230%22",
  "pagination": {
    "total": 30,
    "limit": 50,
    "offset": 0,
    "count": 30,
    "has_more": false
  }
}

Get all the data, no code

Collect every page of GET /front into a dataset, then download it as CSV or JSON. One credit per page; the download is free.

Use Hacker News API from Claude, Cursor and other AI agents

The maviapi MCP server exposes every endpoint of this API as a typed tool. Works with no key on the shared demo limits.

Other clients
claude mcp add maviapi -e MAVIAPI_TOOLS=hackernews -- npx -y '@maviapi/mcp'

Build with the Hacker News API

Start with the operation and schema your application needs. This reference is generated from the currently published build, so its parameters and fields describe the API you can call. Use the console to inspect a response before adding it to a production workflow. The examples illustrate the response shape; they are not a promise that a particular record or value will still exist when you make a request.

For a dashboard or internal tool, fetch the specific data your screen needs and handle empty results explicitly. For a recurring collection, check whether the selected endpoint returns a paginated collection and supports saving to a dataset. A dataset can be exported as CSV or JSON and refreshed on a schedule. Review current plans and credit limits before running a large collection; a single export can require more than one API request.

Choose a starting endpoint

  • GET /front

    Top stories on the Hacker News front page: rank, id, title, url, site, points, author, comment count and age. In HN rank order; ?p pages through (30 per page).

    Parameters and response fields for GET /front
    Request parameters
    NameType / locationRequiredDescription
    pinteger / queryNoHN page number (30 stories per page, up to 17). data.next holds the next page's params, or null on the last page.
    limitinteger / queryNoPage size (max 200)
    offsetinteger / queryNoItems to skip
    refreshboolean / queryNoBypass and repopulate the 5-minute cache
    Top-level response fields
    FieldTypeDescription
    dataobject
    cachedboolean
    sourcestring
    paginationobject
  • GET /item/{id}

    One Hacker News item (story, Ask/Show HN, job, poll or a single comment) by id: title, url, site, text, points, author, comment count, age, plus its full comment thread as a nested tree (top level in HN order). Top-level threads paginate with limit/offset.

    Parameters and response fields for GET /item/{id}
    Request parameters
    NameType / locationRequiredDescription
    idinteger / pathYesHacker News item id
    limitinteger / queryNoPage size (max 200)
    offsetinteger / queryNoItems to skip
    refreshboolean / queryNoBypass and repopulate the 5-minute cache
    Top-level response fields
    FieldTypeDescription
    dataobject
    cachedboolean
    sourcestring
    paginationobject
  • GET /feed

    Combo: a story list (type=front|newest|ask|show) and, with comments=true, the top comment threads of its first `top` stories in one call.

    Parameters and response fields for GET /feed
    Request parameters
    NameType / locationRequiredDescription
    typestring / queryNoWhich story list Allowed values: front, newest, ask, show.
    commentsboolean / queryNoAttach top comments to the first `top` stories
    topinteger / queryNoHow many stories to enrich with comments Allowed values: 1, 2, 3, 4, 5.
    comments_per_storyinteger / queryNoTop-level comments (and direct replies each) per enriched story Allowed values: 1, 3, 5, 10.
    limitinteger / queryNoPage size (max 200)
    offsetinteger / queryNoItems to skip
    refreshboolean / queryNoBypass and repopulate the 5-minute cache
    Top-level response fields
    FieldTypeDescription
    dataobject
    cachedboolean
    sourcestring
    paginationobject
  • GET /newest

    Newest Hacker News submissions: rank, id, title, url, site, points, author, comment count and age. In HN rank order; ?p pages through (30 per page).

    Parameters and response fields for GET /newest
    Request parameters
    NameType / locationRequiredDescription
    pinteger / queryNoHN page number (30 stories per page, up to 17). data.next holds the next page's params, or null on the last page.
    limitinteger / queryNoPage size (max 200)
    offsetinteger / queryNoItems to skip
    refreshboolean / queryNoBypass and repopulate the 5-minute cache
    Top-level response fields
    FieldTypeDescription
    dataobject
    cachedboolean
    sourcestring
    paginationobject
  • GET /ask

    Ask HN posts: rank, id, title, url, site, points, author, comment count and age. In HN rank order; ?p pages through (30 per page).

    Parameters and response fields for GET /ask
    Request parameters
    NameType / locationRequiredDescription
    pinteger / queryNoHN page number (30 stories per page, up to 17). data.next holds the next page's params, or null on the last page.
    limitinteger / queryNoPage size (max 200)
    offsetinteger / queryNoItems to skip
    refreshboolean / queryNoBypass and repopulate the 5-minute cache
    Top-level response fields
    FieldTypeDescription
    dataobject
    cachedboolean
    sourcestring
    paginationobject
  • GET /show

    Show HN posts: rank, id, title, url, site, points, author, comment count and age. In HN rank order; ?p pages through (30 per page).

    Parameters and response fields for GET /show
    Request parameters
    NameType / locationRequiredDescription
    pinteger / queryNoHN page number (30 stories per page, up to 17). data.next holds the next page's params, or null on the last page.
    limitinteger / queryNoPage size (max 200)
    offsetinteger / queryNoItems to skip
    refreshboolean / queryNoBypass and repopulate the 5-minute cache
    Top-level response fields
    FieldTypeDescription
    dataobject
    cachedboolean
    sourcestring
    paginationobject

Integration questions

Is this the official Hacker News API?

This is an independent API hosted by maviapi for data from https://news.ycombinator.com. Its available operations are the endpoints in this reference. It does not imply a partnership with the source website or access to that website's private data. Check the source's own developer documentation separately if you need its official API or a feature outside this schema.

What can I do with this Hacker News integration?

Hacker News story lists (front page, newest, Ask HN, Show HN) with rank, title, url, site, points, author, comment count and age, plus any item's details and its full nested comment thread. The current reference contains 6 endpoints. All published endpoints use GET, so this build is for reading data, not changing the source website. Choose the operation that matches your workflow, then inspect its required parameters and response fields. Do not assume an unlisted operation is supported.

How do I authenticate and try a request?

Create a maviapi API key in the dashboard and send it in the Authorization header as Bearer followed by your key. The interactive console above provides parameter forms and cURL, Node.js and Python examples for the selected endpoint. Replace example values with inputs for your task. Keep your key in server-side environment variables; do not put it in a public repository or a browser bundle.

What happens when the source website changes?

maviapi checks endpoint health and attempts repairs when it detects failures. A repair must pass verification before becoming active. This reduces manual scraper maintenance, but does not guarantee that every source is reachable at every moment. Check the status page for current health and this API’s changelog for build history. Handle failed requests in your application and retry with a bounded backoff rather than an unbounded loop.

How do I keep my integration compatible?

Use the published input and output schema as the contract for the build you call. Required parameters, field types and available operations can differ between builds, so review the changelog before adopting a new version. Where you need stable behavior, configure a build pin for your API key. Include validation and error handling at your application boundary instead of assuming example response values will always be present.

  • Hürriyet

    Latest Turkish news from Hürriyet: a combined newest-first feed across sections (gündem, ekonomi, dünya, spor, ...) with headline, summary, image, section, publish time, author, URL and full article text, plus per-section feeds and single-article lookup.

Browse the full API catalog