GET /read/following/

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

Resource URL

Type URL and Format
GET https://public-api.wordpress.com/rest/v1.1/read/following/

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.

Example

cURL

curl \
 -H 'authorization: Bearer YOUR_API_TOKEN' \
 'https://public-api.wordpress.com/rest/v1/read/following/?number=2&pretty=1'

PHP

<?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/following/?number=2&pretty=1',
  false,
  $context
);
$response = json_decode( $response );

?>

Response Body

	{
		"date_range": {
			"before": "2015-01-10T00:26:00+00:00",
			"after": "2015-01-05T23:48:16+00:00"
		},
		"number": 2,
		"posts": [
			{
				"ID": 596289387,
				"author": {
					"ID": 0,
					"email": "",
					"nice_name": "",
					"name": "WordPress.com News",
					"URL": "http://en.blog.wordpress.com/",
					"avatar_URL": "https://wordpress.com/wp-content/themes/h4/i/subs-rss.png",
					"profile_URL": ""
				},
				"date": "2015-01-08T17:00:57+00:00",
				"modified": "2015-01-08T17:00:57+00:00",
				"title": "New Themes: Boardwalk and Sela",
				"URL": "http://en.blog.wordpress.com/2015/01/08/boardwalk-sela/",
				"short_URL": "http://en.blog.wordpress.com/2015/01/08/boardwalk-sela/",
				"content": "<p>We&rsquo;re celebrating the New Year with two free themes:&nbsp;<em>Boardwalk</em> and <em>Sela</em>.</p>\n<h3><a href=\"http://wordpress.com/themes/boardwalk/\">Boardwalk</a></h3>\n<p><a href=\"http://boardwalkdemo.wordpress.com/\"><img class=\"alignnone size-full wp-image-29749\" src=\"https://en-blog.files.wordpress.com/2014/12/boardwalk-homepage.png?w=635&amp;h=380\" alt=\"Boardwalk: Homepage\" width=\"635\" height=\"380\"></a></p>\n<p>Designed by <a href=\"http://thomasguillot.com/\" target=\"_blank\">yours truly</a>, <em>Boardwalk</em> is a clean, simple, and responsive theme.</p>\n<p><img class=\"alignnone size-full wp-image-29764\" src=\"https://en-blog.files.wordpress.com/2014/12/boardwalk-responsive-design-mockup.png?w=635&amp;h=252\" alt=\"Boardwalk: Responsive Design\" width=\"635\" height=\"252\"></p>\n<p>Powered with horizontal scrolling and built around large featured images, <em>Boardwalk</em>&nbsp;is the perfect choice for photobloggers and those of you looking for an unconventional &mdash; yet elegant and creative &mdash; theme.</p>\n<p>Learn more about&nbsp;<em>Boardwalk</em> at the <a title=\"Boardwalk Theme Showcase\" href=\"http://wordpress.com/themes/boardwalk/\">Theme Showcase</a>, or preview it by going to <em>Appearance &rarr; Themes</em>.</p>\n<h3><a href=\"http://wordpress.com/themes/sela/\">Sela</a></h3>\n<p><a href=\"http://selademo.wordpress.com/\"><img class=\"alignnone size-full wp-image-29835\" src=\"https://en-blog.files.wordpress.com/2014/12/sela-theme-featured-image.jpg?w=635&amp;h=476\" alt=\"Sela\" width=\"635\" height=\"476\"></a><br><em>Sela</em> isn&rsquo;t your typical business theme. It&rsquo;s a vibrant, bold, clean theme with lots of space for large images, designed by WordPress.com&rsquo;s own <a href=\"http://soakingupthelight.wordpress.com/\">Ola Laczek</a>.</p>\n<p><i>Sela</i> puts the focus on your business with a bold front page template, a grid page template to showcase your products or services, and integrated testimonials.&nbsp;To make your website truly unique, you can upload a logo, customize the background, and choose a color scheme from default color palettes.&nbsp;<em>Sela</em> is the perfect canvas to tell your company&rsquo;s story and looks great on all devices, from desktop to mobile.</p>\n<p>Take <i>Sela</i> for a spin &ndash;&nbsp;visit the <a title=\"Sela Theme Showcase\" href=\"http://theme.wordpress.com/themes/sela/\">Theme Showcase</a> to learn more, or activate it on your site by going to <i>Appearance &rarr; Themes</i>.</p><br>Filed under: <a href=\"http://en.blog.wordpress.com/category/themes/\">Themes</a>  <a rel=\"nofollow\" href=\"http://feeds.wordpress.com/1.0/gocomments/en.blog.wordpress.com/29747/\"><img alt=\"\" border=\"0\" src=\"http://feeds.wordpress.com/1.0/comments/en.blog.wordpress.com/29747/\"></a> <img alt=\"\" border=\"0\" src=\"http://pixel.wp.com/b.gif?host=en.blog.wordpress.com&amp;blog=3584907&amp;post=29747&amp;subd=en.blog&amp;ref=&amp;feed=1\" width=\"1\" height=\"1\">",
				"excerpt": "We&rsquo;re celebrating the New Year with two free themes:&nbsp;Boardwalk and Sela. Boardwalk Designed by yours truly, Boardwalk is a clean, simple, and responsive theme. Powered with horizontal scrolling and built around large featured images, Boardwalk&nbsp;is the perfect choice for photobloggers and those of you looking for an unconventional &mdash; yet elegant and creative &mdash; theme.&hellip;",
				"slug": "",
				"status": "",
				"password": "",
				"parent": false,
				"type": "",
				"comments_open": false,
				"pings_open": false,
				"comment_count": 0,
				"like_count": 0,
				"i_like": 0,
				"is_reblogged": 0,
				"is_following": 156863405,
				"featured_image": "",
				"format": "standard",
				"geo": false,
				"publicize_URLs": {},
				"tags": {},
				"categories": {},
				"attachments": {},
				"metadata": false,
				"meta": false,
				"pseudo_ID": "7f5a320934436d8f5deed7c97e4e0364",
				"global_ID": "7f5a320934436d8f5deed7c97e4e0364",
				"is_external": true,
				"site_ID": "20442217",
				"site_name": "WordPress.com News",
				"site_URL": "http://en.blog.wordpress.com/",
				"site_is_private": false,
				"featured_media": {
					"uri": "https://en-blog.files.wordpress.com/2014/12/boardwalk-homepage.png",
					"width": 0,
					"height": 0,
					"type": "image"
				}
			},
			{
				"ID": 594178298,
				"author": {
					"ID": 0,
					"email": "",
					"nice_name": "",
					"name": "Matt Mullenweg",
					"URL": "http://ma.tt/",
					"avatar_URL": "https://wordpress.com/wp-content/themes/h4/i/subs-rss.png",
					"profile_URL": ""
				},
				"date": "2015-01-07T18:53:00+00:00",
				"modified": "2015-01-07T18:53:00+00:00",
				"title": "WP.com Year in Review",
				"URL": "http://ma.tt/2015/01/wp-com-year-in-review/",
				"short_URL": "http://ma.tt/2015/01/wp-com-year-in-review/",
				"content": "<p>There&rsquo;s a <a href=\"https://en.blog.wordpress.com/2015/01/06/2014-in-review/\">great write-up of the human side of WordPress.com&rsquo;s 2014 as well as some impressive numbers</a>.</p>",
				"excerpt": "There&rsquo;s a great write-up of the human side of WordPress.com&rsquo;s 2014 as well as some impressive numbers.",
				"slug": "",
				"status": "",
				"password": "",
				"parent": false,
				"type": "",
				"comments_open": false,
				"pings_open": false,
				"comment_count": 0,
				"like_count": 0,
				"i_like": 0,
				"is_reblogged": 0,
				"is_following": 198930799,
				"featured_image": "",
				"format": "standard",
				"geo": false,
				"publicize_URLs": {},
				"tags": {},
				"categories": {},
				"attachments": {},
				"metadata": false,
				"meta": false,
				"pseudo_ID": "4439f35352647626f2e94e086d698511",
				"global_ID": "4439f35352647626f2e94e086d698511",
				"is_external": true,
				"site_ID": "18",
				"site_name": "Matt Mullenweg",
				"site_URL": "http://ma.tt/",
				"site_is_private": false,
				"featured_media": {}
			}
		]
	}