# Retrieve a single post

`GET /posts/{id}.json`

This endpoint can be used to get the number of likes on a post using the
`actions_summary` property in the response. `actions_summary` responses
with the id of `2` signify a `like`. If there are no `actions_summary`
items with the id of `2`, that means there are 0 likes. Other ids likely
refer to various different flag types.


Authentication: no security requirement declared for this operation.

Parameters:

- `id` (path, string, required)
  Type: string

Responses:

- 200: single reviewable post

Content type: application/json

Type: any

- `id` (required)
  Type: integer

- `username` (required)
  Type: string

- `avatar_template` (required)
  Type: string

- `created_at` (required)
  Type: string

- `cooked` (required)
  Type: string

- `post_number` (required)
  Type: integer

- `post_type` (required)
  Type: integer

- `posts_count` (required)
  Type: integer

- `updated_at` (required)
  Type: string

- `reply_count` (required)
  Type: integer

- `reply_to_post_number` (required)
  Type: string; nullable

- `quote_count` (required)
  Type: integer

- `incoming_link_count` (required)
  Type: integer

- `reads` (required)
  Type: integer

- `readers_count` (required)
  Type: integer

- `score` (required)
  Type: number

- `yours` (required)
  Type: boolean

- `topic_id` (required)
  Type: integer

- `topic_slug` (required)
  Type: string

- `primary_group_name` (required)
  Type: string; nullable

- `flair_name` (required)
  Type: string; nullable

- `flair_url` (required)
  Type: string; nullable

- `flair_bg_color` (required)
  Type: string; nullable

- `flair_color` (required)
  Type: string; nullable

- `flair_group_id` (optional)
  Type: integer; nullable

- `version` (required)
  Type: integer

- `can_edit` (required)
  Type: boolean

- `can_delete` (required)
  Type: boolean

- `can_recover` (required)
  Type: boolean

- `can_see_hidden_post` (optional)
  Type: boolean

- `can_wiki` (required)
  Type: boolean

- `user_title` (required)
  Type: string; nullable

- `bookmarked` (required)
  Type: boolean

- `raw` (required)
  Type: string

- `actions_summary` (required)
  Type: Array<object>
  
  Items:
    Type: object
    
    - `id` (required)
      Type: integer
      
      `2`: like, `3`, `4`, `6`, `7`, `8`: flag
    
    - `count` (optional)
      Type: integer
    
    - `acted` (optional)
      Type: boolean
    
    - `can_undo` (optional)
      Type: boolean
    
    - `can_act` (optional)
      Type: boolean
    
    Additional properties: false

- `moderator` (required)
  Type: boolean

- `admin` (required)
  Type: boolean

- `staff` (required)
  Type: boolean

- `user_id` (required)
  Type: integer

- `hidden` (required)
  Type: boolean

- `trust_level` (required)
  Type: integer

- `deleted_at` (required)
  Type: string; nullable

- `user_deleted` (required)
  Type: boolean

- `edit_reason` (required)
  Type: string; nullable

- `can_view_edit_history` (required)
  Type: boolean

- `wiki` (required)
  Type: boolean

- `reviewable_id` (required)
  Type: integer; nullable

- `reviewable_score_count` (required)
  Type: integer

- `reviewable_score_pending_count` (required)
  Type: integer

- `post_url` (required)
  Type: string

- `mentioned_users` (optional)
  Type: Array<any>
  
  Items:
    Type: any

- `name` (optional)
  Type: string; nullable

- `display_username` (optional)
  Type: string; nullable

Additional properties: true

## Examples

### cURL

```bash
curl -X GET 'https://discourse.example.com/posts/string.json'
```

### JavaScript

```javascript
const response = await fetch('https://discourse.example.com/posts/string.json', {
  method: 'GET',
});

const data = await response.text();
```

### Python

```python
import requests

response = requests.get('https://discourse.example.com/posts/string.json')
print(response.text)
```
