Need help with your APIs? I offer API discovery, governance & evangelism services. Explore services →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

JSONPlaceholder Comments API

500 sample comments belonging to posts

JSONPlaceholder Comments API is one of 6 APIs that JSONPlaceholder publishes on the APIs.io network, described by a machine-readable OpenAPI specification.

This API exposes 12 JSON Schema definitions.

Tagged areas include Comments. The published artifact set on APIs.io includes an OpenAPI specification, API documentation, a getting-started guide, a JSON-LD context, and 12 JSON Schemas.

This API exposes 7 operations across 3 paths, and defines 2 schemas. It is described by OpenAPI 3.0.3, at version 1.0.0.

Requests are made against a single base URL, https://jsonplaceholder.typicode.com.

7 operations 3 paths 2 schemas 1 DELETE3 GET1 PATCH1 POST1 PUT

Metadata

The identity and technical contract details declared by the specification.

Specification
OpenAPI 3.0.3
API Version
1.0.0
Base URL
https://jsonplaceholder.typicode.com
Contact
License
Resource Areas
1

Paths & Operations 7

Across 3 paths, the API surfaces 7 operations — 1 DELETE, 3 GET, 1 PATCH, 1 POST, 1 PUT. Each is listed below with its method, path, parameters, and response codes.

Comments 7

500 sample comments belonging to posts

GET
/posts/{id}/comments
JSONPlaceholder List Post Comments
listPostComments 1 param → 200
GET
/comments
JSONPlaceholder List Comments
listComments 1 param → 200
POST
/comments
JSONPlaceholder Create Comment
createComment body → 201
GET
/comments/{id}
JSONPlaceholder Get Comment
getComment 1 param → 200
PUT
/comments/{id}
JSONPlaceholder Replace Comment
replaceComment 1 param body → 200
PATCH
/comments/{id}
JSONPlaceholder Update Comment
updateComment 1 param body → 200
DELETE
/comments/{id}
JSONPlaceholder Delete Comment
deleteComment 1 param → 200

Schemas 2

The contract defines 2 schemas that model the data the API accepts and returns. The most detailed are Comment (5 properties), CommentInput (4 properties). Each schema is shown below with its type and property counts.

CommentInput
object
Payload for creating or partially updating a comment.
4 properties
Comment
object
A sample comment attached to a post.
5 properties 5 required

Specification

The full machine-readable OpenAPI contract behind this narrative.

Source

jsonplaceholder-comments-api-openapi.yml Raw ↑

Other APIs JSONPlaceholder publishes across the network.

JSONPlaceholder Albums API
JSONPlaceholder Photos API
JSONPlaceholder Posts API
JSONPlaceholder Todos API
JSONPlaceholder Users API