Skip to main content

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.

Request

Path Parameters

    id stringrequired

Responses

single post

Schema
    id integerrequired
    username stringrequired
    avatar_template stringrequired
    created_at stringrequired
    cooked stringrequired
    post_number integerrequired
    post_type integerrequired
    updated_at stringrequired
    reply_count integerrequired
    reply_to_post_number stringnullrequired
    quote_count integerrequired
    incoming_link_count integerrequired
    reads integerrequired
    readers_count integerrequired
    score numberrequired
    yours booleanrequired
    topic_id integerrequired
    topic_slug stringrequired
    primary_group_name stringnullrequired
    flair_name stringnullrequired
    flair_url stringnullrequired
    flair_bg_color stringnullrequired
    flair_color stringnullrequired
    flair_group_id stringnullrequired
    version integerrequired
    can_edit booleanrequired
    can_delete booleanrequired
    can_recover booleanrequired
    can_see_hidden_post booleanrequired
    can_wiki booleanrequired
    user_title stringnullrequired
    bookmarked booleanrequired
    raw stringrequired
    actions_summary object[]required
  • Array [
  • id integerrequired

    2: like, 3, 4, 6, 7, 8: flag

    count integerrequired
    acted booleanrequired
    can_undo booleanrequired
    can_act booleanrequired
  • ]
  • moderator booleanrequired
    admin booleanrequired
    staff booleanrequired
    user_id integerrequired
    hidden booleanrequired
    trust_level integerrequired
    deleted_at stringnullrequired
    user_deleted booleanrequired
    edit_reason stringnullrequired
    can_view_edit_history booleanrequired
    wiki booleanrequired
    reviewable_id stringnullrequired
    reviewable_score_count integerrequired
    reviewable_score_pending_count integerrequired
    mentioned_users undefined[]required
    name stringnullrequired
    display_username stringnullrequired
Loading...