> ## Documentation Index
> Fetch the complete documentation index at: https://docs.scrapio.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Get a Hacker News item

> Get a Hacker News item (story, comment, job, poll, or pollopt) by id, optionally with its resolved comment tree.



## OpenAPI

````yaml get /v1/hacker-news/item
openapi: 3.1.0
info:
  title: Scrapio
  version: 1.0.0
  description: >-
    Turn any URL into structured data. Fetch raw HTML, crawl sites, extract
    structured content, interact with dynamic pages, and search the web through
    one API.
  contact:
    name: Scrapio Support
    url: https://scrapio.dev
  license:
    name: Proprietary
servers:
  - url: https://api.scrapio.dev
    description: Production
security:
  - bearerAuth: []
tags:
  - name: System
  - name: Fetch
  - name: Crawl
  - name: Map
  - name: Interact
  - name: Search
  - name: Google
  - name: Fast Search
  - name: Jobs
  - name: YouTube
  - name: Amazon
  - name: Walmart
  - name: Booking
  - name: Agoda
  - name: Airbnb
  - name: AutoTrader
  - name: ChatGPT
  - name: Perplexity
  - name: Gemini
  - name: Bing
  - name: Reddit
  - name: Instagram
  - name: Twitter
  - name: Facebook
  - name: Hacker News
  - name: GitHub
  - name: TikTok
  - name: Apple App Store
  - name: Target
  - name: Monitors
paths:
  /v1/hacker-news/item:
    get:
      tags:
        - Hacker News
      summary: Get a Hacker News item
      description: >-
        Retrieves a Hacker News item (story, comment, job, poll, or poll option)
        by id from the official Firebase API. Set `include_comments=true` to
        recursively resolve the comment tree (capped at depth 5 / 500 comments).
        Requires a Starter plan or higher.
      operationId: getHackerNewsItem
      parameters:
        - name: id
          in: query
          required: true
          schema:
            type: integer
            exclusiveMinimum: 0
            maximum: 9007199254740991
            description: Hacker News item id
        - name: include_comments
          in: query
          required: false
          schema:
            description: >-
              Recursively resolve the comment tree (capped at depth 5 / 500
              comments)
            type: boolean
      responses:
        '200':
          description: The resolved Hacker News item.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HackerNewsItemResponse'
        '400':
          description: Missing or invalid id.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Missing or invalid API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '402':
          description: Hacker News dedicated endpoints require a Starter plan or higher.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: The requested item could not be found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Daily credit cap exceeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '502':
          description: Hacker News upstream failed or returned an unusable response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: Hacker News upstream unavailable.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: >-
            curl
            "https://api.scrapio.dev/v1/hacker-news/item?id=8863&include_comments=true"
            \
              -H "Authorization: Bearer $SCRAPIO_API_KEY"
components:
  schemas:
    HackerNewsItemResponse:
      type: object
      properties:
        provider:
          type: string
          enum:
            - hacker_news
        request_id:
          type: string
        id:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        type:
          type: string
          enum:
            - story
            - comment
            - job
            - poll
            - pollopt
        by:
          anyOf:
            - type: string
            - type: 'null'
        time:
          anyOf:
            - type: integer
              minimum: -9007199254740991
              maximum: 9007199254740991
            - type: 'null'
        created_at:
          anyOf:
            - type: string
            - type: 'null'
        text:
          anyOf:
            - type: string
            - type: 'null'
        dead:
          anyOf:
            - type: boolean
            - type: 'null'
        deleted:
          anyOf:
            - type: boolean
            - type: 'null'
        title:
          anyOf:
            - type: string
            - type: 'null'
        url:
          anyOf:
            - type: string
            - type: 'null'
        score:
          anyOf:
            - type: integer
              minimum: -9007199254740991
              maximum: 9007199254740991
            - type: 'null'
        descendants:
          anyOf:
            - type: integer
              minimum: -9007199254740991
              maximum: 9007199254740991
            - type: 'null'
        kids:
          anyOf:
            - type: array
              items:
                type: integer
                minimum: -9007199254740991
                maximum: 9007199254740991
            - type: 'null'
        parent:
          anyOf:
            - type: integer
              minimum: -9007199254740991
              maximum: 9007199254740991
            - type: 'null'
        parts:
          anyOf:
            - type: array
              items:
                type: integer
                minimum: -9007199254740991
                maximum: 9007199254740991
            - type: 'null'
        poll:
          anyOf:
            - type: integer
              minimum: -9007199254740991
              maximum: 9007199254740991
            - type: 'null'
        comments:
          anyOf:
            - type: array
              items:
                $ref: '#/components/schemas/HackerNewsCommentItem'
            - type: 'null'
      required:
        - provider
        - request_id
        - id
        - type
        - by
        - time
        - created_at
        - text
        - dead
        - deleted
        - title
        - url
        - score
        - descendants
        - kids
        - parent
        - parts
        - poll
        - comments
      additionalProperties: false
    ErrorResponse:
      type: object
      properties:
        request_id:
          type: string
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
          required:
            - code
            - message
        diagnostics:
          type: object
          properties:
            outcome:
              type: string
              enum:
                - failed
            retryable:
              type: boolean
            blocked:
              type: boolean
            timed_out:
              type: boolean
          required:
            - outcome
            - retryable
          additionalProperties: false
      required:
        - request_id
        - error
      additionalProperties: false
    HackerNewsCommentItem:
      type: object
      properties:
        id:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        type:
          type: string
          enum:
            - story
            - comment
            - job
            - poll
            - pollopt
        by:
          anyOf:
            - type: string
            - type: 'null'
        time:
          anyOf:
            - type: integer
              minimum: -9007199254740991
              maximum: 9007199254740991
            - type: 'null'
        created_at:
          anyOf:
            - type: string
            - type: 'null'
        text:
          anyOf:
            - type: string
            - type: 'null'
        dead:
          anyOf:
            - type: boolean
            - type: 'null'
        deleted:
          anyOf:
            - type: boolean
            - type: 'null'
        title:
          anyOf:
            - type: string
            - type: 'null'
        url:
          anyOf:
            - type: string
            - type: 'null'
        score:
          anyOf:
            - type: integer
              minimum: -9007199254740991
              maximum: 9007199254740991
            - type: 'null'
        descendants:
          anyOf:
            - type: integer
              minimum: -9007199254740991
              maximum: 9007199254740991
            - type: 'null'
        kids:
          anyOf:
            - type: array
              items:
                type: integer
                minimum: -9007199254740991
                maximum: 9007199254740991
            - type: 'null'
        parent:
          anyOf:
            - type: integer
              minimum: -9007199254740991
              maximum: 9007199254740991
            - type: 'null'
        parts:
          anyOf:
            - type: array
              items:
                type: integer
                minimum: -9007199254740991
                maximum: 9007199254740991
            - type: 'null'
        poll:
          anyOf:
            - type: integer
              minimum: -9007199254740991
              maximum: 9007199254740991
            - type: 'null'
        comments:
          type: array
          items:
            $ref: '#/components/schemas/HackerNewsCommentItem'
      required:
        - id
        - type
        - by
        - time
        - created_at
        - text
        - dead
        - deleted
        - title
        - url
        - score
        - descendants
        - kids
        - parent
        - parts
        - poll
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key

````