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": "2021-09-15T06:00:36+00:00",
        "after": "2021-08-31T15:08:43+00:00"
    },
    "number": 2,
    "posts": [
        {
            "ID": 29505,
            "site_ID": 82974409,
            "author": {},
            "date": "2021-09-15T06:00:36+00:00",
            "modified": "2021-09-15T06:00:37+00:00",
            "title": "This is a test post.",
            "URL": "https:\/\/apiexamples.wordpress.com\/?p=29505",
            "short_URL": "https:\/\/wp.me\/p5C9qV-7FT",
            "content": "<p>This is my post’s content.<\/p>\n",
            "excerpt": "<p>This is my post’s content.<\/p>\n",
            "slug": "this-is-a-test-post-5__trashed-62",
            "guid": "https:\/\/apiexamples.wordpress.com\/2021\/09\/15\/this-is-a-test-post-5",
            "status": "trash",
            "sticky": false,
            "password": "",
            "parent": false,
            "type": "post",
            "comments_open": true,
            "pings_open": true,
            "likes_enabled": true,
            "sharing_enabled": true,
            "comment_count": 0,
            "like_count": 0,
            "i_like": false,
            "is_reblogged": false,
            "is_following": true,
            "global_ID": "7c1ccdab14d9c2ada849244d583bc012",
            "featured_image": "",
            "post_thumbnail": null,
            "format": "standard",
            "geo": false,
            "menu_order": 0,
            "publicize_URLs": [],
            "tags": {},
            "categories": {
                "Uncategorized": {
                    "ID": 1,
                    "name": "Uncategorized",
                    "slug": "uncategorized",
                    "description": "",
                    "post_count": 7,
                    "feed_url": "https:\/\/apiexamples.wordpress.com\/category\/uncategorized\/feed\/",
                    "parent": 0,
                    "meta": {
                        "links": {
                            "self": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/82974409\/categories\/slug:uncategorized",
                            "help": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/82974409\/categories\/slug:uncategorized\/help",
                            "site": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/82974409"
                        }
                    }
                }
            },
            "attachments": {},
            "metadata": [
                {
                    "id": "95554",
                    "key": "jabber_published",
                    "value": "1631685637"
                },
                {
                    "id": "95562",
                    "key": "timeline_notification",
                    "value": "1631685638"
                }
            ],
            "meta": {
                "links": {
                    "self": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/82974409\/posts\/29505",
                    "help": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/82974409\/posts\/29505\/help",
                    "site": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/82974409",
                    "replies": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/82974409\/posts\/29505\/replies\/",
                    "likes": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/82974409\/posts\/29505\/likes\/"
                }
            },
            "current_user_can": {
                "publish_post": true,
                "delete_post": true,
                "edit_post": true
            },
            "capabilities": {
                "publish_post": true,
                "delete_post": true,
                "edit_post": true
            },
            "pseudo_ID": "7c1ccdab14d9c2ada849244d583bc012",
            "is_external": false,
            "site_name": "API Examples",
            "site_URL": "https:\/\/apiexamples.wordpress.com",
            "site_is_private": false,
            "featured_media": {},
            "feed_ID": 32981959
        },
        {
            "ID": 45042,
            "site_ID": 3584907,
            "author": {
                "ID": 124211340,
                "login": "sethmclellan",
                "email": false,
                "name": "Seth McLellan",
                "first_name": "Seth",
                "last_name": "McLellan",
                "nice_name": "sethmclellan",
                "URL": "",
                "avatar_URL": "https:\/\/1.gravatar.com\/avatar\/1deb4e7cd14e09ffa652c0279f159b33?s=96&d=retro",
                "profile_URL": "https:\/\/en.gravatar.com\/sethmclellan",
                "ip_address": false,
                "site_ID": 180042911,
                "site_visible": false
            },
            "date": "2021-08-31T15:08:43+00:00",
            "modified": "2021-08-31T15:08:47+00:00",
            "title": "Expanded Button Formatting, New Spacing Controls, and Drag-and-Drop for List View Now in Block Editor",
            "URL": "http:\/\/en.blog.wordpress.com\/2021\/08\/31\/block-editor-updates-7\/",
            "short_URL": "https:\/\/wp.me\/pf2B5-bIu",
            "content": "<div class=\"is-reader\">\n<p>This month, our team released features in the block editor that give your site a little breathing room: spacing controls for buttons and paragraphs. And the List View tool keeps getting better with drag-and-drop.<\/p>\n\n\n\n<h2>Powerful Expanded Button Formatting<\/h2>\n\n\n\n<p>Buttons never looked so good with custom padding.<\/p>\n\n\n\n<p>Padding is empty space within the border of a block, which can bring clarity to your content and adjust the balance of the page\u2019s layout.<\/p>\n\n\n\n<p>Custom control over a button\u2019s spacing, color, and aggressiveness of the corner radii \u2014 all within the visual editor \u2014 can elevate it as a powerful design element of your website.<\/p>\n\n\n\n<p>Make a punchy set of buttons themed in your brand\u2019s colors or place an effective Call to Action button to attract your visitors.<\/p>\n\n\n\n<p>To try, add a button with the <a href=\"https:\/\/wordpress.com\/support\/wordpress-editor\/blocks\/buttons-block\/\">Buttons block<\/a>, and in the block\u2019s menu go to the <strong>Dimensions<\/strong> section and select <strong>Padding<\/strong>. Adjust the padding uniformly around the button by changing the one value. If you click the unlink icon, you can adjust the four sides independently. Experiment with changing the <strong>Border<\/strong> and <strong>Color<\/strong> as well. To quickly create a grid of similar buttons, select the <strong>Options<\/strong> icon <strong>(\u2026) <\/strong>in the toolbar above the block in your post editor and select <strong>Duplicate<\/strong>.<\/p>\n\n\n\n<div class=\"wp-block-image\" style=\"margin: 0 0 1em;\"><figure class=\"aligncenter is-resized\" style=\"clear: both; margin: 0; display: table; margin-left: auto; margin-right: auto;\"><img src=\"https:\/\/lh3.googleusercontent.com\/AE5R3rUA_nY3oVfYtQqKSlEGRViRTG1h_jR3psUWJP5pkYMBUwx99ioTgbBC9Mi80hYOfy8Ty-J1HztbyVQ_AdJ7sH279SylgyZYWJqWiER5oESg85gq5jNvY9c1lVEAFSxAplJG=s0\" alt=\"\" width=\"462\" height=\"468\" style=\"max-width: 100%; border-radius: inherit;\"><\/figure><\/div>\n\n\n\n<h2>New Spacing Controls<\/h2>\n\n\n\n<p>Manually adjust the padding of other blocks as well, like a <a href=\"https:\/\/wordpress.com\/support\/wordpress-editor\/blocks\/paragraph-block\/\">Paragraph block<\/a>.<\/p>\n\n\n\n<p>Custom-indent an entire section of text or generously pad a small amount of text for a big effect.<\/p>\n\n\n\n<p>Experiment by wrapping a couple paragraphs with a <a href=\"https:\/\/wordpress.com\/support\/wordpress-editor\/blocks\/group-block\/\">Group block<\/a>. Select the Group block and in the block\u2019s menu go to the <strong>Dimensions<\/strong> section and select <strong>Padding<\/strong>. You can adjust the padding in this block just as you did with the button.<\/p>\n\n\n\n<div class=\"wp-block-image\" style=\"margin: 0 0 1em;\"><figure class=\"aligncenter\" style=\"clear: both; margin: 0; display: table; margin-left: auto; margin-right: auto;\"><img src=\"https:\/\/lh4.googleusercontent.com\/3QvWvWz1mVpXKC67NyonjDBULGJZ7rTkFlRTT7S7IVrQuqZbgQEGJUyHlE4Tyh4afM78-XQOgQ3uZoD9HmUdcC4gZUIJLzqreu7G77Yt1_GTxlVPL2GLgvxgiTTZnep7wR1jwGFR=s0\" alt=\"\" style=\"max-width: 100%; border-radius: inherit;\"><\/figure><\/div>\n\n\n\n<h2>Drag-and-Drop for Persistent List View<\/h2>\n\n\n\n<p>We mentioned updates to the List View in <a href=\"https:\/\/wordpress.com\/blog\/2021\/06\/18\/block-editor-updates-5\/\">June<\/a> and <a href=\"https:\/\/wordpress.com\/blog\/2021\/07\/27\/heading-font-weights-list-view-toggles-block-editor-wordpress-5-8\/\">July<\/a>.<\/p>\n\n\n\n<p>Accessible in the top-left menu of your post editor, the List View is the table of contents of all the blocks used in your post \u2014 select the diagonal hamburger icon to open this list. For deeply nested layouts, you can expand and collapse certain sections of this list, making navigation more efficient.<\/p>\n\n\n\n<p>Now, with drag-and-drop functionality, you can reposition blocks within your post. Drag-and-drop a block within the list to reposition it, but if you prefer to organize visually, you can also drag the block\u2019s label from the list into the post editor. List View is more powerful than ever to reorganize a post.<\/p>\n\n\n\n<div class=\"wp-block-image\" style=\"margin: 0 0 1em;\"><figure class=\"aligncenter\" style=\"clear: both; margin: 0; display: table; margin-left: auto; margin-right: auto;\"><img src=\"https:\/\/lh5.googleusercontent.com\/LnIIZGsSBxAU3glt4Zz8GCP1RnippWGC7V7TioGC_nC5SpQXPQV6JPnWMC7xhVZql6OxrN4kZUBvwiBQl09Aj2Y-ia-l_8c5iSCPgTNxGMdHfJ3EhcWH9EJ5jVr0BWVbfziEmXop=s0\" alt=\"\" style=\"max-width: 100%; border-radius: inherit;\"><\/figure><\/div>\n\n\n\n<h2>Keep Building, Keep Exploring<\/h2>\n\n\n\n<p>Your feedback is crucial to expanding the block editor\u2019s capabilities, so keep it coming. Watch here for more updates, and in the meantime, go forth and create!<\/p>\n <\/div>",
            "excerpt": "<p>This month, our team released features in the block editor that give your site a little breathing room: spacing controls for buttons and paragraphs. And the List View tool keeps getting better with drag-and-drop. Powerful Expanded Button Formatting Buttons never looked so good with custom padding. Padding is empty space within the border of a [&hellip;]<\/p>\n",
            "slug": "block-editor-updates-7",
            "guid": "https:\/\/en.blog.wordpress.com\/?p=45042",
            "status": "publish",
            "sticky": false,
            "password": "",
            "parent": false,
            "type": "post",
            "comments_open": false,
            "pings_open": false,
            "likes_enabled": true,
            "sharing_enabled": true,
            "comment_count": 5,
            "like_count": 993,
            "i_like": false,
            "is_reblogged": false,
            "is_following": true,
            "global_ID": "094ab452548be661e323fbc8592fd265",
            "featured_image": "https:\/\/en-blog.files.wordpress.com\/2021\/08\/pexels-photo-1227513.jpeg",
            "post_thumbnail": {
                "ID": 45046,
                "URL": "https:\/\/en-blog.files.wordpress.com\/2021\/08\/pexels-photo-1227513.jpeg",
                "guid": "http:\/\/en.blog.files.wordpress.com\/2021\/08\/pexels-photo-1227513.jpeg",
                "mime_type": "image\/jpeg",
                "width": 1880,
                "height": 1251
            },
            "format": "standard",
            "geo": false,
            "menu_order": 0,
            "publicize_URLs": [],
            "tags": {
                "Block editor": {
                    "ID": 30664913,
                    "name": "Block editor",
                    "slug": "block-editor",
                    "description": "",
                    "post_count": 22,
                    "feed_url": "http:\/\/en.blog.wordpress.com\/tag\/block-editor\/feed\/",
                    "meta": {
                        "links": {
                            "self": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/3584907\/tags\/slug:block-editor",
                            "help": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/3584907\/tags\/slug:block-editor\/help",
                            "site": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/3584907"
                        }
                    }
                }
            },
            "categories": {
                "Better Blogging": {
                    "ID": 172474,
                    "name": "Better Blogging",
                    "slug": "better-blogging",
                    "description": "",
                    "post_count": 113,
                    "feed_url": "http:\/\/en.blog.wordpress.com\/category\/better-blogging\/feed\/",
                    "parent": 0,
                    "meta": {
                        "links": {
                            "self": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/3584907\/categories\/slug:better-blogging",
                            "help": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/3584907\/categories\/slug:better-blogging\/help",
                            "site": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/3584907"
                        }
                    }
                },
                "blocks": {
                    "ID": 51936,
                    "name": "blocks",
                    "slug": "blocks",
                    "description": "",
                    "post_count": 15,
                    "feed_url": "http:\/\/en.blog.wordpress.com\/category\/blocks\/feed\/",
                    "parent": 0,
                    "meta": {
                        "links": {
                            "self": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/3584907\/categories\/slug:blocks",
                            "help": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/3584907\/categories\/slug:blocks\/help",
                            "site": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/3584907"
                        }
                    }
                },
                "Features": {
                    "ID": 9548,
                    "name": "Features",
                    "slug": "features",
                    "description": "",
                    "post_count": 208,
                    "feed_url": "http:\/\/en.blog.wordpress.com\/category\/features\/feed\/",
                    "parent": 0,
                    "meta": {
                        "links": {
                            "self": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/3584907\/categories\/slug:features",
                            "help": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/3584907\/categories\/slug:features\/help",
                            "site": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/3584907"
                        }
                    }
                },
                "New Features": {
                    "ID": 35872,
                    "name": "New Features",
                    "slug": "new-features",
                    "description": "",
                    "post_count": 187,
                    "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"
                        }
                    }
                },
                "WordPress": {
                    "ID": 33,
                    "name": "WordPress",
                    "slug": "wordpress",
                    "description": "",
                    "post_count": 79,
                    "feed_url": "http:\/\/en.blog.wordpress.com\/category\/wordpress\/feed\/",
                    "parent": 0,
                    "meta": {
                        "links": {
                            "self": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/3584907\/categories\/slug:wordpress",
                            "help": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/3584907\/categories\/slug:wordpress\/help",
                            "site": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/3584907"
                        }
                    }
                },
                "WordPress.com": {
                    "ID": 53,
                    "name": "WordPress.com",
                    "slug": "wordpress-com",
                    "description": "",
                    "post_count": 387,
                    "feed_url": "http:\/\/en.blog.wordpress.com\/category\/wordpress-com\/feed\/",
                    "parent": 0,
                    "meta": {
                        "links": {
                            "self": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/3584907\/categories\/slug:wordpress-com",
                            "help": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/3584907\/categories\/slug:wordpress-com\/help",
                            "site": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/3584907"
                        }
                    }
                }
            },
            "attachments": {
                "45046": {
                    "ID": 45046,
                    "URL": "https:\/\/en-blog.files.wordpress.com\/2021\/08\/pexels-photo-1227513.jpeg",
                    "guid": "http:\/\/en.blog.files.wordpress.com\/2021\/08\/pexels-photo-1227513.jpeg",
                    "mime_type": "image\/jpeg",
                    "width": 1880,
                    "height": 1251
                }
            },
            "metadata": [
                {
                    "id": "78737",
                    "key": "_thumbnail_id",
                    "value": "45046"
                },
                {
                    "id": "78745",
                    "key": "_wpas_done_24830964",
                    "value": "1"
                }
            ],
            "meta": {
                "links": {
                    "self": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/3584907\/posts\/45042",
                    "help": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/3584907\/posts\/45042\/help",
                    "site": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/3584907",
                    "replies": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/3584907\/posts\/45042\/replies\/",
                    "likes": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/3584907\/posts\/45042\/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": "094ab452548be661e323fbc8592fd265",
            "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\/2021\/08\/pexels-photo-1227513.jpeg",
                "width": 1880,
                "height": 1251,
                "type": "image"
            },
            "feed_ID": 25823
        }
    ]
}