GET /read/liked/

Get a list of posts from the blogs a user likes.

Resource Information

   
Method GET
URL https://public-api.wordpress.com/rest/v1.1/read/liked/
Requires authentication? Yes

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
fields (string) Optional. Returns specified fields only. Comma-separated list. Example: fields=ID,title
callback (string) An optional JSONP callback function.
number (int) The number of posts to return. Limit: 40. Default: 10.
page (int) Return the Nth 1-indexed page of posts.
order (string)
DESC:
(default) Return posts in descending order. For dates, that means newest to oldest.
ASC:
Return posts in ascending order. For dates, that means oldest to newest.
after (iso 8601 datetime) Return posts dated after the specified datetime.
before (iso 8601 datetime) Return posts dated before the specified datetime.

Response Parameters

Parameter Type Description
ID (int) The post ID.
site_ID (int) The site ID.
author (object) The author of the post.
date (iso 8601 datetime) The post's creation time.
modified (iso 8601 datetime) The post's most recent update time.
title (html) context dependent.
URL (url) The full permalink URL to the post.
short_URL (url) The wp.me short URL.
content (html) context dependent.
excerpt (html) context dependent.
slug (string) The name (slug) for the post, used in URLs.
guid (string) The GUID for the post.
status (string)
publish:
The post is published.
draft:
The post is saved as a draft.
pending:
The post is pending editorial approval.
private:
The post is published privately
future:
The post is scheduled for future publishing.
trash:
The post is in the trash.
auto-draft:
The post is a placeholder for a new post.
sticky (bool) Is the post sticky?
password (string) The plaintext password protecting the post, or, more likely, the empty string if the post is not password protected.
parent (object|false) A reference to the post's parent, if it has one.
type (string) The post's post_type. Post types besides post, page and revision need to be whitelisted using the rest_api_allowed_post_types filter.
comments_open (bool) Is the post open for comments?
pings_open (bool) Is the post open for pingbacks, trackbacks?
likes_enabled (bool) Is the post open to likes?
sharing_enabled (bool) Should sharing buttons show on this post?
comment_count (int) The number of comments for this post.
like_count (int) The number of likes for this post.
i_like (bool) Does the current user like this post?
is_reblogged (bool) Did the current user reblog this post?
is_following (bool) Is the current user following this blog?
global_ID (string) A unique WordPress.com-wide representation of a post.
featured_image (url) The URL to the featured image for this post if it has one.
post_thumbnail (object) The attachment object for the featured image if it has one.
format (string)
standard:
Standard
aside:
Aside
chat:
Chat
gallery:
Gallery
link:
Link
image:
Image
quote:
Quote
status:
Status
video:
Video
audio:
Audio
geo (object|false)
menu_order (int) (Pages Only) The order pages should appear in.
publicize_URLs (array) Array of Twitter and Facebook URLs published by this post.
tags (object) Hash of tags (keyed by tag name) applied to the post.
categories (object) Hash of categories (keyed by category name) applied to the post.
attachments (object) Hash of post attachments (keyed by attachment ID).
metadata (array) Array of post metadata keys and values. All unprotected meta keys are available by default for read requests. Both unprotected and protected meta keys are available for authenticated requests with access. Protected meta keys can be made available with the rest_api_allowed_public_metadata filter.
meta (object) API result meta data
current_user_can (object) List of permissions. Note, deprecated in favor of `capabilities`
capabilities (object) List of post-specific permissions for the user; publish_post, edit_post, delete_post
date_range (object) date range covered by current results.
number (int) The number of posts brought back by current query.
posts (array) An array of post objects.

Resource Errors

These are the possible errors returned by this endpoint.

HTTP Code Error Identifier Error Message
403 unauthorized User cannot view taxonomy
403 unauthorized User cannot view post
403 authorization_required An active access token must be used to query information about the current user.
403 unauthorized User cannot edit taxonomy
400 invalid_post Invalid post
400 invalid_context Invalid API CONTEXT
403 unauthorized User cannot edit post
404 unknown_post Unknown post

Example

curl \
 -H 'authorization: Bearer YOUR_API_TOKEN' \
 'https://public-api.wordpress.com/rest/v1/read/liked/?number=2'
<?php
$options  = array (
  'http' => 
  array (
    'ignore_errors' => true,
    'header' => 
    array (
      0 => 'authorization: Bearer YOUR_API_TOKEN',
    ),
  ),
);

$context  = stream_context_create( $options );
$response = file_get_contents(
	'https://public-api.wordpress.com/rest/v1/read/liked/?number=2',
	false,
	$context
);
$response = json_decode( $response );
?>

Response

{
    "date_range": {
        "before": "2015-04-18T18:21:21+00:00",
        "after": "2015-04-18T18:21:18+00:00"
    },
    "number": 2,
    "posts": [
        {
            "ID": 16343,
            "site_ID": 70135762,
            "author": {
                "ID": 567711,
                "login": "aegallag",
                "email": false,
                "name": "Aileen Gallagher",
                "first_name": "Aileen",
                "last_name": "Gallagher",
                "nice_name": "aegallag",
                "URL": "",
                "avatar_URL": "https:\/\/2.gravatar.com\/avatar\/8a5d51b6df67ceab1c8e372b3d538168?s=96&d=identicon&r=G",
                "profile_URL": "http:\/\/en.gravatar.com\/aegallag",
                "site_ID": 70135762
            },
            "date": "2015-04-17T13:00:45-04:00",
            "modified": "2015-04-17T12:56:42-04:00",
            "title": "Life After Football: Our College Pick",
            "URL": "http:\/\/blog.longreads.com\/2015\/04\/17\/life-after-football-our-college-pick\/",
            "short_URL": "http:\/\/wp.me\/p4KhvY-4fB",
            "content": "<p>Disappointment feels so much bigger when you\u2019re young because you haven\u2019t lived long enough to know that there\u2019s always something else on the other side. In his story about a former football prospect who seeks a new identity on a baseball field, Jesse Dougherty elicits emotion from a normally taciturn type – the young male athlete – and conveys those feelings without tripping over purple prose. <\/p>\n<h2><a href=\"http:\/\/dailyorange.com\/2015\/04\/tyler-marona-concussion-baseball-fills-void-after-retirement-from-syracuse-football-due-to-concussion\/?src=longreads\">Life After Football<\/a><\/h2>\n<h3><a href=\"https:\/\/twitter.com\/dougherty_jesse\">Jesse Dougherty<\/a> | <a href=\"http:\/\/dailyorange.com\">The Daily Orange<\/a> | April 5, 2015 | 1,647 words (7 minutes)<\/h3>\n",
            "excerpt": "<p>Disappointment feels so much bigger when you\u2019re young because you haven\u2019t lived long enough to know that there\u2019s always something else on the other side.<\/p>\n",
            "slug": "life-after-football-our-college-pick",
            "guid": "http:\/\/blog.longreads.com\/?p=16343",
            "status": "publish",
            "sticky": false,
            "password": "",
            "parent": false,
            "type": "post",
            "comments_open": false,
            "pings_open": true,
            "likes_enabled": true,
            "sharing_enabled": true,
            "comment_count": 0,
            "like_count": 43,
            "i_like": true,
            "is_reblogged": false,
            "is_following": true,
            "global_ID": "498ad7daa00b37c649a1081e9b0d5421",
            "featured_image": "https:\/\/longreadsblog.files.wordpress.com\/2015\/04\/collegereads-syracuse.jpg",
            "post_thumbnail": {
                "ID": 16358,
                "URL": "https:\/\/longreadsblog.files.wordpress.com\/2015\/04\/collegereads-syracuse.jpg",
                "guid": "http:\/\/longreadsblog.files.wordpress.com\/2015\/04\/collegereads-syracuse.jpg",
                "mime_type": "image\/jpeg",
                "width": 1200,
                "height": 650
            },
            "format": "standard",
            "geo": false,
            "menu_order": 0,
            "publicize_URLs": [],
            "tags": {
                "baseball": {
                    "ID": 1168,
                    "name": "baseball",
                    "slug": "baseball",
                    "description": "",
                    "post_count": 8,
                    "meta": {
                        "links": {
                            "self": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/70135762\/tags\/slug:baseball",
                            "help": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/70135762\/tags\/slug:baseball\/help",
                            "site": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/70135762"
                        }
                    }
                },
                "football": {
                    "ID": 1134,
                    "name": "football",
                    "slug": "football",
                    "description": "",
                    "post_count": 24,
                    "meta": {
                        "links": {
                            "self": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/70135762\/tags\/slug:football",
                            "help": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/70135762\/tags\/slug:football\/help",
                            "site": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/70135762"
                        }
                    }
                },
                "sports": {
                    "ID": 67,
                    "name": "sports",
                    "slug": "sports",
                    "description": "",
                    "post_count": 46,
                    "meta": {
                        "links": {
                            "self": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/70135762\/tags\/slug:sports",
                            "help": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/70135762\/tags\/slug:sports\/help",
                            "site": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/70135762"
                        }
                    }
                },
                "Syracuse": {
                    "ID": 171676,
                    "name": "Syracuse",
                    "slug": "syracuse",
                    "description": "",
                    "post_count": 2,
                    "meta": {
                        "links": {
                            "self": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/70135762\/tags\/slug:syracuse",
                            "help": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/70135762\/tags\/slug:syracuse\/help",
                            "site": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/70135762"
                        }
                    }
                }
            },
            "categories": {
                "College": {
                    "ID": 30830527,
                    "name": "College",
                    "slug": "college-2",
                    "description": "",
                    "post_count": 43,
                    "parent": 0,
                    "meta": {
                        "links": {
                            "self": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/70135762\/categories\/slug:college-2",
                            "help": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/70135762\/categories\/slug:college-2\/help",
                            "site": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/70135762"
                        }
                    }
                }
            },
            "attachments": {},
            "metadata": [
                {
                    "id": "121243",
                    "key": "geo_public",
                    "value": "0"
                },
                {
                    "id": "121261",
                    "key": "_thumbnail_id",
                    "value": "16358"
                },
                {
                    "id": "121271",
                    "key": "_wpas_done_8071423",
                    "value": "1"
                }
            ],
            "meta": {
                "links": {
                    "self": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/70135762\/posts\/16343",
                    "help": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/70135762\/posts\/16343\/help",
                    "site": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/70135762",
                    "replies": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/70135762\/posts\/16343\/replies\/",
                    "likes": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/70135762\/posts\/16343\/likes\/"
                }
            },
            "current_user_can": {
                "publish_post": false,
                "delete_post": false,
                "edit_post": false
            },
            "capabilities": {
                "publish_post": false,
                "delete_post": false,
                "edit_post": false
            },
            "pseudo_ID": "498ad7daa00b37c649a1081e9b0d5421",
            "is_external": false,
            "site_name": "Longreads Blog",
            "site_URL": "http:\/\/blog.longreads.com",
            "site_is_private": false,
            "featured_media": {},
            "date_liked": "2015-04-18T18:21:21+00:00"
        },
        {
            "ID": 16353,
            "site_ID": 70135762,
            "author": {
                "ID": 13787501,
                "login": "kristastevens",
                "email": false,
                "name": "Krista",
                "first_name": "Krista",
                "last_name": "Stevens",
                "nice_name": "kristastevens",
                "URL": "http:\/\/bewilderedcreatures.com",
                "avatar_URL": "https:\/\/1.gravatar.com\/avatar\/4f39e362b21c41df5cea83b50e4172fb?s=96&d=identicon&r=G",
                "profile_URL": "http:\/\/en.gravatar.com\/kristastevens",
                "site_ID": 33275932
            },
            "date": "2015-04-17T14:00:05-04:00",
            "modified": "2015-04-17T12:20:00-04:00",
            "title": "Loneliness and Isolation: Necessary Ingredients of Creativity?",
            "URL": "http:\/\/blog.longreads.com\/2015\/04\/17\/loneliness-and-isolation-necessary-ingredients-of-creativity\/",
            "short_URL": "http:\/\/wp.me\/p4KhvY-4fL",
            "content": "<blockquote><p>(Vincent) Van Gogh likely had a cadre of mental issues, none of which were suitably diagnosed while he was alive. Yet what seemed to weigh heaviest on him was the inevitability of his loneliness. According to his letters to Theo, he felt he had one of two options: content himself with loneliness or try to countenance his loneliness with friendships thereby derailing his creativity (\u201clead us from the road,\u201d as he wrote).<\/p>\n<p>Aldous Huxley wrote, \u201cIf one\u2019s different, one\u2019s bound to be lonely,\u201d and upon thinking about it even a little, it quickly becomes apparent that many of history\u2019s creative geniuses have been deeply lonely people. There is the obvious reason for this: dedicating oneself to an artistic pursuit means one has little time for social endeavors. This is what has frustrated flamboyant, gregarious writers like F. Scott Fitzgerald and Henry James, both of whom wrote about the dreadful isolation necessary to turn out great fiction. But whether it\u2019s the mysteriously secretive writing careers of J.D. Salinger or Donna Tartt, the well-known loneliness of Joseph Conrad (\u201cwe live as we dream\u200a\u2014\u200aalone\u201d) or the friendship-loneliness conundrum of van Gogh, it becomes apparent that something else is at play. Loneliness is not just sufficient for creativity; it is necessary. It is almost as if one can only be truly creative when one detaches from society.<\/p><\/blockquote>\n<p><a href=\"http:\/\/delistraty.com\/about\/\">Cody C. Delistraty<\/a> on how social rejection and isolation fuel metacognition and the creative process. <\/p>\n<p><a class=\"button-red\" href=\"http:\/\/delistraty.com\/2015\/04\/17\/is-social-rejection-the-key-to-creativity\/?src=longreads\" target=\"_blank\">Read the story<\/a><\/p>\n",
            "excerpt": "<p>(Vincent) Van Gogh likely had a cadre of mental issues, none of which were suitably diagnosed while he was alive. Yet what seemed to weigh heaviest on him was the inevitability of his loneliness. According to his letters to Theo, he felt he had one of two options: content himself with loneliness or try to [&hellip;]<\/p>\n",
            "slug": "loneliness-and-isolation-necessary-ingredients-of-creativity",
            "guid": "http:\/\/blog.longreads.com\/?p=16353",
            "status": "publish",
            "sticky": false,
            "password": "",
            "parent": false,
            "type": "post",
            "comments_open": false,
            "pings_open": true,
            "likes_enabled": true,
            "sharing_enabled": true,
            "comment_count": 0,
            "like_count": 226,
            "i_like": true,
            "is_reblogged": false,
            "is_following": true,
            "global_ID": "abbfc7a7cce7015cf16f38a4db4d43b7",
            "featured_image": "https:\/\/longreadsblog.files.wordpress.com\/2015\/04\/self-portrait-van-gogh-2.jpg",
            "post_thumbnail": {
                "ID": 16355,
                "URL": "https:\/\/longreadsblog.files.wordpress.com\/2015\/04\/self-portrait-van-gogh-2.jpg",
                "guid": "http:\/\/longreadsblog.files.wordpress.com\/2015\/04\/self-portrait-van-gogh-2.jpg",
                "mime_type": "image\/jpeg",
                "width": 718,
                "height": 708
            },
            "format": "standard",
            "geo": false,
            "menu_order": 0,
            "publicize_URLs": [],
            "tags": {
                "art": {
                    "ID": 177,
                    "name": "art",
                    "slug": "art",
                    "description": "",
                    "post_count": 26,
                    "meta": {
                        "links": {
                            "self": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/70135762\/tags\/slug:art",
                            "help": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/70135762\/tags\/slug:art\/help",
                            "site": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/70135762"
                        }
                    }
                },
                "creativity": {
                    "ID": 789,
                    "name": "creativity",
                    "slug": "creativity",
                    "description": "",
                    "post_count": 16,
                    "meta": {
                        "links": {
                            "self": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/70135762\/tags\/slug:creativity",
                            "help": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/70135762\/tags\/slug:creativity\/help",
                            "site": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/70135762"
                        }
                    }
                },
                "isolation": {
                    "ID": 55192,
                    "name": "isolation",
                    "slug": "isolation",
                    "description": "",
                    "post_count": 3,
                    "meta": {
                        "links": {
                            "self": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/70135762\/tags\/slug:isolation",
                            "help": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/70135762\/tags\/slug:isolation\/help",
                            "site": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/70135762"
                        }
                    }
                },
                "loneliness": {
                    "ID": 65178,
                    "name": "loneliness",
                    "slug": "loneliness",
                    "description": "",
                    "post_count": 3,
                    "meta": {
                        "links": {
                            "self": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/70135762\/tags\/slug:loneliness",
                            "help": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/70135762\/tags\/slug:loneliness\/help",
                            "site": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/70135762"
                        }
                    }
                },
                "Theo Van Gogh": {
                    "ID": 9134,
                    "name": "Theo Van Gogh",
                    "slug": "theo-van-gogh",
                    "description": "",
                    "post_count": 1,
                    "meta": {
                        "links": {
                            "self": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/70135762\/tags\/slug:theo-van-gogh",
                            "help": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/70135762\/tags\/slug:theo-van-gogh\/help",
                            "site": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/70135762"
                        }
                    }
                },
                "Vincent Van Gogh": {
                    "ID": 216155,
                    "name": "Vincent Van Gogh",
                    "slug": "vincent-van-gogh",
                    "description": "",
                    "post_count": 3,
                    "meta": {
                        "links": {
                            "self": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/70135762\/tags\/slug:vincent-van-gogh",
                            "help": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/70135762\/tags\/slug:vincent-van-gogh\/help",
                            "site": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/70135762"
                        }
                    }
                }
            },
            "categories": {
                "Nonfiction": {
                    "ID": 35009777,
                    "name": "Nonfiction",
                    "slug": "nonfiction-2",
                    "description": "",
                    "post_count": 1659,
                    "parent": 0,
                    "meta": {
                        "links": {
                            "self": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/70135762\/categories\/slug:nonfiction-2",
                            "help": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/70135762\/categories\/slug:nonfiction-2\/help",
                            "site": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/70135762"
                        }
                    }
                },
                "Quotes": {
                    "ID": 28016040,
                    "name": "Quotes",
                    "slug": "quotes-2",
                    "description": "",
                    "post_count": 1143,
                    "parent": 0,
                    "meta": {
                        "links": {
                            "self": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/70135762\/categories\/slug:quotes-2",
                            "help": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/70135762\/categories\/slug:quotes-2\/help",
                            "site": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/70135762"
                        }
                    }
                }
            },
            "attachments": {
                "16355": {
                    "ID": 16355,
                    "URL": "https:\/\/longreadsblog.files.wordpress.com\/2015\/04\/self-portrait-van-gogh-2.jpg",
                    "guid": "http:\/\/longreadsblog.files.wordpress.com\/2015\/04\/self-portrait-van-gogh-2.jpg",
                    "mime_type": "image\/jpeg",
                    "width": 718,
                    "height": 708
                }
            },
            "metadata": [
                {
                    "id": "121254",
                    "key": "geo_public",
                    "value": "0"
                },
                {
                    "id": "121258",
                    "key": "_thumbnail_id",
                    "value": "16355"
                },
                {
                    "id": "121280",
                    "key": "_wpas_done_8071423",
                    "value": "1"
                }
            ],
            "meta": {
                "links": {
                    "self": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/70135762\/posts\/16353",
                    "help": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/70135762\/posts\/16353\/help",
                    "site": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/70135762",
                    "replies": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/70135762\/posts\/16353\/replies\/",
                    "likes": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/70135762\/posts\/16353\/likes\/"
                }
            },
            "current_user_can": {
                "publish_post": false,
                "delete_post": false,
                "edit_post": false
            },
            "capabilities": {
                "publish_post": false,
                "delete_post": false,
                "edit_post": false
            },
            "pseudo_ID": "abbfc7a7cce7015cf16f38a4db4d43b7",
            "is_external": false,
            "site_name": "Longreads Blog",
            "site_URL": "http:\/\/blog.longreads.com",
            "site_is_private": false,
            "featured_media": {
                "uri": "https:\/\/longreadsblog.files.wordpress.com\/2015\/04\/self-portrait-van-gogh-2.jpg",
                "width": 718,
                "height": 708,
                "type": "image"
            },
            "date_liked": "2015-04-18T18:21:18+00:00"
        }
    ]
}