Lobsters Comments API

Community discussion comments on stories

OpenAPI Specification

lobsters-comments-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Lobsters Comments API
  description: The Lobsters public API provides read access to stories, comments, tags, and user profiles from the technology-focused link aggregation community. Endpoints return JSON and are available without authentication for public data. Stories can be retrieved by hottest or newest ranking, filtered by tag, and paginated by page number.
  version: 1.0.0
  contact:
    url: https://lobste.rs/about
  license:
    name: BSD 3-Clause
    url: https://github.com/lobsters/lobsters/blob/main/LICENSE
servers:
- url: https://lobste.rs
  description: Lobsters production server
tags:
- name: Comments
  description: Community discussion comments on stories
paths:
  /c/{short_id}.json:
    get:
      operationId: getComment
      summary: Get a comment by short ID
      description: Returns a single comment by its short identifier.
      tags:
      - Comments
      parameters:
      - name: short_id
        in: path
        description: Short alphanumeric identifier for the comment
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Comment object
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Comment'
        '404':
          description: Comment not found
components:
  schemas:
    Comment:
      type: object
      description: A community discussion comment on a story
      properties:
        short_id:
          type: string
          description: Short alphanumeric identifier for the comment
        short_id_url:
          type: string
          format: uri
          description: Full URL to the comment's short-id redirect
        url:
          type: string
          format: uri
          description: Full URL to the comment in context of its story
        created_at:
          type: string
          format: date-time
          description: ISO 8601 timestamp when the comment was posted
        last_edited_at:
          type: string
          format: date-time
          description: ISO 8601 timestamp of the last edit
        is_deleted:
          type: boolean
          description: Whether the comment has been deleted by the author
        is_moderated:
          type: boolean
          description: Whether the comment has been removed by a moderator
        score:
          type: integer
          description: Net vote score for the comment
        flags:
          type: integer
          description: Number of flags the comment has received
        parent_comment:
          type: string
          nullable: true
          description: Short ID of the parent comment; null for top-level comments
        comment:
          type: string
          description: HTML-rendered comment text
        comment_plain:
          type: string
          description: Plain text comment body
        depth:
          type: integer
          description: Nesting depth in the comment thread (0 = top level)
        commenting_user:
          type: string
          description: Username of the comment author
      required:
      - short_id
      - short_id_url
      - url
      - created_at
      - last_edited_at
      - is_deleted
      - is_moderated
      - score
      - flags
      - comment
      - comment_plain
      - depth
      - commenting_user