GET /batch/

Run several GET endpoints and return them as an array.

Resource Information

Method GET
Requires authentication? No

Query Parameters

Parameter Type Description
http_envelope (bool)
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)
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.
urls (array) Array of endpoints to call

Resource Errors

These are the possible errors returned by this endpoint.

HTTP Code Error Identifier Error Message
400 invalid_input Invalid request input


curl '\[\]=/sites/4/&urls\[\]=/sites/4/posts?number=1'
$options  = array (
  'http' => 
  array (
    'ignore_errors' => true,

$context  = stream_context_create( $options );
$response = file_get_contents(
$response = json_decode( $response );


    "\/sites\/4\/": {
        "ID": 4,
        "name": "Matt on Not-WordPress, mostly photos",
        "description": "Stuff and things.",
        "URL": "http:\/\/",
        "jetpack": false,
        "subscribers_count": 236786,
        "lang": false,
        "icon": {
            "img": "https:\/\/\/blavatar\/1dda380e30f5105e49d00ff16adc24a4",
            "ico": "https:\/\/\/blavatar\/1dda380e30f5105e49d00ff16adc24a4"
        "logo": {
            "id": 0,
            "sizes": [],
            "url": ""
        "visible": null,
        "is_private": false,
        "is_coming_soon": false,
        "is_following": false,
        "meta": {
            "links": {
                "self": "https:\/\/\/rest\/v1\/sites\/4",
                "help": "https:\/\/\/rest\/v1\/sites\/4\/help",
                "posts": "https:\/\/\/rest\/v1\/sites\/4\/posts\/",
                "comments": "https:\/\/\/rest\/v1\/sites\/4\/comments\/",
                "xmlrpc": "https:\/\/\/xmlrpc.php"
        "launch_status": false,
        "site_migration": null,
        "is_fse_active": false,
        "is_fse_eligible": false
    "\/sites\/4\/posts?number=1": {
        "found": 2370,
        "posts": [
                "ID": 8225,
                "site_ID": 4,
                "author": {
                    "ID": 5,
                    "login": "matt",
                    "email": false,
                    "name": "Matt",
                    "first_name": "Matt",
                    "last_name": "Mullenweg",
                    "nice_name": "matt",
                    "URL": "https:\/\/\/",
                    "avatar_URL": "https:\/\/\/avatar\/767fc9c115a1b989744c755db47feb60?s=96&d=retro&r=G",
                    "profile_URL": "https:\/\/\/matt",
                    "ip_address": false,
                    "site_ID": 4,
                    "site_visible": true
                "date": "2020-02-14T18:23:39+00:00",
                "modified": "2020-02-14T18:23:39+00:00",
                "title": "Beach Spirals",
                "URL": "http:\/\/\/2020\/02\/14\/beach-spirals\/",
                "short_URL": "https:\/\/\/p4-28F",
                "content": "<p><img src=\"https:\/\/\/2020\/02\/image_b158052f-4594-4934-9ed6-f339938f27e4.img_7512.jpg?w=4032&h=4032\" class=\"size-full\" width=\"4032\" height=\"4032\"\/><\/p>\n",
                "excerpt": "",
                "slug": "beach-spirals",
                "guid": "http:\/\/\/2020\/02\/14\/beach-spirals\/",
                "status": "publish",
                "sticky": false,
                "password": "",
                "parent": false,
                "type": "post",
                "comments_open": true,
                "pings_open": true,
                "likes_enabled": true,
                "sharing_enabled": true,
                "comment_count": 3,
                "like_count": 69,
                "i_like": false,
                "is_reblogged": false,
                "is_following": false,
                "global_ID": "1bc55313e5421dcdff8115109003c56d",
                "featured_image": "",
                "post_thumbnail": null,
                "format": "standard",
                "geo": false,
                "menu_order": 0,
                "publicize_URLs": [],
                "tags": {
                    "beach": {
                        "ID": 24594,
                        "name": "beach",
                        "slug": "beach",
                        "description": "",
                        "post_count": 1,
                        "feed_url": "http:\/\/\/tag\/beach\/feed\/",
                        "meta": {
                            "links": {
                                "self": "https:\/\/\/rest\/v1\/sites\/4\/tags\/slug:beach",
                                "help": "https:\/\/\/rest\/v1\/sites\/4\/tags\/slug:beach\/help",
                                "site": "https:\/\/\/rest\/v1\/sites\/4"
                "categories": {
                    "Moblog": {
                        "ID": 26114,
                        "name": "Moblog",
                        "slug": "moblog",
                        "description": "",
                        "post_count": 2317,
                        "feed_url": "http:\/\/\/category\/moblog\/feed\/",
                        "parent": 0,
                        "meta": {
                            "links": {
                                "self": "https:\/\/\/rest\/v1\/sites\/4\/categories\/slug:moblog",
                                "help": "https:\/\/\/rest\/v1\/sites\/4\/categories\/slug:moblog\/help",
                                "site": "https:\/\/\/rest\/v1\/sites\/4"
                "attachments": {},
                "metadata": [
                        "id": "72451",
                        "key": "_wpas_done_592",
                        "value": "1"
                "meta": {
                    "links": {
                        "self": "https:\/\/\/rest\/v1\/sites\/4\/posts\/8225",
                        "help": "https:\/\/\/rest\/v1\/sites\/4\/posts\/8225\/help",
                        "site": "https:\/\/\/rest\/v1\/sites\/4",
                        "replies": "https:\/\/\/rest\/v1\/sites\/4\/posts\/8225\/replies\/",
                        "likes": "https:\/\/\/rest\/v1\/sites\/4\/posts\/8225\/likes\/"
                "current_user_can": {
                    "publish_post": false,
                    "delete_post": false,
                    "edit_post": false
                "capabilities": {
                    "publish_post": false,
                    "delete_post": false,
                    "edit_post": false