Sylvia API Users API

The Users API from Sylvia API — 3 operation(s) for users.

OpenAPI Specification

sylvia-api-users-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Sylvia Users 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: Users
paths:
  /users/{username}:
    get:
      summary: Get user profile
      description: 'Fetch Reddit user profile: karma, cake day, avatar, bio, etc.'
      operationId: getUser
      parameters:
      - name: username
        in: path
        description: Username (without u/)
        required: true
        schema:
          type: string
      responses:
        '200':
          description: User object
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
      tags:
      - Users
  /users/{username}/posts:
    get:
      summary: Get user's posts
      description: Fetch posts submitted by a specific user with pagination.
      operationId: getUserPosts
      parameters:
      - name: username
        in: path
        description: Username (without u/)
        required: true
        schema:
          type: string
      - name: sort
        in: query
        description: Sort order
        schema:
          type: string
          enum:
          - new
          - top
          - controversial
          default: new
      - name: time
        in: query
        description: Time filter for 'top' sort
        schema:
          type: string
          enum:
          - hour
          - day
          - week
          - month
          - year
          - all
      - 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: Paginated posts
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
      tags:
      - Users
  /users/{username}/comments:
    get:
      summary: Get user's comments
      description: Fetch comments made by a specific user with pagination.
      operationId: getUserComments
      parameters:
      - name: username
        in: path
        description: Username (without u/)
        required: true
        schema:
          type: string
      - name: sort
        in: query
        description: Sort order
        schema:
          type: string
          enum:
          - new
          - top
          - controversial
          default: new
      - name: time
        in: query
        description: Time filter for 'top' sort
        schema:
          type: string
          enum:
          - hour
          - day
          - week
          - month
          - year
          - all
      - 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: Paginated comments
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
      tags:
      - Users
components:
  schemas:
    User:
      type: object
      properties:
        name:
          type: string
        icon:
          type:
          - string
          - 'null'
        karma:
          type: integer
        cake_day:
          type: integer
          format: int64
        is_mod:
          type: boolean
        is_gold:
          type: boolean
        verified:
          type: boolean
        has_verified_email:
          type: boolean
    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'
  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'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: API key for authentication. Get yours at https://sylvia-api.com