GET /sites/$site/posts/$post_ID/likes/

List the Likes for a Post

Resource URL

Type URL and Format
GET https://public-api.wordpress.com/rest/v1/sites/$site/posts/$post_ID/likes/

Method Parameters

Parameter Type Description
$site (int|string) The site ID, The site domain
$post_ID (int) The post ID

Query Parameters

Parameter Type Description
http_envelope (bool)
false:
(default)
true:
Some environments (like in-browser Javascript or Flash) block or divert responses with a non-200 HTTP status code. Setting this parameter will force the HTTP status code to always be 200. The JSON response is wrapped in an "envelope" containing the "real" HTTP status code and headers.
pretty (bool)
false:
(default)
true:
Output pretty JSON
meta (string) Optional. Loads data from the endpoints found in the 'meta' part of the response. Comma separated list. Example: meta=site,likes
callback (string) An optional JSONP callback function.

Response Parameters

Parameter Type Description
found (int) The total number of likes for this post.
i_like (bool) If authenticated, this returns the current like status for the user on this post.
likes (array) An array of users who liked this post.

Example

cURL

curl 'https://public-api.wordpress.com/rest/v1/sites/example.wordpress.com/posts/1/likes/?pretty=1'

PHP

<?php

$options  = array (
  'http' => 
  array (
    'ignore_errors' => true,
  ),
);

$context  = stream_context_create( $options );
$response = file_get_contents(
  'https://public-api.wordpress.com/rest/v1/sites/example.wordpress.com/posts/1/likes/?pretty=1',
  false,
  $context
);
$response = json_decode( $response );

?>

Response Body

{
    "found": 20,
    "i_like": false,
    "likes": [
        {
            "ID": 22176418,
            "email": false,
            "name": "dian pratama",
            "nice_name": "gemian",
            "URL": "http:\/\/pratagemian.wordpress.com",
            "avatar_URL": "https:\/\/2.gravatar.com\/avatar\/584bab593c374c0d9f6278fddc15049c?s=96&d=identicon&r=G",
            "profile_URL": "http:\/\/en.gravatar.com\/gemian",
            "site_ID": 21650596,
            "default_avatar": false
        },
        {
            "ID": 25391862,
            "email": false,
            "name": "femasmarvendra",
            "nice_name": "femasmarvendra",
            "URL": "http:\/\/femasmarvendra.wordpress.com",
            "avatar_URL": "https:\/\/1.gravatar.com\/avatar\/4daceca922acd4ef629aef553d3916a6?s=96&d=identicon&r=G",
            "profile_URL": "http:\/\/en.gravatar.com\/femasmarvendra",
            "site_ID": 25483937,
            "default_avatar": true
        },
        {
            "ID": 26523905,
            "email": false,
            "name": "cescastar5",
            "nice_name": "cescastar5",
            "URL": "http:\/\/cescastar5.wordpress.com",
            "avatar_URL": "https:\/\/1.gravatar.com\/avatar\/72e3d49c7f81060766b0496185c080c4?s=96&d=identicon&r=G",
            "profile_URL": "http:\/\/en.gravatar.com\/cescastar5",
            "site_ID": 26978877,
            "default_avatar": false
        },
        {
            "ID": 29076106,
            "email": false,
            "name": "jwellwin",
            "nice_name": "jwellwin",
            "URL": "http:\/\/chelseanewsletter.wordpress.com",
            "avatar_URL": "https:\/\/2.gravatar.com\/avatar\/eb50ec84a93f959e378dd65066d57e96?s=96&d=identicon&r=G",
            "profile_URL": "http:\/\/en.gravatar.com\/jwellwin",
            "site_ID": 62411637,
            "default_avatar": false
        },
        {
            "ID": 30089109,
            "email": false,
            "name": "hf556",
            "nice_name": "hf556",
            "URL": "http:\/\/binweevilcompany.wordpress.com",
            "avatar_URL": "https:\/\/2.gravatar.com\/avatar\/2f4294b173b5172ef0d5b711c27fb1bb?s=96&d=identicon&r=G",
            "profile_URL": "http:\/\/en.gravatar.com\/hf556",
            "site_ID": 50643431,
            "default_avatar": false
        },
        {
            "ID": 32825362,
            "email": false,
            "name": "\u03a8\u03b5 = (Dimension10)",
            "nice_name": "psiepsilon",
            "URL": "http:\/\/psiepsilon.wordpress.com",
            "avatar_URL": "https:\/\/1.gravatar.com\/avatar\/dc183fa5ee5f0d66aa6f1797d6992c9f?s=96&d=identicon&r=G",
            "profile_URL": "http:\/\/en.gravatar.com\/psiepsilon",
            "site_ID": 32777622,
            "default_avatar": false
        },
        {
            "ID": 42144909,
            "email": false,
            "name": "Prinze Charming",
            "nice_name": "prinzecharming",
            "URL": "http:\/\/www.prinzecharming.com",
            "avatar_URL": "https:\/\/1.gravatar.com\/avatar\/df5fbbe123e17558c67d518ccaea9573?s=96&d=identicon&r=G",
            "profile_URL": "http:\/\/en.gravatar.com\/prinzecharming",
            "site_ID": 42717098,
            "default_avatar": false
        },
        {
            "ID": 45452212,
            "email": false,
            "name": "charlevy",
            "nice_name": "charlevy",
            "URL": "http:\/\/charlevy.wordpress.com",
            "avatar_URL": "https:\/\/2.gravatar.com\/avatar\/869e8b27f3a90a6bf73c660ba9bfdd88?s=96&d=identicon&r=G",
            "profile_URL": "http:\/\/en.gravatar.com\/charlevy",
            "site_ID": 46277737,
            "default_avatar": true
        },
        {
            "ID": 45796856,
            "email": false,
            "name": "Websiteguy's Plugins",
            "nice_name": "websiteguysplugins-2",
            "URL": "http:\/\/www.websiteguystplugins.wordpress.com",
            "avatar_URL": "https:\/\/2.gravatar.com\/avatar\/2a116ddb1dbb4bd63dd24b8e84e69257?s=96&d=identicon&r=G",
            "profile_URL": "http:\/\/en.gravatar.com\/kg2tw",
            "site_ID": 58533737,
            "default_avatar": false
        },
        {
            "ID": 47279936,
            "email": false,
            "name": "FatEgg2511",
            "nice_name": "fategg2511",
            "URL": "http:\/\/fateggsareawesome.wordpress.com",
            "avatar_URL": "https:\/\/1.gravatar.com\/avatar\/7eba35c8cadd92dcd70952c10b0ad348?s=96&d=identicon&r=G",
            "profile_URL": "http:\/\/en.gravatar.com\/fategg2511",
            "site_ID": 48465336,
            "default_avatar": false
        },
        {
            "ID": 47993692,
            "email": false,
            "name": "elseygirl",
            "nice_name": "elseygirl",
            "URL": "http:\/\/goodreadsblog.wordpress.com",
            "avatar_URL": "https:\/\/1.gravatar.com\/avatar\/130d5978b8d2523abfff5f492658e9f3?s=96&d=identicon&r=G",
            "profile_URL": "http:\/\/en.gravatar.com\/elseygirl",
            "site_ID": 49391156,
            "default_avatar": false
        },
        {
            "ID": 48307503,
            "email": false,
            "name": "liubishazdravkovich",
            "nice_name": "liubishazdravkovich",
            "URL": "http:\/\/bestseller21vek.wordpress.com",
            "avatar_URL": "https:\/\/0.gravatar.com\/avatar\/9c94251a6bbb7b5ef939f43780ecd4c0?s=96&d=identicon&r=G",
            "profile_URL": "http:\/\/en.gravatar.com\/liubishazdravkovich",
            "site_ID": 49792835,
            "default_avatar": false
        },
        {
            "ID": 50869561,
            "email": false,
            "name": "nanaiury",
            "nice_name": "nanaiury",
            "URL": "http:\/\/nanandae.wordpress.com",
            "avatar_URL": "https:\/\/0.gravatar.com\/avatar\/3b05ddcb52ac7e2d9907fc55feb5b9b6?s=96&d=identicon&r=G",
            "profile_URL": "http:\/\/en.gravatar.com\/nanaiury",
            "site_ID": 53066216,
            "default_avatar": false
        },
        {
            "ID": 55508653,
            "email": false,
            "name": "chiegustifitria",
            "nice_name": "chiegustifitria",
            "URL": "http:\/\/chiegustifitria.wordpress.com",
            "avatar_URL": "https:\/\/1.gravatar.com\/avatar\/d65638cfa27af84de06193160c8f26ef?s=96&d=identicon&r=G",
            "profile_URL": "http:\/\/en.gravatar.com\/chiegustifitria",
            "site_ID": 58067797,
            "default_avatar": false
        },
        {
            "ID": 56028978,
            "email": false,
            "name": "Djzinfumusical.net",
            "nice_name": "djzinfumusical",
            "URL": "http:\/\/DJZINFUMUSICAL.NET",
            "avatar_URL": "https:\/\/0.gravatar.com\/avatar\/39358cf55afa3384d3d70768e7881794?s=96&d=identicon&r=G",
            "profile_URL": "http:\/\/en.gravatar.com\/djzinfumusical",
            "site_ID": 60069997,
            "default_avatar": false
        },
        {
            "ID": 57028283,
            "email": false,
            "name": "ERYNA HOMEMADE",
            "nice_name": "erynabakery",
            "URL": "http:\/\/erynabakeryblog.wordpress.com",
            "avatar_URL": "https:\/\/0.gravatar.com\/avatar\/cdb516bb3e033bdade17e22c310f7f77?s=96&d=identicon&r=G",
            "profile_URL": "http:\/\/en.gravatar.com\/erynabakery",
            "site_ID": 61197884,
            "default_avatar": false
        },
        {
            "ID": 57619773,
            "email": false,
            "name": "jamessinach",
            "nice_name": "jamessinach",
            "URL": "http:\/\/www.sinach4entertainment.com",
            "avatar_URL": "https:\/\/2.gravatar.com\/avatar\/2ba56e86582e88746811bbbad54eeeff?s=96&d=identicon&r=G",
            "profile_URL": "http:\/\/en.gravatar.com\/jamessinach",
            "site_ID": 60232275,
            "default_avatar": false
        },
        {
            "ID": 57924559,
            "email": false,
            "name": "federica3101",
            "nice_name": "federica3101",
            "URL": "http:\/\/ithinkthatiknow.wordpress.com",
            "avatar_URL": "https:\/\/0.gravatar.com\/avatar\/6431a1cc4c9cba294fadb5628fa7e5d9?s=96&d=identicon&r=G",
            "profile_URL": "http:\/\/en.gravatar.com\/federica3101",
            "site_ID": 60527622,
            "default_avatar": false
        },
        {
            "ID": 58076001,
            "email": false,
            "name": "corsa1972",
            "nice_name": "corsa1972",
            "URL": "http:\/\/corsa1972.wordpress.com",
            "avatar_URL": "https:\/\/0.gravatar.com\/avatar\/cd84e5f609c929261012d57fe4a3a6c2?s=96&d=identicon&r=G",
            "profile_URL": "http:\/\/en.gravatar.com\/corsa1972",
            "site_ID": 60676021,
            "default_avatar": true
        },
        {
            "ID": 60373862,
            "email": false,
            "name": "eaglenebula06",
            "nice_name": "eaglenebula06",
            "URL": "http:\/\/thejammersheart.wordpress.com",
            "avatar_URL": "https:\/\/0.gravatar.com\/avatar\/0963c5d0c881d33438f1f071d514a5e8?s=96&d=identicon&r=G",
            "profile_URL": "http:\/\/en.gravatar.com\/eaglenebula06",
            "site_ID": 63099168,
            "default_avatar": false
        }
    ]
}