GET /read/following/

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

Resource Information

   
Method GET
URL https://public-api.wordpress.com/rest/v1.1/read/following/
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/following/?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/following/?number=2',
	false,
	$context
);
$response = json_decode( $response );
?>

Response

{
    "date_range": {
        "before": "2016-09-23T14:55:26-04:00",
        "after": "2016-09-23T14:55:26-04:00"
    },
    "number": 1,
    "posts": [
        {
            "ID": 39850,
            "site_ID": 70135762,
            "author": {
                "ID": 68029756,
                "login": "longreadseditors",
                "email": false,
                "name": "Longreads",
                "first_name": "Longreads",
                "last_name": "",
                "nice_name": "longreadseditors",
                "URL": "",
                "avatar_URL": "https:\/\/1.gravatar.com\/avatar\/77c994c441138efdb7338403caac1014?s=96&d=identicon&r=G",
                "profile_URL": "http:\/\/en.gravatar.com\/longreadseditors",
                "site_ID": 70135762
            },
            "date": "2016-09-23T14:55:26-04:00",
            "modified": "2016-09-23T16:05:25-04:00",
            "title": "The Top 5 Longreads of the Week",
            "URL": "http:\/\/blog.longreads.com\/2016\/09\/23\/the-top-5-longreads-of-the-week-137\/",
            "short_URL": "http:\/\/wp.me\/p4KhvY-amK",
            "content": "<p><em>Below, our favorite stories of the week.<\/em><\/p>\n<p><em><a href=\"http:\/\/longreads.us2.list-manage2.com\/subscribe?u=1854296747731744c923a33ef&amp;id=bd2ad42066\">Sign up to receive this list free every Friday in your inbox.<\/a><\/em><\/p>\n<p style=\"text-align:center;\">* * *<\/p>\n<h2 class=\"top5-title\"><a href=\"http:\/\/www.newyorker.com\/magazine\/2016\/09\/12\/familienaufstellung-germanys-group-therapy?src=longreads\" target=\"_blank\">1. Ghost Stories<\/a><\/h2>\n<p class=\"top5-credit\"><em>Burkhard Bilger | The New Yorker | Sept. 12, 2016 | 34 minutes (8,647 words)<\/em><\/p>\n<p style=\"text-align:left;\">Over half a century after WWII, a generation of Germans still struggles to come to terms with their ancestors’ atrocities. They are kriegskinder, the children of war. Guilt and spirits haunt them.<\/p>\n<h2 class=\"top5-title\"><a href=\"http:\/\/www.texasmonthly.com\/the-culture\/how-chip-and-joanna-gaines-renovated-waco\/?src=longreads\" target=\"_blank\">2. Are You Ready to Meet Your Fixer Uppers?<\/a><\/h2>\n<p class=\"top5-credit\"><em>Taffy Brodesser-Akner | Texas Monthly | Sept. 21, 2016 | 36 minutes (9,143 words)<\/em><\/p>\n<p>Home renovation shows package the American dream from anxiety-riddled nightmare to easily-digestible entertainment. In this profile of Chip and Joanna Gaines, the stars of HGTV\u2019s “Fixer Upper,” Taffy Brodesser-Akner goes long on how the couple works together and how they\u2019ve managed to rebrand Waco, Texas as a place not of tragedy, but of shiplap and dreams.<\/p>\n<h2 class=\"top5-title\"><a href=\"http:\/\/www.washingtonpost.com\/sf\/national\/2016\/09\/22\/from-hiroko-to-susie-the-untold-stories-of-japanese-war-brides\/?src=longreads\" target=\"_blank\">3. The Untold Story of Japanese War Brides<\/a><\/h2>\n<p class=\"top5-credit\"><em>Kathryn Tolbert | Washington Post | Sept. 22, 2016 | 19\u00a0minutes (4,842\u00a0words) <\/em><\/p>\n<p>“They either tried, or were pressured, to give up their Japanese identities to become more fully American. A first step was often adopting the American nicknames given them when their Japanese names were deemed too hard to pronounce or remember. Chikako became Peggy; Kiyoko became Barbara. Not too much thought went into those choices, names sometimes imposed in an instant by a U.S. officer organizing his pool of typists. My mother, Hiroko Furukawa, became Susie.”<\/p>\n<h2 class=\"top5-title\"><a href=\"http:\/\/www.esquire.com\/news-politics\/a48768\/andrea-tantaros-roger-ailes-fox-news\/?src=longreads\" target=\"_blank\">4. Why She’s Suing Fox News<\/a><\/h2>\n<p class=\"top5-credit\"><em>Danielle Bacher | Esquire | Sept. 21, 2016 | 16\u00a0minutes (4,228\u00a0words) <\/em><\/p>\n<p>Conservative commentator Andrea Tantaros, a former co-host of “The Five” and “Outnumbered” on Fox News, speaks out about the experiences that prompted her sexual harassment suit against the organization and its former CEO, Roger Ailes.<\/p>\n<h2 class=\"top5-title\"><a href=\"http:\/\/nymag.com\/selectall\/2016\/09\/andrew-sullivan-technology-almost-killed-me.html\" target=\"_blank\">5. I Used to Be a Human Being<\/a><\/h2>\n<p class=\"top5-credit\"><em>Andrew Sullivan | New York Magazine\u00a0|\u00a0Sept. 18, 2016 | 21\u00a0minutes (7,077\u00a0words)<\/em><\/p>\n<p>Retired Daily Dish blogger Andrew Sullivan\u2019s meditation on the epidemic of digital distraction addiction\u2014and his attempt to cure himself of it at a 10-day silent meditation retreat he attended after famously ending his 15-year blogging career.<\/p>\n",
            "excerpt": "<p>Our top stories of the week.<\/p>\n",
            "slug": "the-top-5-longreads-of-the-week-137",
            "guid": "http:\/\/blog.longreads.com\/?p=39850",
            "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": 83,
            "i_like": false,
            "is_reblogged": false,
            "is_following": true,
            "global_ID": "93ea45553b655cc882984601af94c59e",
            "featured_image": "https:\/\/longreadsblog.files.wordpress.com\/2016\/09\/screen-shot-2016-09-23-at-12-57-09-pm.png",
            "post_thumbnail": {
                "ID": 39854,
                "URL": "https:\/\/longreadsblog.files.wordpress.com\/2016\/09\/screen-shot-2016-09-23-at-12-57-09-pm.png",
                "guid": "http:\/\/longreadsblog.files.wordpress.com\/2016\/09\/screen-shot-2016-09-23-at-12-57-09-pm.png",
                "mime_type": "image\/png",
                "width": 1039,
                "height": 725
            },
            "format": "standard",
            "geo": false,
            "menu_order": 0,
            "publicize_URLs": [],
            "tags": {
                "longreads": {
                    "ID": 35328892,
                    "name": "longreads",
                    "slug": "longreads",
                    "description": "",
                    "post_count": 2356,
                    "meta": {
                        "links": {
                            "self": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/70135762\/tags\/slug:longreads",
                            "help": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/70135762\/tags\/slug:longreads\/help",
                            "site": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/70135762"
                        }
                    }
                },
                "top 5": {
                    "ID": 46772,
                    "name": "top 5",
                    "slug": "top-5",
                    "description": "",
                    "post_count": 125,
                    "meta": {
                        "links": {
                            "self": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/70135762\/tags\/slug:top-5",
                            "help": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/70135762\/tags\/slug:top-5\/help",
                            "site": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/70135762"
                        }
                    }
                }
            },
            "categories": {
                "Nonfiction": {
                    "ID": 35009777,
                    "name": "Nonfiction",
                    "slug": "nonfiction-2",
                    "description": "",
                    "post_count": 1766,
                    "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"
                        }
                    }
                },
                "Top 5": {
                    "ID": 35211383,
                    "name": "Top 5",
                    "slug": "top-5-2",
                    "description": "",
                    "post_count": 141,
                    "parent": 0,
                    "meta": {
                        "links": {
                            "self": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/70135762\/categories\/slug:top-5-2",
                            "help": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/70135762\/categories\/slug:top-5-2\/help",
                            "site": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/70135762"
                        }
                    }
                }
            },
            "attachments": {
                "39854": {
                    "ID": 39854,
                    "URL": "https:\/\/longreadsblog.files.wordpress.com\/2016\/09\/screen-shot-2016-09-23-at-12-57-09-pm.png",
                    "guid": "http:\/\/longreadsblog.files.wordpress.com\/2016\/09\/screen-shot-2016-09-23-at-12-57-09-pm.png",
                    "mime_type": "image\/png",
                    "width": 1039,
                    "height": 725
                }
            },
            "metadata": [
                {
                    "id": "143029",
                    "key": "geo_public",
                    "value": "0"
                },
                {
                    "id": "143035",
                    "key": "_thumbnail_id",
                    "value": "39854"
                },
                {
                    "id": "143042",
                    "key": "_wpas_skip_15527295",
                    "value": "1"
                },
                {
                    "id": "143040",
                    "key": "_wpas_skip_15527303",
                    "value": "1"
                },
                {
                    "id": "143041",
                    "key": "_wpas_skip_8071423",
                    "value": "1"
                }
            ],
            "meta": {
                "links": {
                    "self": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/70135762\/posts\/39850",
                    "help": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/70135762\/posts\/39850\/help",
                    "site": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/70135762",
                    "replies": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/70135762\/posts\/39850\/replies\/",
                    "likes": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/70135762\/posts\/39850\/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": "93ea45553b655cc882984601af94c59e",
            "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\/2016\/09\/screen-shot-2016-09-23-at-12-57-09-pm.png",
                "width": 1039,
                "height": 725,
                "type": "image"
            },
            "feed_ID": 22973954
        }
    ]
}