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

# Reddit Post API

> Title, body, score, author, and metadata for one post.



## OpenAPI

````yaml openapi.json GET /v1/reddit/posts/{postId}
openapi: 3.0.0
info:
  title: ScoutLayer API
  version: 1.0.0
  description: Competitor data. One API.
servers:
  - url: https://api.scoutlayer.io
    description: Production
security:
  - ApiKeyAuth: []
  - BearerAuth: []
paths:
  /v1/reddit/posts/{postId}:
    get:
      tags:
        - reddit
        - posts
      summary: Get a single Reddit post by ID
      description: Title, body, score, author, and metadata for one post.
      parameters:
        - schema:
            type: string
            minLength: 1
            example: abc123
          required: true
          name: postId
          in: path
      responses:
        '200':
          description: Get a single Reddit post by ID
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RedditPost'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: Insufficient credits
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '501':
          description: This endpoint is declared but not yet implemented — never charged
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '502':
          description: The orchestrator failed or was unreachable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - ApiKeyAuth: []
        - BearerAuth: []
components:
  schemas:
    RedditPost:
      type: object
      properties:
        subreddit:
          type: string
          description: Subreddit name, without the "r/" prefix
        subredditId:
          type: string
          description: Reddit's internal subreddit ID (e.g. "t5_2qh33")
        postId:
          type: string
          description: Reddit's base36 post ID, without the "t3_" prefix
        title:
          type: string
        author:
          type: string
          description: Author username, without the "u/" prefix
        score:
          type: integer
          description: Net upvotes (upvotes minus downvotes)
        upvoteRatio:
          type: number
          minimum: 0
          maximum: 1
          description: Fraction of votes that are upvotes, from 0 to 1
        numComments:
          type: integer
        url:
          type: string
          description: Link the post points to — the post permalink itself for text posts
        selftext:
          type: string
          description: Post body text (Markdown); empty string for link posts
        isSelf:
          type: boolean
          description: True for a text post, false for a link post
        isVideo:
          type: boolean
        isStickied:
          type: boolean
          description: True if pinned to the top of the subreddit
        thumbnail:
          type: string
          nullable: true
          description: Thumbnail image URL, or null if none/not applicable
        createdAt:
          type: string
          description: ISO 8601 timestamp
        permalink:
          type: string
          description: Full https://www.reddit.com/... URL to the post
        flair:
          type: string
          nullable: true
        domain:
          type: string
          description: Link domain (e.g. "i.redd.it", or "self.<subreddit>" for text posts)
      required:
        - subreddit
        - subredditId
        - postId
        - title
        - author
        - score
        - upvoteRatio
        - numComments
        - url
        - selftext
        - isSelf
        - isVideo
        - isStickied
        - thumbnail
        - createdAt
        - permalink
        - flair
        - domain
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: NOT_FOUND
            message:
              type: string
          required:
            - code
            - message
      required:
        - error
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: >-
        API key passed as the X-API-Key request header. Recommended for
        server-to-server calls.
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key (or OAuth token) passed as a Bearer token in the Authorization
        header.

````