TestingAPIs is still being built. If something breaks, email support@testingapis.com.

List the comments on a post

GEThttps://api.testingapis.com/api/Posts/{id}/comments

Parameters 1

NameTypeDescription
idrequiredpath · integer (int32)Post ID.

Responses

200
The post's comments.
404
The post does not exist.
500
Unexpected server error.

Example

Request
curl -X GET "https://api.testingapis.com/api/Posts/1/comments"
Response200 OK
[
  {
    "id": 1,
    "postId": 1,
    "userId": 103,
    "body": "Great writeup, exactly what I needed.",
    "createdAt": "2025-07-01T15:23:00Z"
  },
  {
    "id": 2,
    "postId": 1,
    "userId": 105,
    "body": "Could you cover authentication in a follow-up?",
    "createdAt": "2025-07-01T16:10:00Z"
… (3 more lines)