Skip to main content
GET
Get post by ID
Overview
  • Returns a single post by its id.
  • Helpful to demonstrate path parameters and error handling for missing resources.
Path parameter
  • id (number): The post id to fetch.
Example usage
Response notes
  • Status 200: A Post object with id, userId, title, body.
  • Status 404: Not found (JSONPlaceholder returns an empty object for some endpoints; behavior may vary across resources).
Tips
  • Chain this with GET /comments?postId=1 to show related data fetching.

Path Parameters

id
integer
required

Response

Post

userId
integer
id
integer
title
string
body
string