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": "2019-12-10T21:22:15+00:00",
        "after": "2019-11-28T15:51:41+00:00"
    },
    "number": 2,
    "posts": [
        {
            "ID": 41732,
            "site_ID": 3584907,
            "author": {
                "ID": 9912994,
                "login": "danieldudzic",
                "email": false,
                "name": "Danny Dudzic",
                "first_name": "Daniel",
                "last_name": "Dudzic",
                "nice_name": "danieldudzic",
                "URL": "http:\/\/danieldudzic.com",
                "avatar_URL": "https:\/\/2.gravatar.com\/avatar\/bd761dfe050a42c631d3eff0f7295aec?s=96&d=retro",
                "profile_URL": "https:\/\/en.gravatar.com\/danieldudzic",
                "ip_address": false,
                "site_ID": 9624396,
                "site_visible": false
            },
            "date": "2019-12-10T21:22:15+00:00",
            "modified": "2019-12-10T21:22:15+00:00",
            "title": "New Theme: Twenty Twenty",
            "URL": "http:\/\/en.blog.wordpress.com\/2019\/12\/10\/twenty-twenty\/",
            "short_URL": "https:\/\/wp.me\/pf2B5-aR6",
            "content": "\n<p>We\u2019re pleased to announce that <em><a href=\"https:\/\/wordpress.com\/themes\/twentytwenty\">Twenty Twenty<\/a><\/em> \u2014 the new WordPress default theme designed by <a rel=\"noreferrer noopener\" href=\"https:\/\/profiles.wordpress.org\/anlino\/\" target=\"_blank\">Anders Nor\u00e9n<\/a>\u2014 is available to all WordPress.com sites.<\/p>\n\n\n\n<p><em>Twenty Twenty<\/em> was designed with the flexibility of the <a href=\"https:\/\/en.support.wordpress.com\/wordpress-editor\/\">new WordPress Editor<\/a> at its core. If you want to use it for an organization or a business, you can combine columns, groups, and media to create dynamic layouts that show off your services or products. If you want to use it for a traditional blog, the centered content column and considered typography makes it perfect for that as well.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img src=\"https:\/\/en-blog.files.wordpress.com\/2019\/12\/twenty-twenty-short-screenshot.png\" alt=\"\" \/><\/figure>\n\n\n\n<p>It also has been designed and developed to take maximum advantage of the creative freedom enabled by the block editor. Extra care has been given to the Columns and Group blocks, which can be combined into impressive landing pages with intricate blocks layouts. <em>Twenty Twenty<\/em> includes full editor styles for the block editor, so what you see in the editor will almost exactly match the end result. <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img src=\"https:\/\/en-blog.files.wordpress.com\/2019\/12\/image-2560.png?w=1024\" alt=\"\" \/><\/figure>\n\n\n\n<p>Learn more about WordPress\u2019s latest default theme&nbsp;<a href=\"https:\/\/wordpress.com\/theme\/twentytwenty\">here<\/a>, or check out the <a href=\"https:\/\/twentytwentydemo.wordpress.com\">demo site<\/a>!<\/p>\n",
            "excerpt": "<p>Meet <em>Twenty Twenty<\/em>, the brand new WordPress default theme.<\/p>\n",
            "slug": "twenty-twenty",
            "guid": "http:\/\/en.blog.wordpress.com\/?p=41732",
            "status": "publish",
            "sticky": false,
            "password": "",
            "parent": false,
            "type": "post",
            "comments_open": true,
            "pings_open": false,
            "likes_enabled": true,
            "sharing_enabled": true,
            "comment_count": 0,
            "like_count": 377,
            "i_like": false,
            "is_reblogged": false,
            "is_following": true,
            "global_ID": "23258bd816a5d9c8e7617f7ce35ed813",
            "featured_image": "https:\/\/en-blog.files.wordpress.com\/2019\/12\/twenty-twenty-screenshot-devices.png",
            "post_thumbnail": {
                "ID": 41733,
                "URL": "https:\/\/en-blog.files.wordpress.com\/2019\/12\/twenty-twenty-screenshot-devices.png",
                "guid": "http:\/\/en.blog.files.wordpress.com\/2019\/12\/twenty-twenty-screenshot-devices.png",
                "mime_type": "image\/png",
                "width": 2048,
                "height": 880
            },
            "format": "standard",
            "geo": false,
            "menu_order": 0,
            "publicize_URLs": [],
            "tags": {},
            "categories": {
                "Themes": {
                    "ID": 540,
                    "name": "Themes",
                    "slug": "themes",
                    "description": "",
                    "post_count": 423,
                    "feed_url": "http:\/\/en.blog.wordpress.com\/category\/themes\/feed\/",
                    "parent": 0,
                    "meta": {
                        "links": {
                            "self": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/3584907\/categories\/slug:themes",
                            "help": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/3584907\/categories\/slug:themes\/help",
                            "site": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/3584907"
                        }
                    }
                }
            },
            "attachments": {
                "41733": {
                    "ID": 41733,
                    "URL": "https:\/\/en-blog.files.wordpress.com\/2019\/12\/twenty-twenty-screenshot-devices.png",
                    "guid": "http:\/\/en.blog.files.wordpress.com\/2019\/12\/twenty-twenty-screenshot-devices.png",
                    "mime_type": "image\/png",
                    "width": 2048,
                    "height": 880
                }
            },
            "metadata": [
                {
                    "id": "71045",
                    "key": "_thumbnail_id",
                    "value": "41733"
                },
                {
                    "id": "71071",
                    "key": "_wpas_done_6699487",
                    "value": "1"
                }
            ],
            "meta": {
                "links": {
                    "self": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/3584907\/posts\/41732",
                    "help": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/3584907\/posts\/41732\/help",
                    "site": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/3584907",
                    "replies": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/3584907\/posts\/41732\/replies\/",
                    "likes": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/3584907\/posts\/41732\/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": "23258bd816a5d9c8e7617f7ce35ed813",
            "is_external": false,
            "site_name": "The WordPress.com Blog",
            "site_URL": "http:\/\/en.blog.wordpress.com",
            "site_is_private": false,
            "featured_media": {
                "uri": "https:\/\/en-blog.files.wordpress.com\/2019\/12\/twenty-twenty-screenshot-devices.png",
                "width": 2048,
                "height": 880,
                "type": "image"
            },
            "feed_ID": 25823
        },
        {
            "ID": 41715,
            "site_ID": 3584907,
            "author": {
                "ID": 29270036,
                "login": "aidvu",
                "email": false,
                "name": "Andrija Vucinic",
                "first_name": "Andrija",
                "last_name": "Vucinic",
                "nice_name": "aidvu",
                "URL": "http:\/\/andrija.me",
                "avatar_URL": "https:\/\/0.gravatar.com\/avatar\/3462bba9b26e49bf86eb1b819b23e423?s=96&d=retro",
                "profile_URL": "https:\/\/en.gravatar.com\/aidvu",
                "ip_address": false,
                "site_ID": 98106033,
                "site_visible": true
            },
            "date": "2019-11-28T15:51:41+00:00",
            "modified": "2019-11-28T15:51:41+00:00",
            "title": "PHP 7.4 Just Came Out, and So Did Our PHP Version Switcher",
            "URL": "http:\/\/en.blog.wordpress.com\/2019\/11\/28\/php-7-4-just-came-out-and-so-did-our-php-version-switcher\/",
            "short_URL": "https:\/\/wp.me\/pf2B5-aQP",
            "content": "\n<p>PHP is still one of the most popular languages used to build the web. The newest version, PHP 7.4, was released today \u2014 and Business and eCommerce plan customers can opt to start using it immediately.<\/p>\n\n\n\n<p>WordPress.com sites run PHP 7.3 by default \u2014 it\u2019s still our recommended version, since it\u2019s been stress-tested across all of WordPress.com \u2014 but if you have a site on the Business or eCommerce plan and want to be on the leading technological edge, you can opt to switch to version 7.4 immediately.<\/p>\n\n\n\n<p>Head to <strong>My Site &gt; Manage &gt; Hosting Configuration<\/strong> to find the new PHP Version Switcher:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-attachment-id=\"41726\" data-permalink=\"http:\/\/en.blog.wordpress.com\/php-version-switcher\/\" data-orig-file=\"https:\/\/en-blog.files.wordpress.com\/2019\/11\/php-version-switcher.gif\" data-orig-size=\"821,564\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"php-version-switcher\" data-image-description=\"\" data-medium-file=\"https:\/\/en-blog.files.wordpress.com\/2019\/11\/php-version-switcher.gif?w=300\" data-large-file=\"https:\/\/en-blog.files.wordpress.com\/2019\/11\/php-version-switcher.gif?w=821\" src=\"https:\/\/en-blog.files.wordpress.com\/2019\/11\/php-version-switcher.gif?w=821\" alt=\"\" class=\"wp-image-41726\" \/><\/figure>\n\n\n\n<p>Choose which version of PHP you want your site to run on, click the \u201cUpdate PHP version\u201d button, and voil\u00e0.<\/p>\n\n\n\n<p>(Note: All sites with eCommerce plans can make the switch right now. Sites on the Business plan need to have either an active plugin or a custom theme to use the PHP Version Switcher.)<\/p>\n\n\n\n<p>PHP\u2019s evolved with each version 7 release, and PHP 7.4 promises to have the strongest performance yet. It will eventually power all WordPress.com sites, but Business and eCommerce customers can take advantage of the update today!<\/p>\n",
            "excerpt": "<p>If your site is on the Business or eCommerce plan, you can switch to the newest version of PHP today.<\/p>\n",
            "slug": "php-7-4-just-came-out-and-so-did-our-php-version-switcher",
            "guid": "http:\/\/en.blog.wordpress.com\/?p=41715",
            "status": "publish",
            "sticky": false,
            "password": "",
            "parent": false,
            "type": "post",
            "comments_open": false,
            "pings_open": false,
            "likes_enabled": true,
            "sharing_enabled": true,
            "comment_count": 0,
            "like_count": 729,
            "i_like": false,
            "is_reblogged": false,
            "is_following": true,
            "global_ID": "ca03694ebbc64b7fb93335b0c86f316c",
            "featured_image": "https:\/\/en-blog.files.wordpress.com\/2019\/11\/wp-heart-php-1.png",
            "post_thumbnail": {
                "ID": 41723,
                "URL": "https:\/\/en-blog.files.wordpress.com\/2019\/11\/wp-heart-php-1.png",
                "guid": "http:\/\/en.blog.files.wordpress.com\/2019\/11\/wp-heart-php-1.png",
                "mime_type": "image\/png",
                "width": 2048,
                "height": 880
            },
            "format": "standard",
            "geo": false,
            "menu_order": 0,
            "publicize_URLs": [],
            "tags": {
                "PHP": {
                    "ID": 458,
                    "name": "PHP",
                    "slug": "php",
                    "description": "",
                    "post_count": 1,
                    "feed_url": "http:\/\/en.blog.wordpress.com\/tag\/php\/feed\/",
                    "meta": {
                        "links": {
                            "self": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/3584907\/tags\/slug:php",
                            "help": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/3584907\/tags\/slug:php\/help",
                            "site": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/3584907"
                        }
                    }
                },
                "settings": {
                    "ID": 273264,
                    "name": "settings",
                    "slug": "settings",
                    "description": "",
                    "post_count": 5,
                    "feed_url": "http:\/\/en.blog.wordpress.com\/tag\/settings\/feed\/",
                    "meta": {
                        "links": {
                            "self": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/3584907\/tags\/slug:settings",
                            "help": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/3584907\/tags\/slug:settings\/help",
                            "site": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/3584907"
                        }
                    }
                }
            },
            "categories": {
                "Customization": {
                    "ID": 1664,
                    "name": "Customization",
                    "slug": "customization",
                    "description": "",
                    "post_count": 109,
                    "feed_url": "http:\/\/en.blog.wordpress.com\/category\/customization\/feed\/",
                    "parent": 0,
                    "meta": {
                        "links": {
                            "self": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/3584907\/categories\/slug:customization",
                            "help": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/3584907\/categories\/slug:customization\/help",
                            "site": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/3584907"
                        }
                    }
                },
                "New Features": {
                    "ID": 35872,
                    "name": "New Features",
                    "slug": "new-features",
                    "description": "",
                    "post_count": 160,
                    "feed_url": "http:\/\/en.blog.wordpress.com\/category\/new-features\/feed\/",
                    "parent": 0,
                    "meta": {
                        "links": {
                            "self": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/3584907\/categories\/slug:new-features",
                            "help": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/3584907\/categories\/slug:new-features\/help",
                            "site": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/3584907"
                        }
                    }
                },
                "Technical": {
                    "ID": 624,
                    "name": "Technical",
                    "slug": "technical",
                    "description": "",
                    "post_count": 9,
                    "feed_url": "http:\/\/en.blog.wordpress.com\/category\/technical\/feed\/",
                    "parent": 0,
                    "meta": {
                        "links": {
                            "self": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/3584907\/categories\/slug:technical",
                            "help": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/3584907\/categories\/slug:technical\/help",
                            "site": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/3584907"
                        }
                    }
                }
            },
            "attachments": {
                "41723": {
                    "ID": 41723,
                    "URL": "https:\/\/en-blog.files.wordpress.com\/2019\/11\/wp-heart-php-1.png",
                    "guid": "http:\/\/en.blog.files.wordpress.com\/2019\/11\/wp-heart-php-1.png",
                    "mime_type": "image\/png",
                    "width": 2048,
                    "height": 880
                }
            },
            "metadata": [
                {
                    "id": "71012",
                    "key": "_thumbnail_id",
                    "value": "41723"
                },
                {
                    "id": "71026",
                    "key": "_wpas_done_6699487",
                    "value": "1"
                }
            ],
            "meta": {
                "links": {
                    "self": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/3584907\/posts\/41715",
                    "help": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/3584907\/posts\/41715\/help",
                    "site": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/3584907",
                    "replies": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/3584907\/posts\/41715\/replies\/",
                    "likes": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/3584907\/posts\/41715\/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": "ca03694ebbc64b7fb93335b0c86f316c",
            "is_external": false,
            "site_name": "The WordPress.com Blog",
            "site_URL": "http:\/\/en.blog.wordpress.com",
            "site_is_private": false,
            "featured_media": {
                "uri": "https:\/\/en-blog.files.wordpress.com\/2019\/11\/wp-heart-php-1.png",
                "width": 2048,
                "height": 880,
                "type": "image"
            },
            "feed_ID": 25823
        }
    ]
}