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": "2018-02-19T12:00:14-05:00",
        "after": "2018-02-19T12:00:14-05:00"
    },
    "number": 1,
    "posts": [
        {
            "ID": 256480,
            "site_ID": 489937,
            "author": {
                "ID": 47411601,
                "login": "benhuberman",
                "email": false,
                "name": "Ben Huberman",
                "first_name": "Ben",
                "last_name": "Huberman",
                "nice_name": "benhuberman",
                "URL": "https:\/\/benz.blog\/",
                "avatar_URL": "https:\/\/0.gravatar.com\/avatar\/663dcd498e8c5f255bfb230a7ba07678?s=96&d=identicon&r=G",
                "profile_URL": "https:\/\/en.gravatar.com\/benhuberman",
                "ip_address": false,
                "site_ID": 122910962,
                "site_visible": true
            },
            "date": "2018-02-19T12:00:14-05:00",
            "modified": "2018-02-16T21:21:46-05:00",
            "title": "Community Pool",
            "URL": "https:\/\/dailypost.wordpress.com\/2018\/02\/19\/community-pool-254\/",
            "short_URL": "https:\/\/wp.me\/p23sd-14IM",
            "content": "<p>Have you just published\u00a0a new post and are dying for some feedback? Are\u00a0you\u00a0redesigning\u00a0your blog and could use some layout or design advice from your more seasoned peers?<\/p>\n<blockquote class=\"align-left\"><p>The Community Pool is for peer feedback and advice. Looking for more specific information? Check out some of these resources:<\/p>\n<ul>\n<li><em><a href=\"https:\/\/learn.wordpress.com\/\">Learn<\/a><\/em>, a series of step-by-step tutorials for those just starting out.<\/li>\n<li>All our posts on <a href=\"https:\/\/dailypost.wordpress.com\/category\/traffic-growth\/\">building an audience and growing your traffic<\/a>.<\/li>\n<li>If you’re stuck for inspiration, <a href=\"https:\/\/dailypost.wordpress.com\/prompts\/\">here are our Daily Prompts<\/a> and other <a href=\"https:\/\/dailypost.wordpress.com\/category\/topic-ideas\/\">ideas for writing topics<\/a>.<\/li>\n<li>A roundup of <a href=\"https:\/\/dailypost.wordpress.com\/2015\/07\/08\/blogging-etiquette-roundup\/\">posts on blogging etiquette<\/a>.<\/li>\n<\/ul>\n<\/blockquote>\n<p>Tap into the wisdom of <em>The Daily Post<\/em> blogging community and leave your question here in the comments.\u00a0Others\u00a0can then click through and offer input either on your site, or in the comments here (feel free to indicate which you\u2019d prefer).<\/p>\n<blockquote><p>Looking for more information about custom domains, advanced design options, and other enhancements for your blog? <a href=\"https:\/\/wordpress.com\/plans?utm_source=editorial&amp;utm_medium=dailypost&amp;utm_campaign=community-pool-254&amp;utm_term=community-pool&amp;utm_content=post_body\">Find the WordPress.com plan that’s right for <em>you<\/em><\/a>.<\/p>\n<p>Are you a new blogger looking to share your very first post? We have a special forum for bloggers just like you in our <a href=\"https:\/\/dailypost.wordpress.com\/category\/first-friday\/\">weekly First Friday posts<\/a>.<\/p><\/blockquote>\n<p>To help us make the Community Pool\u00a0a productive space for discussion, here are some tips and guidelines you might find useful:<\/p>\n<ul>\n<li>While you’re not required to, we encourage everyone who requests feedback to also reply to at least one or two other bloggers who need some help. Spread\u00a0the love!<\/li>\n<li>The Community Pool comments section can get quite big — and\u00a0starting duplicate threads doesn’t help. Thanks for not posting the same question more than once, as well as for not starting numerous threads in a single Pool.<\/li>\n<li>If you’re looking for quality feedback, be as specific as you can. Questions about a particular post\u00a0tend to draw more comments than ones about entire blogs. Questions about\u00a0specific design elements are more likely to be answered than ones asking for general layout advice.<\/li>\n<li>We discourage leaving links without a more substantive message or question. These are often\u00a0overlooked by other bloggers, and we frequently remove them to make the comment reading experience smoother. Also note that including multiple links in your comment might automatically put it in the moderation queue, which will delay its publication.<\/li>\n<li>Please keep all comments civil and constructive. The idea is to have fun — it’s a\u00a0<em>pool<\/em>, after all!<\/li>\n<li>To keep from losing your place in the comment thread while you visit others\u2019 blogs, right-click on a link to open it in a new tab or window.<\/li>\n<li>If you haven\u2019t looked at our\u00a0<a href=\"http:\/\/dailypost.wordpress.com\/comment-guidelines-for-the-daily-post\/\" target=\"_blank\" rel=\"noopener\">Commenting Guidelines<\/a>\u00a0in a while, now might be a good time.<\/li>\n<li>No running on the deck.<\/li>\n<\/ul>\n<blockquote><p>Looking for free, self-guided courses to help you\u00a0get started with your blog (or revive a dormant one)? <a href=\"https:\/\/dailypost.wordpress.com\/blogging-university\/\">Check out our current offerings at Blogging U.<\/a><\/p><\/blockquote>\n",
            "excerpt": "<p>Where WordPress bloggers support each other with feedback and advice.<\/p>\n",
            "slug": "community-pool-254",
            "guid": "https:\/\/dailypost.wordpress.com\/?p=256480",
            "status": "publish",
            "sticky": false,
            "password": "",
            "parent": false,
            "type": "post",
            "comments_open": true,
            "pings_open": false,
            "likes_enabled": true,
            "sharing_enabled": true,
            "comment_count": 968,
            "like_count": 277,
            "i_like": false,
            "is_reblogged": false,
            "is_following": true,
            "global_ID": "ca4cd625a121e520b5b9ad1b5690d774",
            "featured_image": "https:\/\/dailypost.files.wordpress.com\/2016\/01\/swimming-924895_1920.jpg",
            "post_thumbnail": {
                "ID": 243284,
                "URL": "https:\/\/dailypost.files.wordpress.com\/2016\/01\/swimming-924895_1920.jpg",
                "guid": "http:\/\/dailypost.files.wordpress.com\/2016\/01\/swimming-924895_1920.jpg",
                "mime_type": "image\/jpeg",
                "width": 1920,
                "height": 1079
            },
            "format": "standard",
            "geo": false,
            "menu_order": 0,
            "publicize_URLs": [],
            "tags": {
                "bloggers": {
                    "ID": 4576,
                    "name": "bloggers",
                    "slug": "bloggers",
                    "description": "",
                    "post_count": 218,
                    "meta": {
                        "links": {
                            "self": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/489937\/tags\/slug:bloggers",
                            "help": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/489937\/tags\/slug:bloggers\/help",
                            "site": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/489937"
                        }
                    }
                },
                "blogging": {
                    "ID": 91,
                    "name": "blogging",
                    "slug": "blogging",
                    "description": "",
                    "post_count": 612,
                    "meta": {
                        "links": {
                            "self": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/489937\/tags\/slug:blogging",
                            "help": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/489937\/tags\/slug:blogging\/help",
                            "site": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/489937"
                        }
                    }
                },
                "critique": {
                    "ID": 1080,
                    "name": "critique",
                    "slug": "critique",
                    "description": "",
                    "post_count": 217,
                    "meta": {
                        "links": {
                            "self": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/489937\/tags\/slug:critique",
                            "help": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/489937\/tags\/slug:critique\/help",
                            "site": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/489937"
                        }
                    }
                },
                "feedback": {
                    "ID": 87,
                    "name": "feedback",
                    "slug": "feedback",
                    "description": "",
                    "post_count": 269,
                    "meta": {
                        "links": {
                            "self": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/489937\/tags\/slug:feedback",
                            "help": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/489937\/tags\/slug:feedback\/help",
                            "site": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/489937"
                        }
                    }
                }
            },
            "categories": {
                "Community Pool": {
                    "ID": 3034029,
                    "name": "Community Pool",
                    "slug": "community-pool",
                    "description": "",
                    "post_count": 261,
                    "parent": 0,
                    "meta": {
                        "links": {
                            "self": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/489937\/categories\/slug:community-pool",
                            "help": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/489937\/categories\/slug:community-pool\/help",
                            "site": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/489937"
                        }
                    }
                }
            },
            "attachments": {},
            "metadata": [
                {
                    "id": "1570362",
                    "key": "geo_public",
                    "value": "0"
                },
                {
                    "id": "1570358",
                    "key": "_thumbnail_id",
                    "value": "243284"
                },
                {
                    "id": "1570363",
                    "key": "_wpas_skip_6690922",
                    "value": "1"
                },
                {
                    "id": "1570364",
                    "key": "_wpas_skip_6690926",
                    "value": "1"
                }
            ],
            "meta": {
                "links": {
                    "self": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/489937\/posts\/256480",
                    "help": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/489937\/posts\/256480\/help",
                    "site": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/489937",
                    "replies": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/489937\/posts\/256480\/replies\/",
                    "likes": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/489937\/posts\/256480\/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": "ca4cd625a121e520b5b9ad1b5690d774",
            "is_external": false,
            "site_name": "The Daily Post",
            "site_URL": "https:\/\/dailypost.wordpress.com",
            "site_is_private": false,
            "featured_media": {},
            "feed_ID": 27030
        }
    ]
}