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": "2015-04-19T12:00:30-04:00",
        "after": "2015-04-19T12:00:30-04:00"
    },
    "number": 1,
    "posts": [
        {
            "ID": 16321,
            "site_ID": 70135762,
            "author": {
                "ID": 27151115,
                "login": "emilyperper",
                "email": false,
                "name": "Emily Perper",
                "nice_name": "emilyperper",
                "URL": "http:\/\/emilyperper.wordpress.com",
                "avatar_URL": "https:\/\/2.gravatar.com\/avatar\/50bd3faf41be155829d0abf3b8b02119?s=96&d=identicon&r=G",
                "profile_URL": "http:\/\/en.gravatar.com\/emilyperper",
                "site_ID": 27572189
            },
            "date": "2015-04-19T12:00:30-04:00",
            "modified": "2015-04-19T10:51:56-04:00",
            "title": "Rest in Peace: Stories About Death Care",
            "URL": "http:\/\/blog.longreads.com\/2015\/04\/19\/rest-in-peace-stories-about-death-care\/",
            "short_URL": "http:\/\/wp.me\/p4KhvY-4ff",
            "content": "<p><strong>I.<\/strong> I’ve been thinking: What would my life look like if I were not afraid of death? Thinking too closely about not existing, not having a consciousness, sends me spiraling into a panic attack. Protestant Christians believe in an afterlife\u2014a heaven, a hell. I did, too, for a while. I was confident, fervent, about heaven. I was no longer afraid to die. Now I’m not so sure. Nothingness scares me, but so does an eternity spent somewhere else.<\/p>\n<p>A month ago, I shared a <a href=\"http:\/\/blog.longreads.com\/2015\/03\/22\/blueprints-buildings-four-stories-about-architecture\/\">reading\u00a0list<\/a> about architecture. My <a href=\"http:\/\/www.thestranger.com\/features\/feature\/2015\/03\/03\/21792773\/the-architect-who-wants-to-redesign-being-dead?src=longreads\">pick<\/a> from <em>The Stranger<\/em> was about Katrina Spade, an \u00a0archeologist from Seattle interested in environmentally friendly, community-centered death care: city centers dedicated to composting human beings and reuniting their bodies with nature. It’s called the Urban Death Project. A\u00a0few days ago, Spade debuted her <a href=\"https:\/\/www.kickstarter.com\/projects\/546469190\/the-urban-death-project-laying-our-loved-ones-to-r\">fundraising campaign<\/a>\u00a0to make the project a reality.<\/p>\n<p>I studied artist Iris Gottlieb’s drawings of plants and fungi and Spade’s architectural plans. I liked the idea that the composting hubs would be unique to each city\u2014much like libraries, which take on aspects of their communities while serving the same essential purpose worldwide, Spade explained.\u00a0Reading the details of Spade’s proposal, I felt genuinely moved, and, for the first time in a decade, peaceful. <\/p>\n<p>&nbsp;<\/p>\n<p><strong>II.<\/strong> On Saturday night, my partner and I went to Congressional Cemetery in southeast Washington, D.C. to attend <a href=\"http:\/\/www.atlasobscura.com\">Atlas Obscura’s<\/a> “Sinners, Scoundrels\u00a0and Scandals,” a night of storytelling by docents and experts. We went on\u00a0a tour\u00a0of the cemetery’s most notorious residents: a co-conspirator in Lincoln’s assassination, the richest madam in D.C., a beloved con artist and many others.<\/p>\n<p>Much as I enjoyed these stories, what struck me most was the cemetery’s beauty. The last graveyard I’d visited was in Centralia, Pennsylvania, the abandoned coal town that inspired the horror media franchise\u00a0<em>Silent Hill.<\/em> Congressional Cemetery was the opposite of Centralia’s silence and cold\u2014it was green, lush with cherry blossoms to rival the famous trees a few miles away. Our docent, Tim, explained that cemeteries used to serve the same purpose as public parks\u2014neighbors picnicked, strolled and played. Congressional seeks to bring back that spirit\u2014it hosts yoga, book clubs, tours, 5Ks and a dog-walking program. The docents urged us to come back and visit, without a trace of irony. They seemed to have a great respect for Congressional Cemetery’s history and purpose, but no fear.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>III.<\/strong> Death is not easy. In spite of radical, green burial options and beautiful graveyards, it’s real and frustrating and tragic. <em>“Master Hayden Finn Boerum, 7-year-old son of Melissa J. Golden and Michael P. Boerum of Frederick, died Sunday.”<\/em> Hayden, his brother, and his mom, Melissa, are beloved in my community of theatre nerds. Hayden had been in the hospital for a long time by the time I met his family. His older brother, A., is kind and a little shy. His mom is strong and beautiful and quick to laugh.\u00a0<em>“Because of Hayden’s upbeat, positive and courageous attitude with his battle against Histiocytosis, Hayden’s Heroes, Inc., was created.”<\/em> I have a Hayden’s Heroes tank top in my drawer. <em>“He was known as ‘Nurse Hayden’ on the 4th floor of Children’s hospital. Although he was unable to eat and enjoy food, he found great pleasure in having his nurses print pictures of his favorite foods\u00a0\u2026\u00a0Hayden loved doing many things, and he greatly enjoyed playing with Legos and matchbox cars, trucks and trailers (anything with a hook), camping with his family and listening to his IPod\u00a0\u2026\u00a0Hayden will be greatly missed.”<\/em><\/p>\n<p>I lost it at the last sentence.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>IV.<\/strong> In the lists I prepare for Longreads, I try to push myself to read and write about things I don’t always understand, but want to learn more about. I don’t know a lot about typography or architecture. Sometimes I’m learning about a new, controversial law. This week: five stories about laying the dead to rest.<\/p>\n<h2>1. <a href=\"https:\/\/medium.com\/matter\/confessions-of-a-mortician-7a8c061bbda3?src=longreads\">“Confessions of a Mortician.”<\/a>\u00a0(Eric Puchner,\u00a0Matter, November 2014)<\/h2>\n<p>Eric Puchner has suffered from a profound fear of death since he was a young boy. He travels to rural Pennsylvania to meet a dapper, sixth-generation mortician\u00a0who might have a\u00a0cure.<\/p>\n<h2>2. <a href=\"http:\/\/www.oxfordamerican.org\/magazine\/item\/367-sky-burial-excarnation-in-texas?src=longreads\">“Sky Burial: Excarnation in Texas.”<\/a> (Alex Mar, Oxford American, September 2014)<\/h2>\n<p><em>“In the middle of a culture that is in denial of aging, never mind\u00a0death,\u00a0the body farm at San Marcos is one of the only places in America where death is literally splayed out in front of us, laid bare in a field, undeniable\u2014and it makes most people very uneasy.”<\/em><\/p>\n<h2>3. <a href=\"http:\/\/aeon.co\/magazine\/culture\/korean-thanksgiving-in-a-california-cemetery\/?src=longreads\">“Korean Thanksgiving in a California Cemetery.”<\/a> (Mary H K Choi, Aeon, November 2013)<\/h2>\n<p>Mary H K Choi didn’t plan to spend Sunday sprawled amongst the family plots, but her mom had other ideas.<\/p>\n<h2>4. <a href=\"http:\/\/narrative.ly\/how-we-die\/a-place-to-rest\/?src=longreads\">“A Place to Rest.”<\/a> (Shannon Firth, Narratively, September 2012)<\/h2>\n<p>A brochure about burial sparked Shannon Firth’s search for the perfect gravesite in New York City.<\/p>\n<h2>5. <a href=\"http:\/\/www.nytimes.com\/2015\/04\/14\/science\/a-project-to-turn-corpses-into-compost.html?src=longreads\">“A Project to Turn Corpses Into Compost.”<\/a> (Catrin Einhorn, New York Times, April 2015)<\/h2>\n<p>The\u00a0<em>Times\u00a0<\/em>covers Katrina Spade’s efforts to make death a collective, eco-friendly endeavor.<\/p>\n",
            "excerpt": "<p>I’ve been thinking: What would my life look like if I were not afraid of death? Thinking too closely about not existing, not having a consciousness, sends me spiraling into a panic attack. Protestant Christians believe in an afterlife\u2014a heaven, a hell. I did, too, for a while. I was confident, fervent, about heaven. I was no longer afraid to die. Now I’m not so sure. Nothingness scares me, but so does an eternity spent somewhere else.<\/p>\n",
            "slug": "rest-in-peace-stories-about-death-care",
            "guid": "http:\/\/blog.longreads.com\/?p=16321",
            "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": 29,
            "i_like": 0,
            "is_reblogged": 0,
            "is_following": 1,
            "global_ID": "6a6ebe821238d05f74735de3315dd58b",
            "featured_image": "https:\/\/longreadsblog.files.wordpress.com\/2015\/04\/755089257_9558d82a78_o.jpg",
            "post_thumbnail": {
                "ID": 16322,
                "URL": "https:\/\/longreadsblog.files.wordpress.com\/2015\/04\/755089257_9558d82a78_o.jpg",
                "guid": "http:\/\/longreadsblog.files.wordpress.com\/2015\/04\/755089257_9558d82a78_o.jpg",
                "mime_type": "image\/jpeg",
                "width": 1186,
                "height": 904
            },
            "format": "standard",
            "geo": false,
            "menu_order": 0,
            "publicize_URLs": [],
            "tags": {
                "Matter": {
                    "ID": 56965,
                    "name": "Matter",
                    "slug": "matter",
                    "description": "",
                    "post_count": 17,
                    "meta": {
                        "links": {
                            "self": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/70135762\/tags\/slug:matter",
                            "help": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/70135762\/tags\/slug:matter\/help",
                            "site": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/70135762"
                        }
                    }
                },
                "New York Times": {
                    "ID": 33609,
                    "name": "New York Times",
                    "slug": "new-york-times",
                    "description": "",
                    "post_count": 63,
                    "meta": {
                        "links": {
                            "self": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/70135762\/tags\/slug:new-york-times",
                            "help": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/70135762\/tags\/slug:new-york-times\/help",
                            "site": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/70135762"
                        }
                    }
                },
                "reading list": {
                    "ID": 907,
                    "name": "reading list",
                    "slug": "reading-list",
                    "description": "",
                    "post_count": 146,
                    "meta": {
                        "links": {
                            "self": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/70135762\/tags\/slug:reading-list",
                            "help": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/70135762\/tags\/slug:reading-list\/help",
                            "site": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/70135762"
                        }
                    }
                }
            },
            "categories": {
                "Nonfiction": {
                    "ID": 35009777,
                    "name": "Nonfiction",
                    "slug": "nonfiction-2",
                    "description": "",
                    "post_count": 951,
                    "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"
                        }
                    }
                },
                "Reading List": {
                    "ID": 7814148,
                    "name": "Reading List",
                    "slug": "reading-list-2",
                    "description": "",
                    "post_count": 201,
                    "parent": 0,
                    "meta": {
                        "links": {
                            "self": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/70135762\/categories\/slug:reading-list-2",
                            "help": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/70135762\/categories\/slug:reading-list-2\/help",
                            "site": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/70135762"
                        }
                    }
                }
            },
            "attachments": {
                "16322": {
                    "ID": 16322,
                    "URL": "https:\/\/longreadsblog.files.wordpress.com\/2015\/04\/755089257_9558d82a78_o.jpg",
                    "guid": "http:\/\/longreadsblog.files.wordpress.com\/2015\/04\/755089257_9558d82a78_o.jpg",
                    "mime_type": "image\/jpeg",
                    "width": 1186,
                    "height": 904
                }
            },
            "metadata": [
                {
                    "id": "121321",
                    "key": "geo_public",
                    "value": "0"
                },
                {
                    "id": "121319",
                    "key": "_thumbnail_id",
                    "value": "16322"
                },
                {
                    "id": "121328",
                    "key": "_wpas_done_8071423",
                    "value": "1"
                }
            ],
            "meta": {
                "links": {
                    "self": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/70135762\/posts\/16321",
                    "help": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/70135762\/posts\/16321\/help",
                    "site": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/70135762",
                    "replies": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/70135762\/posts\/16321\/replies\/",
                    "likes": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/70135762\/posts\/16321\/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": "6a6ebe821238d05f74735de3315dd58b",
            "is_external": false,
            "site_name": "Longreads Blog",
            "site_URL": "http:\/\/longreadsblog.wordpress.com",
            "site_is_private": false,
            "featured_media": {
                "uri": "https:\/\/longreadsblog.files.wordpress.com\/2015\/04\/755089257_9558d82a78_o.jpg",
                "width": 1186,
                "height": 904,
                "type": "image"
            },
            "feed_ID": 22973954
        }
    ]
}