GET
/
wp
/
v2
/
posts
/
{id}
curl --request GET \
  --url https://headlesswp.com/wp-json/wp/v2/posts/{id}
{
  "date": "2023-11-07T05:31:56Z",
  "date_gmt": "2023-11-07T05:31:56Z",
  "guid": {
    "raw": "<string>",
    "rendered": "<string>"
  },
  "id": 123,
  "link": "<string>",
  "modified": "2023-11-07T05:31:56Z",
  "modified_gmt": "2023-11-07T05:31:56Z",
  "slug": "<string>",
  "status": "publish",
  "type": "<string>",
  "password": "<string>",
  "permalink_template": "<string>",
  "generated_slug": "<string>",
  "class_list": [
    "<string>"
  ],
  "title": {
    "raw": "<string>",
    "rendered": "<string>"
  },
  "content": {
    "raw": "<string>",
    "rendered": "<string>",
    "block_version": 123,
    "protected": true
  },
  "author": 123,
  "excerpt": {
    "raw": "<string>",
    "rendered": "<string>",
    "protected": true
  },
  "featured_media": 123,
  "comment_status": "open",
  "ping_status": "open",
  "format": "standard",
  "meta": {
    "footnotes": ""
  },
  "sticky": true,
  "template": "<string>",
  "categories": [
    123
  ],
  "tags": [
    123
  ]
}

Path Parameters

id
any
required

Unique identifier for the post.

Query Parameters

context
enum<string>
default:view

Scope under which the request is made; determines fields present in response.

Available options:
view,
embed,
edit
excerpt_length
any

Override the default excerpt length.

password
any

The password for the post if it is password protected.

Response

200 - application/json
OK

The response is of type object.