Reddit Links & Comments API

Endpoints for interacting with submissions (links) and comments, including voting, saving, hiding, reporting, and submitting content.

GitHub OpenAPI

Operations 12

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /comments/{article} Get comments on a submission · Get Comments for a Submission #
Ask an LLM
“How do I read the comments on a Reddit post?”
“Can I sort comments by hot, top or new?”
Tell an agent
Get comments for submission {article}.
Show {limit} comments on {article} sorted by {sort}.
GET /api/morechildren Load omitted comments from a stub · Retrieve Additional Comments #
Ask an LLM
“How do I load the comments that were left out of a comment tree?”
“Can I fetch more replies from a comment stub?”
Tell an agent
Load more children {children} for submission {link_id}.
Fetch additional comments {children} under {link_id} sorted by {sort}.
POST /api/submit Submit a new post to a subreddit · Submit a New Link or Self-post #
Ask an LLM
“How do I post a link to a subreddit?”
“Can I submit a self-post with markdown text?”
Tell an agent
Submit {title} as a {kind} to {sr}.
Post {title} to {sr} with URL {url}.
POST /api/comment Comment on a submission or reply to a comment · Submit a New Comment #
Ask an LLM
“How do I reply to a comment on Reddit?”
“Can I post a comment on a submission?”
Tell an agent
Comment {text} on {thing_id}.
Reply {text} to comment {thing_id}.
POST /api/vote Upvote, downvote or unvote a post or comment · Vote on a Submission or Comment #
Ask an LLM
“How do I upvote a post or downvote a comment?”
“Can I remove my vote on a submission?”
Tell an agent
Vote {dir} on {id}.
Upvote {id} with direction {dir}.
POST /api/save Save a post or comment · Save a Submission or Comment #
Ask an LLM
“How do I save a post to my saved items?”
“Can I save a comment for later?”
Tell an agent
Save {id}.
Save {id} under category {category}.
POST /api/unsave Unsave a post or comment · Unsave a Submission or Comment #
Ask an LLM
“How do I remove a saved post from my saved items?”
“Can I unsave a comment I saved earlier?”
Tell an agent destructive · confirm first
Unsave {id}.
Remove saved item {id}.
POST /api/hide Hide a post from my view · Hide a Submission #
Ask an LLM
“How do I hide a post so it stops showing up?”
“Can I hide several posts at once?”
Tell an agent destructive · confirm first
Hide {id}.
Hide posts {id} from my listings.
POST /api/unhide Unhide a previously hidden post · Unhide a Submission #
Ask an LLM
“How do I bring back a post I hid?”
“Can I unhide a post so it shows up again?”
Tell an agent destructive · confirm first
Unhide {id}.
Show hidden posts {id} again.
POST /api/del Delete my own post or comment · Delete a Submission or Comment #
Ask an LLM
“How do I delete a post I wrote?”
“Can I remove a comment I posted?”
Tell an agent destructive · confirm first
Delete {id}.
Remove my post {id}.
POST /api/editusertext Edit my own post or comment · Edit a Self-post or Comment #
Ask an LLM
“How do I edit the text of a post I already wrote?”
“Can I change a comment after posting it?”
Tell an agent
Edit {thing_id} to read {text}.
Change my comment {thing_id} to {text}.
POST /api/report Report a post or comment to moderators · Report a Submission or Comment #
Ask an LLM
“How do I report a spam post to a subreddit's mods?”
“Can I report a comment for breaking a rule?”
Tell an agent
Report {thing_id}.
Report {thing_id} because {reason}.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/reddit:reddit-links-comments-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

reddit-links-comments-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Reddit Data Links & Comments API
  description: The Reddit Data API provides programmatic access to Reddit content including subreddits, posts, comments, user profiles, and voting data. Developers can use the API to read and submit content, manage subreddits, search across the platform, and interact with Reddit communities. All requests require OAuth 2.0 authentication via oauth.reddit.com, with rate limits of 60 requests per minute for authenticated clients.
  version: '1.0'
  contact:
    name: Reddit Developer Support
    url: https://support.reddithelp.com/hc/en-us/articles/16160319875092-Reddit-Data-API-Wiki
  termsOfService: https://www.redditinc.com/policies/data-api-terms
servers:
- url: https://oauth.reddit.com
  description: OAuth API Server
security:
- oauth2: []
tags:
- name: Links & Comments
  description: Endpoints for interacting with submissions (links) and comments, including voting, saving, hiding, reporting, and submitting content.
paths:
  /comments/{article}:
    get:
      operationId: getComments
      summary: Get Comments for a Submission
      description: Returns comments for a given submission (article). The response includes both the submission data and a tree of comments. Use the sort parameter to control comment ordering.
      tags:
      - Links & Comments
      parameters:
      - name: article
        in: path
        required: true
        description: The ID36 of the submission to retrieve comments for.
        schema:
          type: string
      - name: sort
        in: query
        description: The sorting method for comments.
        schema:
          type: string
          enum:
          - confidence
          - top
          - new
          - controversial
          - old
          - random
          - qa
          - live
      - name: depth
        in: query
        description: Maximum depth of subtrees in the thread.
        schema:
          type: integer
      - name: context
        in: query
        description: Number of levels of parent comments to include for a comment permalink.
        schema:
          type: integer
          minimum: 0
          maximum: 8
      - $ref: '#/components/parameters/limit'
      responses:
        '200':
          description: Submission and comment tree
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Listing'
  /api/morechildren:
    get:
      operationId: getMoreChildren
      summary: Retrieve Additional Comments
      description: Retrieves additional comments omitted from a base comment tree. Used to load more comments from a stub returned in a comment listing.
      tags:
      - Links & Comments
      parameters:
      - name: link_id
        in: query
        required: true
        description: The fullname (t3_ prefix) of the submission.
        schema:
          type: string
      - name: children
        in: query
        required: true
        description: A comma-delimited list of comment ID36s to be fetched.
        schema:
          type: string
      - name: sort
        in: query
        description: The sorting method for comments.
        schema:
          type: string
          enum:
          - confidence
          - top
          - new
          - controversial
          - old
          - random
          - qa
          - live
      - name: api_type
        in: query
        description: The string json to request JSON response.
        schema:
          type: string
          default: json
      responses:
        '200':
          description: Additional comment data
          content:
            application/json:
              schema:
                type: object
  /api/submit:
    post:
      operationId: submit
      summary: Submit a New Link or Self-post
      description: Submits a new link or self-post to a subreddit. Requires the submit OAuth scope.
      tags:
      - Links & Comments
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
              - sr
              - title
              - kind
              properties:
                sr:
                  type: string
                  description: The name of the subreddit to submit to.
                title:
                  type: string
                  description: The title of the submission (max 300 characters).
                  maxLength: 300
                kind:
                  type: string
                  description: The type of submission.
                  enum:
                  - link
                  - self
                  - image
                  - video
                  - videogif
                url:
                  type: string
                  format: uri
                  description: The URL for a link submission.
                text:
                  type: string
                  description: The body text for a self-post (markdown).
                richtext_json:
                  type: string
                  description: The rich text body as JSON for a self-post.
                flair_id:
                  type: string
                  description: The flair template ID to apply to the submission.
                flair_text:
                  type: string
                  description: The flair text to apply to the submission.
                nsfw:
                  type: boolean
                  description: Whether the submission is NSFW.
                spoiler:
                  type: boolean
                  description: Whether the submission is a spoiler.
                resubmit:
                  type: boolean
                  description: Whether to allow resubmitting a URL that has already been submitted.
                sendreplies:
                  type: boolean
                  description: Whether to send replies to the user's inbox.
                api_type:
                  type: string
                  default: json
      responses:
        '200':
          description: Submission created
          content:
            application/json:
              schema:
                type: object
        '403':
          description: Permission denied
  /api/comment:
    post:
      operationId: comment
      summary: Submit a New Comment
      description: Submits a new comment on a submission or in reply to another comment. Requires the submit OAuth scope.
      tags:
      - Links & Comments
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
              - thing_id
              - text
              properties:
                thing_id:
                  type: string
                  description: The fullname of the parent thing to comment on.
                text:
                  type: string
                  description: The body of the comment (markdown).
                richtext_json:
                  type: string
                  description: The rich text body as JSON.
                api_type:
                  type: string
                  default: json
      responses:
        '200':
          description: Comment created
          content:
            application/json:
              schema:
                type: object
        '403':
          description: Permission denied
  /api/vote:
    post:
      operationId: vote
      summary: Vote on a Submission or Comment
      description: Casts a vote on a submission or comment. Direction values are 1 for upvote, -1 for downvote, and 0 to remove the vote. Requires the vote OAuth scope.
      tags:
      - Links & Comments
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
              - id
              - dir
              properties:
                id:
                  type: string
                  description: The fullname of the thing to vote on.
                dir:
                  type: integer
                  description: 'Vote direction: 1 (upvote), -1 (downvote), 0 (unvote).'
                  enum:
                  - 1
                  - 0
                  - -1
                rank:
                  type: integer
                  description: An integer greater than 1 (deprecated).
      responses:
        '200':
          description: Vote cast successfully
          content:
            application/json:
              schema:
                type: object
        '401':
          description: Authentication required
  /api/save:
    post:
      operationId: save
      summary: Save a Submission or Comment
      description: Saves a submission or comment to the authenticated user's saved items. Requires the save OAuth scope.
      tags:
      - Links & Comments
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
              - id
              properties:
                id:
                  type: string
                  description: The fullname of the thing to save.
                category:
                  type: string
                  description: A category name for the saved item (Reddit Gold feature).
      responses:
        '200':
          description: Item saved successfully
  /api/unsave:
    post:
      operationId: unsave
      summary: Unsave a Submission or Comment
      description: Removes a submission or comment from the authenticated user's saved items. Requires the save OAuth scope.
      tags:
      - Links & Comments
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
              - id
              properties:
                id:
                  type: string
                  description: The fullname of the thing to unsave.
      responses:
        '200':
          description: Item unsaved successfully
  /api/hide:
    post:
      operationId: hide
      summary: Hide a Submission
      description: Hides a submission from the authenticated user's listings. Requires the report OAuth scope.
      tags:
      - Links & Comments
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
              - id
              properties:
                id:
                  type: string
                  description: A comma-separated list of fullnames to hide.
      responses:
        '200':
          description: Submission hidden successfully
  /api/unhide:
    post:
      operationId: unhide
      summary: Unhide a Submission
      description: Unhides a previously hidden submission. Requires the report OAuth scope.
      tags:
      - Links & Comments
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
              - id
              properties:
                id:
                  type: string
                  description: A comma-separated list of fullnames to unhide.
      responses:
        '200':
          description: Submission unhidden successfully
  /api/del:
    post:
      operationId: del
      summary: Delete a Submission or Comment
      description: Deletes a submission or comment authored by the authenticated user. Requires the edit OAuth scope.
      tags:
      - Links & Comments
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
              - id
              properties:
                id:
                  type: string
                  description: The fullname of the thing to delete.
      responses:
        '200':
          description: Item deleted successfully
  /api/editusertext:
    post:
      operationId: editUserText
      summary: Edit a Self-post or Comment
      description: Edits the body text of a self-post or comment authored by the authenticated user. Requires the edit OAuth scope.
      tags:
      - Links & Comments
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
              - thing_id
              - text
              properties:
                thing_id:
                  type: string
                  description: The fullname of the thing to edit.
                text:
                  type: string
                  description: The new body text (markdown).
                api_type:
                  type: string
                  default: json
      responses:
        '200':
          description: Text edited successfully
          content:
            application/json:
              schema:
                type: object
  /api/report:
    post:
      operationId: report
      summary: Report a Submission or Comment
      description: Reports a submission or comment to the moderators of the subreddit. Requires the report OAuth scope.
      tags:
      - Links & Comments
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
              - thing_id
              properties:
                thing_id:
                  type: string
                  description: The fullname of the thing to report.
                reason:
                  type: string
                  description: The reason for reporting (max 100 characters).
                  maxLength: 100
                other_reason:
                  type: string
                  description: A custom reason for reporting (max 100 characters).
                  maxLength: 100
                site_reason:
                  type: string
                  description: A site rule violation reason.
                rule_reason:
                  type: string
                  description: A subreddit rule violation reason.
                api_type:
                  type: string
                  default: json
      responses:
        '200':
          description: Report submitted
components:
  schemas:
    Thing:
      type: object
      description: A Reddit thing is the base object type. All Reddit objects (comments, links, subreddits, etc.) are things with a kind and data payload.
      properties:
        kind:
          type: string
          description: The kind identifier (t1 for comment, t2 for account, t3 for link, t4 for message, t5 for subreddit, t6 for award).
          enum:
          - t1
          - t2
          - t3
          - t4
          - t5
          - t6
        data:
          type: object
          description: The thing's data payload, varying by kind.
    Listing:
      type: object
      description: A Reddit listing is a paginated collection of things. Listings contain a data object with children and pagination information.
      properties:
        kind:
          type: string
          description: The kind identifier, always "Listing".
          enum:
          - Listing
        data:
          type: object
          properties:
            after:
              type: string
              nullable: true
              description: The fullname of the next item for forward pagination.
            before:
              type: string
              nullable: true
              description: The fullname of the previous item for backward pagination.
            dist:
              type: integer
              description: The number of items in this listing.
            modhash:
              type: string
              description: A modhash for CSRF protection.
            children:
              type: array
              description: The list of things in this listing.
              items:
                $ref: '#/components/schemas/Thing'
  parameters:
    limit:
      name: limit
      in: query
      description: The maximum number of items to return (default 25, max 100).
      schema:
        type: integer
        default: 25
        minimum: 1
        maximum: 100
  securitySchemes:
    oauth2:
      type: oauth2
      description: Reddit uses OAuth 2.0 for authentication. All API requests must include a valid access token obtained through one of the supported OAuth grant types.
      flows:
        authorizationCode:
          authorizationUrl: https://www.reddit.com/api/v1/authorize
          tokenUrl: https://www.reddit.com/api/v1/access_token
          scopes:
            identity: Access user identity
            edit: Edit and delete content
            flair: Set user and link flair
            history: Access voting history
            modconfig: Manage subreddit configuration
            modflair: Manage subreddit flair
            modlog: Access moderation log
            modposts: Approve and remove content
            modwiki: Manage wiki pages
            mysubreddits: Access subscribed subreddits
            privatemessages: Access private messages
            read: Read content
            report: Report content
            save: Save and unsave content
            submit: Submit content
            subscribe: Manage subscriptions
            vote: Vote on content
            wikiedit: Edit wiki pages
            wikiread: Read wiki pages
externalDocs:
  description: Reddit API Documentation
  url: https://www.reddit.com/dev/api