Example
cURL
curl 'https://public-api.wordpress.com/rest/v1/sites/en.blog.wordpress.com/tags/slug:wordpresscom?pretty=1'
PHP
<?php
$options = array (
'http' =>
array (
'ignore_errors' => true,
),
);
$context = stream_context_create( $options );
$response = file_get_contents(
'https://public-api.wordpress.com/rest/v1/sites/en.blog.wordpress.com/tags/slug:wordpresscom?pretty=1',
false,
$context
);
$response = json_decode( $response );
?>
Response Body
{
"name": "WordPress.com",
"slug": "wordpresscom",
"description": "",
"post_count": 15,
"meta": {
"links": {
"self": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/3584907\/tags\/slug:wordpresscom",
"help": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/3584907\/tags\/slug:wordpresscom\/help",
"site": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/3584907"
}
}
}