Sylvia API Comments API

The Comments API from Sylvia API — 2 operation(s) for comments.

OpenAPI Specification

sylvia-api-comments-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Sylvia Comments API
  version: 1.0.0
  description: Reddit data API - no OAuth, no rate limits, pay-per-request. Posts, comments, search, subreddits, users, live streams, datasets.
  contact:
    name: Sylvia API
    url: https://sylvia-api.com
    email: support@sylvia-api.com
  license:
    name: Proprietary
    url: https://sylvia-api.com/terms
servers:
- url: https://api.sylvia-api.com/v1
  description: Production API server
security:
- ApiKeyAuth: []
tags:
- name: Comments
paths:
  /comments/search:
    get:
      summary: Search comments
      description: Search Reddit comments by query, subreddit, author, time range. Returns paginated results with full comment objects.
      operationId: searchComments
      parameters:
      - name: q
        in: query
        description: Search query
        required: true
        schema:
          type: string
      - name: subreddit
        in: query
        description: Limit to specific subreddit
        schema:
          type: string
      - name: author
        in: query
        description: Limit to specific author
        schema:
          type: string
      - name: after
        in: query
        description: Unix timestamp - only comments after this time
        schema:
          type: integer
          format: int64
      - name: before
        in: query
        description: Unix timestamp - only comments before this time
        schema:
          type: integer
          format: int64
      - name: sort
        in: query
        description: Sort order
        schema:
          type: string
          enum:
          - relevance
          - new
          - top
          default: relevance
      - name: limit
        in: query
        description: Results per page (max 100)
        schema:
          type: integer
          minimum: 1
          maximum: 100
          default: 25
      - name: cursor
        in: query
        description: Pagination cursor
        schema:
          type: string
      responses:
        '200':
          description: Successful search results
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/ServerError'
      tags:
      - Comments
  /comments/{id}:
    get:
      summary: Get single comment by ID
      description: Fetch a single Reddit comment by its full ID (e.g., 't1_abc123' or just 'abc123')
      operationId: getComment
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Comment object
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Comment'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
      tags:
      - Comments
components:
  schemas:
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
        message:
          type: string
        code:
          type: integer
    SearchResponse:
      type: object
      properties:
        data:
          type: array
          items:
            type: object
        cursor:
          type:
          - string
          - 'null'
        has_more:
          type: boolean
        total:
          type:
          - integer
          - 'null'
    Comment:
      type: object
      properties:
        id:
          type: string
        body:
          type: string
        author:
          type: string
        subreddit:
          type: string
        score:
          type: integer
        created_utc:
          type: integer
          format: int64
        permalink:
          type: string
        parent_id:
          type: string
        link_id:
          type: string
        is_submitter:
          type: boolean
        gilded:
          type: integer
        depth:
          type: integer
        collapsed:
          type: boolean
  responses:
    Unauthorized:
      description: Invalid or missing API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    RateLimited:
      description: Rate limit exceeded
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    ServerError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: API key for authentication. Get yours at https://sylvia-api.com