GET /sites/$site/embeds

Get a list of embeds available on a site. Note: The current user must have publishing access.

Resource Information

   
Method GET
URL https://public-api.wordpress.com/rest/v1.1/sites/$site/embeds
Requires authentication? Yes

Method Parameters

Parameter Type Description
$site (int|string) Site ID or domain

Query Parameters

Parameter Type Description
context (string)
display:
(default) Formats the output as HTML for display. Shortcodes are parsed, paragraph tags are added, etc..
edit:
Formats the output for editing. Shortcodes are left unparsed, significant whitespace is kept, etc..
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.

Response Parameters

Parameter Type Description
embeds (array) A list of supported embeds by their regex pattern.

Resource Errors

These are the possible errors returned by this endpoint.

HTTP Code Error Identifier Error Message
403 unauthorized User cannot access this private blog.
403 unauthorized User cannot access this restricted blog
403 unauthorized Your token must have permission to post on this blog.

Example

curl \
 -H 'authorization: Bearer YOUR_API_TOKEN' \
 'https://public-api.wordpress.com/rest/v1/sites/82974409/embeds'
<?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/sites/82974409/embeds',
	false,
	$context
);
$response = json_decode( $response );
?>

Response

{
“embeds”: [
“#https?:\/\/(www\\.)?bandsintown.com\/(\\S+)#”,
“#https?:\/\/(www\\.)?dropbox\\.com\/s\/([^\/]+)\/(.*)\\.(jpg|jpeg|png|gif)#i”,
“#^https?:\/\/(www.)?facebook\\.com\/([^\/]+)\/(posts|photos)\/([^\/]+)?#”,
“#^https?:\/\/(www.)?facebook\\.com\/permalink.php\\?([^\\s]+)#”,
“#^https?:\/\/(www.)?facebook\\.com\/photo.php\\?([^\\s]+)#”,
“#^https?:\/\/(www.)?facebook\\.com\/([^\/]+)\/photos\/([^\/]+)?#”,
“#^https?:\/\/(www.)?facebook\\.com\/(?:video.php|watch\\\/?)\\?([^\\s]+)#”,
“#^https?:\/\/(www.)?facebook\\.com\/([^\/]+)\/videos\/([^\/]+)?#”,
“#https?:\/\/(www\\.)?flickr\\.com\/.*#i”,
“#https?:\/\/gist\\.github\\.com\/([a-zA-Z0-9\/]+)(\\#file\\-[a-zA-Z0-9\\_\\-]+)?#”,
“#^https?:\/\/plus\\.(sandbox\\.)?google\\.com\/(u\/\\d+\/)?([^\/]+)\/posts\/([^\/]+)$#”,
“#https?:\/\/[^<]*\\.pdf$#i", "#http(s?):\/\/(www\\.)?instagr(\\.am|am\\.com)\/(p|tv)\/([^\\\/]*)#i", "#https?:\/\/(?:www\\.)?instagr(?:\\.am|am\\.com)\/(?:[^\/]*)\/(p|tv)\/([^\\\/]*)#i", "#^https?:\/\/medium.com\/([a-zA-z0-9-_@]+)#", "#http:\/\/([a-zA-Z0-9\\-\\.]+)\\.mlb\\.com\/video\/play\\.jsp\\?content_id=([0-9]+)#i", "#http:\/\/([a-zA-Z0-9\\-\\.]+)\\.milb\\.com\/multimedia\/vpp\\.jsp\\?content_id=([0-9]+)#i", "#https?:\/\/(?:www\\.)?(?:[a-z]{2}\\.)?pinterest\\.[a-z.]+\/([^\/]+)(\/[^\/]+)?#", "#https?:\/\/vine.co\/v\/([a-z0-9]+).*#i", "#https?:\/\/(www.)?youtube\\.com\/(?:v|embed)\/([^\/]+)#i", "\/^https?:\\\/\\\/(?:app.simplenote.com|simp.ly)\\\/publish\\\/(\\w+)\/i", "#https?:\\\/\\\/videopress.com\\\/v\\\/([a-zA-Z\\d]+)\\\/?\\??(.*)#", "#https?:\/\/(?:www\\.)?(?:youtube.com\/(?:v\/|playlist|watch[\/\\#?])|youtu\\.be\/).*#i", "%^https?:\/\/twitter\\.com(\/\\#\\!)?\/(?P[a-zA-Z0-9_]{1,20})\\\/status(es)?\/(?P\\d+)\/(photo\/\\d+)?$%i”,
“#https?:\/\/[^<]*(\\.jpg|\\.jpeg|\\.gif|\\.png|\/content)(\\?w=\\d+)?$#i", "#^https?:\/\/.+?\\.(mp3|ogg|flac|m4a|wav)$#i", "#^https?:\/\/.+?\\.(mp4|m4v|webm|ogv|flv)$#i", "#https?:\/\/((m|www)\\.)?youtube\\.com\/watch.*#i", "#https?:\/\/((m|www)\\.)?youtube\\.com\/playlist.*#i", "#https?:\/\/youtu\\.be\/.*#i", "#https?:\/\/(.+\\.)?vimeo\\.com\/.*#i", "#https?:\/\/dai\\.ly\/.*#i", "#https?:\/\/(www\\.)?flickr\\.com\/.*#i", "#https?:\/\/flic\\.kr\/.*#i", "#https?:\/\/(.+\\.)?smugmug\\.com\/.*#i", "#https?:\/\/(www\\.)?hulu\\.com\/watch\/.*#i", "#https?:\/\/(www\\.)?scribd\\.com\/(doc|document)\/.*#i", "#https?:\/\/wordpress\\.tv\/.*#i", "#https?:\/\/(.+\\.)?polldaddy\\.com\/.*#i", "#https?:\/\/poll\\.fm\/.*#i", "#https?:\/\/(.+\\.)?survey\\.fm\/.*#i", "#https?:\/\/(www\\.)?twitter\\.com\/\\w{1,15}\/status(es)?\/.*#i", "#https?:\/\/(www\\.)?twitter\\.com\/\\w{1,15}$#i", "#https?:\/\/(www\\.)?twitter\\.com\/\\w{1,15}\/likes$#i", "#https?:\/\/(www\\.)?twitter\\.com\/\\w{1,15}\/lists\/.*#i", "#https?:\/\/(www\\.)?twitter\\.com\/\\w{1,15}\/timelines\/.*#i", "#https?:\/\/(www\\.)?twitter\\.com\/i\/moments\/.*#i", "#https?:\/\/(www\\.)?soundcloud\\.com\/.*#i", "#https?:\/\/(.+?\\.)?slideshare\\.net\/.*#i", "#https?:\/\/(open|play)\\.spotify\\.com\/.*#i", "#https?:\/\/(.+\\.)?imgur\\.com\/.*#i", "#https?:\/\/(www\\.)?meetu(\\.ps|p\\.com)\/.*#i", "#https?:\/\/(www\\.)?issuu\\.com\/.+\/docs\/.+#i", "#https?:\/\/(www\\.)?collegehumor\\.com\/video\/.*#i", "#https?:\/\/(www\\.)?mixcloud\\.com\/.*#i", "#https?:\/\/(www\\.|embed\\.)?ted\\.com\/talks\/.*#i", "#https?:\/\/(www\\.)?(animoto|video214)\\.com\/play\/.*#i", "#https?:\/\/(.+)\\.tumblr\\.com\/post\/.*#i", "#https?:\/\/(www\\.)?kickstarter\\.com\/projects\/.*#i", "#https?:\/\/kck\\.st\/.*#i", "#https?:\/\/cloudup\\.com\/.*#i", "#https?:\/\/(www\\.)?reverbnation\\.com\/.*#i", "#https?:\/\/videopress\\.com\/v\/.*#", "#https?:\/\/(www\\.)?reddit\\.com\/r\/[^\/]+\/comments\/.*#i", "#https?:\/\/(www\\.)?speakerdeck\\.com\/.*#i", "#https?:\/\/www\\.facebook\\.com\/.*\/posts\/.*#i", "#https?:\/\/www\\.facebook\\.com\/.*\/activity\/.*#i", "#https?:\/\/www\\.facebook\\.com\/.*\/photos\/.*#i", "#https?:\/\/www\\.facebook\\.com\/photo(s\/|\\.php).*#i", "#https?:\/\/www\\.facebook\\.com\/permalink\\.php.*#i", "#https?:\/\/www\\.facebook\\.com\/media\/.*#i", "#https?:\/\/www\\.facebook\\.com\/questions\/.*#i", "#https?:\/\/www\\.facebook\\.com\/notes\/.*#i", "#https?:\/\/www\\.facebook\\.com\/.*\/videos\/.*#i", "#https?:\/\/www\\.facebook\\.com\/video\\.php.*#i", "#https?:\/\/(www\\.)?screencast\\.com\/.*#i", "#https?:\/\/([a-z0-9-]+\\.)?amazon\\.(com|com\\.mx|com\\.br|ca)\/.*#i", "#https?:\/\/([a-z0-9-]+\\.)?amazon\\.(co\\.uk|de|fr|it|es|in|nl|ru)\/.*#i", "#https?:\/\/([a-z0-9-]+\\.)?amazon\\.(co\\.jp|com\\.au)\/.*#i", "#https?:\/\/([a-z0-9-]+\\.)?amazon\\.cn\/.*#i", "#https?:\/\/(www\\.)?a\\.co\/.*#i", "#https?:\/\/(www\\.)?amzn\\.to\/.*#i", "#https?:\/\/(www\\.)?amzn\\.eu\/.*#i", "#https?:\/\/(www\\.)?amzn\\.in\/.*#i", "#https?:\/\/(www\\.)?amzn\\.asia\/.*#i", "#https?:\/\/(www\\.)?z\\.cn\/.*#i", "#https?:\/\/www\\.someecards\\.com\/.+-cards\/.+#i", "#https?:\/\/www\\.someecards\\.com\/usercards\/viewcard\/.+#i", "#https?:\/\/some\\.ly\\\/.+#i", "#http:\/\/(www\\.)?blurb\\.com\/.*#i", "#http:\/\/(www\\.)?entertonement\\.com\/.*#i", "#http:\/\/(www\\.|new\\.)?official\\.fm\/(track|playlist|tracks|playlists)\/.*#i", "#http:\/\/(www\\.)?fairtilizer\\.com\/(track|playlist)\/.*#i", "#https?:\/\/(www\\.)?educreations\\.com\/lesson\/view\/.*#i", "#http:\/\/(www\\.)?animoto.com\/play\/.*#i", "#http:\/\/(www\\.)?video214.com\/play\/.*#i", "http:\/\/slf.ie\/*", "#https?:\/\/(www\\.)?crowdrise\\.com\/.*#i", "#https?:\/\/(secure\\.|www\\.|form\\.)?(my)?jotform(pro|eu|z)?\\.(com|net|us|ca|me|co)\/form\/[0-9]*#i", "#https?:\/\/[^.]+\\.(wistia\\.com|wi\\.st)\/(medias|embed)\/.*#", "#^https?:\/\/([a-z0-9-]+\\.)?padlet\\.(com|org)\/.*#i", "#http:\/\/www.kitchenbowl.com\/recipe\/.*#i", "#https?:\/\/(www\\.)?reverbnation.com\/.*#i", "#https?:\/\/(www\\.)?soniclemur.com\/.*#i", "#https?:\/\/w(?:ww)?.graphiq.com\/w(?:lp)?\/.*#i", "#https?:\/\/(www\\.)?gfycat\\.com\/.*#i", "#https?:\/\/docs\\.com\/.*#i", "#https?:\/\/mix\\.office\\.com\/.*#i", "#https?:\/\/sway\\.com\/.*#i", "#https?:\/\/sketchfab\\.com\/.*#i", "#https?:\/\/[^.]+\\.vids\\.io\/videos\/.*#i", "#https?:\/\/([a-z0-9-]+\\.)?amazon\\.(com|co\\.uk|de|fr|it|es|co\\.jp|cn|com\\.au|in|com\\.mx|com\\.br|ca|nl)\/.*#i", "#https?:\/\/(story|stories)\\.mapme\\.com\/.*#i", "#https?:\/\/(www\\.)?hellopretty\\.co\\.za\/.*#i", "#https?:\/\/(www\\.)?infogr\\.am\/.*#i", "#https?:\/\/(www\\.)?(nytimes\\.com|nyti\\.ms)\/.*#i", "#https?:\/\/(www\\.)?audioboom\\.com\/.*#i", "#https?:\/\/(www\\.)?noteflight\\.com\/.*#i", "#https?:\/\/(www\\.)?spreaker\\.com\/.*#i", "#https?:\/\/(view\\.|www\\.)?genial\\.ly\/.*#i", "#https?:\/\/(www\\.)?icloud\\.com\/keynote\/.*#i", "#https?:\/\/(play\\.)?radiopublic\\.com\/.*#i", "#https?:\/\/(web)?player\\.whooshkaa\\.com\/.*#i", "#https?:\/\/simplecast\\.com\/s\/.*#i", "#^https?:\/\/(www.)?audiomack.com\/([^\/]+)\/([^\/]+)\/([^\/]+)[\/]{0,1}#", "#https?:\/\/(?:www\\.)?[^\/^\\.]+\\.carto(db)?\\.com\/\\S+#i", "#https?:\/\/cloudup\\.com\/([^\/.]+)#", "#https?:\/\/codepen.io\/([^\/]+)\/pen\/([^\/]+)\/?#", "#https?:\/\/.+\\.survey\\.fm\/.*#i", "#https?:\/\/(.+?\\.)?houzz\\.(com|co\\.uk|com\\.au|de|fr|ru|jp|it|es|dk|se)\/.*#i", "#https?:\/\/me.sh\/.*#i", "#https?:\/\/(?:www\\.)?mixcloud\\.com\/\\S*#i", "!https?:\/\/(www\\.)?ted.com\/talks\/view\/id\/.+!i", "!https?:\/\/(www\\.)?ted.com\/talks\/[a-zA-Z\\-\\_]+\\.html!i", "#https?:\/\/teespring\\.com\/.*#i", "#https?:\/\/www\\.thinglink.com\/(scene|video)\/\\d+\/?#i", "#https?:\/\/(?:www\\.)?tun(ein\\.com|.in)\/\\S*#i", "#http:\/\/(www\\.)?vimeo\\.com\/.*#i", "#https:\/\/(www\\.)?dailymotion\\.com\/.*#i", "https:\/\/dai.ly\/*", "#http:\/\/(www\\.)?dailymotion\\.com\/.*#i", "#https?:\/\/www\\.gettyimages\\.com\/detail\/.*#i", "#https?:\/\/(www\\.)?gty\\.im\/.*#i", "#http:\/\/snapguide.com\/guides\/.*#i", "#https?:\/\/speakerdeck.com\/.*#i" ] }[/sourcecode]