dev-to Comments API

Endpoints for retrieving comments on articles and podcast episodes, including threaded conversation views.

Operations 2

GET /comments Comments #
GET /comments/{id} Comment by id #

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/dev-to-comments-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

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. See our Privacy Policy and Terms.

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

OpenAPI Specification

dev-to-comments-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Dev.to Forem Articles Comments API
  description: The Dev.to Forem API (v1) is a RESTful API that provides programmatic access to the Dev.to developer community platform, which is built on the open-source Forem framework. The API enables developers to create, read, update, and manage articles, comments, users, organizations, tags, followers, listings, podcast episodes, pages, display ads, reactions, reading lists, and webhooks. It uses API key authentication, requires an accept header of application/vnd.forem.api-v1+json, and returns JSON responses. Unauthenticated endpoints are CORS-enabled, making it possible to fetch public content directly from browser-based applications.
  version: 1.0.0
  contact:
    name: Forem Support
    url: https://forem.com
  termsOfService: https://dev.to/terms
servers:
- url: https://dev.to/api
  description: Dev.to Production Server
security:
- apiKey: []
tags:
- name: Comments
  description: Endpoints for retrieving comments on articles and podcast episodes, including threaded conversation views.
paths:
  /comments:
    get:
      operationId: getCommentsByArticleId
      summary: Comments
      description: Retrieves all comments belonging to an article or podcast episode, returned as threaded conversations. Provide either a_id for articles or p_id for podcast episodes.
      tags:
      - Comments
      security: []
      parameters:
      - name: a_id
        in: query
        schema:
          type: integer
        description: The article ID to retrieve comments for.
      - name: p_id
        in: query
        schema:
          type: integer
        description: The podcast episode ID to retrieve comments for.
      responses:
        '200':
          description: A list of threaded comments
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Comment'
  /comments/{id}:
    get:
      operationId: getCommentById
      summary: Comment by id
      description: Retrieves a single comment and its descendants by the comment ID.
      tags:
      - Comments
      security: []
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
        description: The ID of the comment.
      responses:
        '200':
          description: The requested comment with its descendants
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Comment'
        '404':
          description: Comment not found
components:
  schemas:
    User:
      type: object
      description: A user account on the DEV platform.
      properties:
        name:
          type: string
          description: The display name of the user.
        username:
          type: string
          description: The unique username of the user.
        twitter_username:
          type: string
          nullable: true
          description: The user's Twitter username.
        github_username:
          type: string
          nullable: true
          description: The user's GitHub username.
        user_id:
          type: integer
          description: The unique numeric ID of the user.
        website_url:
          type: string
          format: uri
          nullable: true
          description: The user's website URL.
        location:
          type: string
          nullable: true
          description: The user's location.
        summary:
          type: string
          nullable: true
          description: A brief bio or summary of the user.
        profile_image:
          type: string
          format: uri
          description: The URL of the user's profile image.
        profile_image_90:
          type: string
          format: uri
          description: The URL of the 90px profile image.
        joined_at:
          type: string
          format: date-time
          description: The ISO 8601 timestamp when the user joined.
    Comment:
      type: object
      description: A comment on an article or podcast episode, with nested children for threaded conversations.
      properties:
        type_of:
          type: string
          description: The type of resource, always "comment".
        id_code:
          type: string
          description: The unique identifier code of the comment.
        created_at:
          type: string
          format: date-time
          description: The ISO 8601 timestamp when the comment was created.
        body_html:
          type: string
          description: The comment body rendered as HTML.
        user:
          $ref: '#/components/schemas/User'
        children:
          type: array
          items:
            $ref: '#/components/schemas/Comment'
          description: Nested child comments in the thread.
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: api-key
      description: API key obtained from the DEV.to settings page. Pass in the api-key header for authenticated requests.
externalDocs:
  description: Forem API V1 Documentation
  url: https://developers.forem.com/api/v1