{"__v":3,"_id":"564e01de8980c32b009e8bca","category":{"__v":12,"_id":"564df3217c8f372b00b934df","pages":["564e01de8980c32b009e8bca","564e031f5eab6e0d0069ca38","564e057a873c362d005172b2","564e05a15eab6e0d0069ca40","564e07b01494cc2b00acb618","56941291d8c04d1700e5adc2","5696aca1cb14e11700f8aa01","56d46a4f73dcd20b00fb8647","56d46a5b8001e30b00896ebb","56f00bd1d58ed32400df6092","56f01568d58ed32400df60c1","56f0194911415c2900969c10"],"project":"564de2dbfe07a81700b5c3a5","version":"564de2dbfe07a81700b5c3a8","reference":false,"createdAt":"2015-11-19T16:04:49.459Z","from_sync":false,"order":1,"slug":"api","title":"API"},"parentDoc":null,"project":"564de2dbfe07a81700b5c3a5","user":"564de2b4fe07a81700b5c3a4","version":{"__v":8,"_id":"564de2dbfe07a81700b5c3a8","project":"564de2dbfe07a81700b5c3a5","createdAt":"2015-11-19T14:55:23.838Z","releaseDate":"2015-11-19T14:55:23.837Z","categories":["564de2ddfe07a81700b5c3a9","564df317826645210097a890","564df3217c8f372b00b934df","564e5227c3553e0d003e53ba","5666dac5d784a70d00397bcb","56cd08ddd98d851d00c0c3bd","56e9a50946bfd60e008840a7","5718e37bf8f7de1900683fad"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"updates":[],"createdAt":"2015-11-19T17:07:42.454Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"examples":{"codes":[{"code":"$.embedly.oembed('url', {});","language":"javascript"}]},"results":{"codes":[{"name":"","code":"{\n  \"provider_url\": \"http://blog.embed.ly\",\n  \"lead\": null,\n  \"language\": \"English\",\n  \"original_url\": \"http://blog.embed.ly/javascript-hackathon-downcityjs-betaspring\",\n  \"url\": \"http://blog.embed.ly/javascript-hackathon-downcityjs-betaspring\", \n  \"entities\": [\n    {\"count\": 4, \"name\": \"Aaron\"},\n    {\"count\": 1, \"name\": \"Vinh\"},\n    {\"count\": 1, \"name\": \"Reddit\"},\n    {\"count\": 1, \"name\": \"Kyle Nichols\"},\n    {\"count\": 1, \"name\": \"Kawan\"}\n  ],\n \t\"safe\": true,\n  \"provider_display\": \"blog.embed.ly\",\n  \"related\": [],\n  \"keywords\": [\n    {\"score\": 31, \"name\": \"api\"},\n    {\"score\": 28, \"name\": \"embed\"},\n    {\"score\": 21, \"name\": \"aaron\"},\n    {\"score\": 14, \"name\": \"best\"},\n    {\"score\": 10, \"name\": \"thumbwar\"},\n    {\"score\": 10,\"name\": \"friends\"}\n  ],\n \n  \"title\": \"DowncityJS Hackathon Recap - Embedly\",\n  \"description\": \"We provided our API for.....\",\n  \"content\": \"<div><strong>We</strong> provi...</div>\",\n   \"authors\": [{\n    \"url\": \"http://posterous.com/users/iHySgjJhRuY0q\",\n  \t\"name\": \"Nina Stepanov\"}\n   ],\n  \"favicon_url\": \"http://blog.embed.ly/images/favicon.png\",\n  \"favicon_colors\": [\n    {\"color\": [243, 245, 245], \"weight\": 0.68701171875},\n    {\"color\": [10, 169, 25], \"weight\": 0.223388671875},\n    {\"color\": [0, 100, 6], \"weight\": 0.089599609375}\n  ],\n\n  \"media\": {},\n  \"offset\": null,\n  \"published\": 1360022400000,\n  \"images\": [ {\n    \"caption\":null,\n    \"url\":\"https://lh3.googleusercontent.com/MaaMmP0N4psfPqQOUqegiz3q-SxnRd3sFn-XNKy92XLXo-\n    R6dZIcFv7PkvgleeCqynGsUj4s9GUTnL__W77OpjmaTcBgis98nhudlkwsZp7-CNCqihX1zalDbQ\",\n    \"height\":768,\n    \"width\":1024,\n    \"colors\":[{\n        \"color\":[ 14, 16, 18],\n        \"weight\":0.311767578125\n    \t},\n      {\n        \"color\":[238, 232, 203],\n        \"weight\":0.131103515625\n      }],\n    \t\"entropy\":6.568857137759403,\n    \t\"size\":228025\n   }],\n  \n  \"provider_name\": \"Embed\",\n  \"cache_age\": 86301,\n  \"type\": \"html\"\n}","language":"json","status":200}]},"settings":"","auth":"required","params":[{"_id":"564de4a9fe07a81700b5c3b2","ref":"","required":false,"desc":"The URL is to retrieve embedding information. This URL must be escaped to ensure that Embedly retrieves the correct link. For example, this Embedly URL.","default":"","type":"string","name":"url"},{"_id":"564df12e7441dc350097531b","ref":"","required":false,"desc":"A comma separated list of urls for Embedly to process. Each URL must be escaped, but commas separating URLS must NOT be URL encoded. urls accepts a maximum of 10 urls at a time. Embedly processes these urls in parallel, therefore, it’s quicker to use urls for batched processing.","default":"","type":"string","name":"urls"},{"_id":"564de4a9fe07a81700b5c3b1","ref":"","required":false,"desc":"This is the maximum width of the embed in pixels. maxwidth is used for scaling down embeds so they fit into a certain width. If the container for an embed is 500px you should pass maxwidth=500 in the query parameters.","default":"","type":"int","name":"maxwidth"},{"_id":"564df12e7441dc350097531a","ref":"","required":false,"desc":"This is the maximum height of the embed in pixels. Functions the same as maxwidth, but for the height of the embed instead. It’s noteworthy that maxwidth is preferred over maxheight.","default":"","type":"int","name":"maxheight"},{"_id":"564df2897441dc350097531f","ref":"","required":false,"desc":"Will scale embeds type rich and video to the exact width that a developer specifies in pixels. Embeds smaller than this width will be scaled up and embeds larger than this width will be scaled down. Note that using this may cause distortion when scaling up embeds.","default":"","type":"int","name":"width"},{"_id":"56c5dedb89048b17000ef675","ref":"","required":false,"desc":"Will scale embeds type rich and video to the exact height that a developer specifies in pixels. Embeds smaller than this height will be scaled up and embeds larger than this height will be scaled down. Note that using this may cause distortion when scaling up embeds.","default":"","type":"int","name":"height"},{"_id":"564df2897441dc350097531e","ref":"","required":false,"desc":"The response format – Accepted values: (xml, json)","default":"","type":"string","name":"format"},{"_id":"564df2897441dc350097531d","ref":"","required":false,"desc":"Will append the wmode value to the flash object. Possible values include window, opaque and transparent.","default":"","type":"string","name":"wmode"},{"_id":"564dfad332e48b0d005f9db0","ref":"","required":false,"desc":"Returns a (jsonp) response format. The callback is the name of the javascript function to execute.","default":"","type":"string","name":"callback"},{"_id":"564dfad332e48b0d005f9daf","ref":"","required":false,"desc":"By default Embedly does not return script embeds for jsonp requests. They just don’t work and cause lots of issues. In some cases, you may need the script tag for saving and displaying later. In order for Embedly to send the script embeds over jsonp add allowscripts=true. Use with care, and this option is only valid when a callback is supplied, otherwise, it is ignored.","default":"","type":"boolean","name":"allowscripts"},{"_id":"564dfad332e48b0d005f9dae","ref":"","required":false,"desc":"This will tell the video/rich media to automatically play when the media is loaded. Accepted values: (true, false) Default: false","default":"","type":"boolean","name":"autoplay"},{"_id":"564dfad332e48b0d005f9dad","ref":"","required":false,"desc":"The words parameter works by trying to split the description at the closest sentence to that word count","default":"50","type":"string","name":"words"},{"_id":"564dfad332e48b0d005f9dac","ref":"","required":false,"desc":"chars is much simpler than words. Embedly will blindly truncate a description to the number of characters you specify adding ... at the end when needed.","default":"","type":"string","name":"chars"},{"_id":"564dfad332e48b0d005f9dab","ref":"","required":false,"desc":"With luxe Embedly’s iframe is initially loaded with poster image and play button rather than loading the whole embed. When the user clicks play the embed is loaded and starts playing.","default":"0","type":"boolean","name":"luxe"},{"_id":"564dfad332e48b0d005f9daa","ref":"","required":false,"desc":"secure allows you to serve embeds with a SSL connection. You can also serve images over SSL with our Display product. You can enable this by adding secure=true.","default":"","type":"boolean","name":"secure"},{"_id":"564dfad332e48b0d005f9da9","ref":"","required":false,"desc":"scheme allows to set the protocol scheme explicity to http or https. By default embeds are sent back protocol-less so that they will work in any page. You can explicity set a protocol by adding scheme=https.","default":"","type":"string","name":"scheme"},{"_id":"569fbbe9650e1d1900f96bba","ref":"","required":false,"desc":"With title Embedly will set the title response attribute to the open_graph, meta, or twitter title if available in the page. Accepted values: (og, twitter, meta)","default":"","type":"string","name":"title"},{"_id":"569fbbe9650e1d1900f96bb9","ref":"","required":false,"desc":"With description Embedly will set the description response attribute to the open_graph, meta, or twitter description if available in the page. Accepted values: (og, twitter, meta)","default":"","type":"string","name":"description"},{"_id":"56f1a1c2da0c573400baccfd","ref":"","required":false,"desc":"Will return only images found in meta tags or an API response if set.","default":"0","type":"boolean","name":"meta_images"}],"url":"/1/extract"},"isReference":false,"order":1,"body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Response Attributes\"\n}\n[/block]\n\n**``original_url``**\nThe url that was passed into Embedly. This will be something like a bit.ly shortened link or if there is no redirect it will be the same as the ``url`` attribute.\n\n**``url``**\nThe effective url of the request. Whatever Embedly found at the end of any\nredirects.\n\n**``type``**\nReturns the type of the document at this URL, they can be one of the following:\n\n  * ``html``: The most common response. The resource is an ``html`` document.\n  * ``text``: The response is a plain ``text`` document.\n  * ``image``: This is a static viewable ``image``.\n  * ``video``: This is a playable ``video``.\n  * ``audio``: This is a playable ``audio``.\n  * ``rss``:  The resource is an ``rss`` feed.\n  * ``xml``:  The resource is an ``xml`` document.\n  * ``atom``: The resource is an ``atom`` feed.\n  * ``json``: The resource is a ``json`` document.\n  * ``ppt``:  The resource is a PowerPoint document.\n  * ``link``: This is a general embed that may not contain HTML.\n  * ``error``: When accessing multiple urls at once Embedly will not throw HTTP errors as  normal. Instead, it will return an ``error`` type response that includes the ``url``, ``error_message`` and ``error_code``.\n\n**``cache_age``**\nHow long Embedly is going to cache the response for? Generally, this is for a day, unless some external factor tells us to reevaluate the resource.\n\n**``safe``**\nSafe is an attribute that tells you if the url is on a phishing or malware list. Embedly uses Google's\n[Safe Browsing API](http://code.google.com/apis/safebrowsing/) to obtain a list of malicious urls. By using this API through our service, you agree to its[terms of service](https://developers.google.com/safe-browsing/terms).\n\n**``provider_name``**\nThe name of the resource provider.\n\n**``provider_url``**\nThe url of the resource provider.\n\n**``provider_display``**\nFor display purposes we ``include provider_display``, it's the subdomain, hostname, and public suffix of the provider.\n\n**``favicon_url``**\nThe url of the favicon.\n\n**``favicon_colors``**\nList of dominant colors extracted from ``favicon_url``.\n\n**``title``**\nThe title of the resource. It's picked in the following order:\n\n * The rss entry's title\n * The oEmbed title\n * The open graph title\n * The ``meta`` title tag\n * The ``title`` attribute in the ``head`` element\n\n**``authors``**\nA list of all the authors that are associated with this article. Each author has a ``url`` and ``name``. Here is an example response:\n\n        [{\n          \"name\": \"Sean Creeley\"\n          \"url\": \"http://blog.embed.ly/screeley\"\n        }]\n\nMost articles have only one author, but ``authors`` makes it flexible enough to add more if necessary.\n\n**``published``**\nA representation of the date which the article was published in milliseconds. If an ``offset`` is present, then there was timezone data present, otherwise we assume the Date is in UTC. Like all dates, this is a little confusing, so we will explain. Say the Embedly parser came across the following HTML:\n\n    <span class=\"pubdate\">Aug 24, 2012</span>\n\nBecause there is no timezone information, Embedly will not return an ``offset`` and the ``published`` attribute will be in UTC. We will return the following response:\n\n    \"published\": 1345766400000\n\n\n**``offset``**\nThe UTC offset of the date in milliseconds. See the above section for more information about ``offset`` and how to use it with the ``published`` time.\n\n**``description``**\nThe description of the resource. It's picked in the following order:\n\n* The oEmbed description\n* The open graph description\n* The ``meta`` description tag\n* An excerpt pulled programmaticly by Embedly\n\n**``lead``**\nOften there is a lead paragraph that is a brief summary of the rest of the\narticle. Embedly tries to pull this lead paragraph out for a better reading\nexperience. It is always a ``p`` tag, i.e.::\n\n    \"lead\": \"<p>This is a summary of the below article</p>\"\n\n**``content``**\nThis is the html that we pulled from the URL. It's been sanitized, so it will only contain the following tags::\n\n    'a', 'abbr', 'acronym', 'b', 'big', 'blockquote', 'br', 'cite', 'code',\n    'del', 'dfn', 'em', 'i', 'ins', 'kbd', 'mark', 'pre', 'q', 's', 'samp',\n    'small', 'span', 'strike', 'strong', 'sub', 'sup', 'time', 'tt', 'u',\n    'var', 'p', 'div', 'a', 'h2', 'h3', 'h4', 'h5', 'h6', 'img', 'ol', 'ul',\n    'li'\n\nAll tag attributes have been removed as well. The only effective attributes are:\n\n  * ``href`` on an ``a`` tag\n  * ``src`` on an ``img`` tag\n\n**``keywords``**\nThe ``keywords`` object gives you a list of ranked keywords extracted from the article or blog text of a URL. This is different from the meta keywords defined by the page. Embedly uses its own ranking system to determine which keywords are the most relevant. Each keyword has two values:\n\n    ``name``\n        Name of the keyword.\n\n    ``score``\n        Score of the keyword from the article, larger numbers infer more relevance.\n\n\n**``entities``**\nThe ``entities`` object gives you a list of proper nouns (persons, places, and things) extracted from the article or blog text of a URL. Along with each entity name, Embedly counts the number of times it appears in the text. Each entity has two values:\n\n    ``name``\n        Name of the entity (person, place, or thing).\n\n    ``count``\n        Number of times an entity appears in the text.\n\n\n**``images``**\nThe ``images`` object is a list of, at most, 5 images that Embedly found while processing the URL. Along with the list of images we pull various pieces of information about each image including dimensions, dominant colors, entropy, captions, and size. Each image contains:\n\n    ``width``: The width of the image in pixels\n    ``height``: The height of the image in pixels\n    ``size``: The size in bytes of the image.\n    ``caption``: An image  caption is the short description or sentence that many sites provide below each image. This text usually describes what the image is depicting.\n    ``entropy``: Image entropy can be roughly thought of as how \"busy\" an image is. Image entropy can be useful in programmatically choosing the type of image to display. For instance, if an API user wants to display photographic type images, but not logos, they can ignore images with lower entropy.\n    ``colors``: The dominant colors of an image are those colors that make up the majority of\n    an image. The ``color`` attribute is the RGB representation of the color and and the ``wight`` is how prevalent that color is in the image.\n\n**``app_links``**\nThere are few different specs for deep linking, they include [App Links](http://applinks.org/), Twitter's [App Card](https://dev.twitter.com/cards/types/app) and Google's [App Indexing](http://developer.android.com/training/app-indexing/enabling-app-indexing.html). Embedly parses and returns all three in a list of objects. Each is dependent on the spec, but two attributes are the same for each:\n\n    ``namespace``: The type of the deep link. ``ai``, ``twitter`` or ``google \n    ``type``: The type of the device the deep link targets ``ipad``, ``iphone``, ``andriod``, ``ios`` etc.\n\n \n**``media``**\nThe media is primary type of content (video, photo, etc.) that is associated with a ``url``. It follows the general pattern of the [/1/oembed](doc:oembed) Response, but with only a limited set of attributes. Note: It is optional and only available if we can classify it as such type.\n\n**``type``**\nThe resource type. Valid values, along with value-specific parameters, are described below.\n\n\n###The photo type\nThis type is used for representing static photos. The following parameters are\ndefined:\n\n``url``\n    The source URL of the image. Consumers should be able to insert this URL\n    into an``<img>``element. Only HTTP and HTTPS URLs are valid.\n\n``width``\n    The width in pixels of the image specified in the ``url`` parameter.\n\n``height``\n    The height in pixels of the image specified in the ``url`` parameter.\n\n\n### The video type\nThis type is used for representing playable videos. The following parameters\nare defined:\n\n``html``\n    The HTML required to embed a video player. The HTML should have no padding\n    or margins. Consumers may wish to load the HTML in an off-domain iframe to\n    avoid XSS vulnerabilities.\n\n``width``\n    The width in pixels required to display the HTML. If not supplied\n    the HTML returned will expand horizontally to the size of its parent\n    container.\n\n``height``\n    The height in pixels required to display the HTML. If not supplied\n    the HTML returned will expand vertically to the size of its parent\n    container.\n\n\n###The rich type\nThis type is used for rich HTML content that does not fall under one of the\nother categories. The following parameters are defined:\n\n``html`` (required)\n    The HTML required to display the resource. The HTML should have no padding\n    or margins. Consumers may wish to load the HTML in an off-domain iframe to\n    avoid XSS vulnerabilities. The markup should be valid XHTML 1.0 Basic.\n\n``width``\nThe width in pixels required to display the HTML. If not supplied\nthe HTML returned will expand horizontally to the size of its parent\ncontainer.\n\n``height``\nThe height in pixels required to display the HTML. If not supplied the HTML returned will expand vertically to the size of its parent container.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Error Codes\"\n}\n[/block]\n###JSON Requests\n\n400 Bad Request\n\n  * Required \"url\" parameter is missing.\n  * Either \"url\" or \"urls\" parameter is reqiured.\n  * Invalid URL format.\n  * Invalid \"maxheight\" parameter.\n  * Invalid \"maxwidth\" parameter.\n  * Invalid \"urls\" parameter, exceeded max count of 20.\n\n401 Unauthorized\n\n  * Invalid key or oauth_consumer_key provided: <key>, contact: support:::at:::embed.ly.\n  * The provided key does not support this endpoint: <key>, contact: support@embed.ly.\n  * URL is private or restricted.\n\n403 Forbidden\n\n  * This service requires an embedly key parameter, contact: support@embed.ly or sign up: http://embed.ly/signup.\n  * Invalid IP provided: <ip>, contact: support@embed.ly.\n  * Invalid referrer provided: <referrer>, contact: support@embed.ly.\n\n404 Not Found\nURL Not Found, we will log this and determine if usable.\n\n500 Server issues\nEmbed.ly is having trouble with this url. Please try again or contact us, support@embed.ly.\n\n501 Not Implemented\nNot implemented for format: acceptable values are ``{json}``.\n\n503 Service Unavailable\n``Note``: This happens if our service is down, please contact us immediately: support@embed.ly.\n\n### JSONP Requests\nFormat\n\n    ``callbackFunction({\"url\": \"url with error\", \"error_code\": \"error code\",\n    \"error_message\": \"error message\", \"type\": \"error\"})``\n\nError Response\n    \n    ``jsonp1273162787542({\"url\": \"http://flickr.com/embedly\", \"error_code\": 404, \"error_message\":\n    \"HTTP 404: Not Found\", \"type\": \"error\"})``\n[block:callout]\n{\n  \"type\": \"success\",\n  \"body\": \"Try out our handy [Extract API Explorer](http://embed.ly/docs/explore/extract). It's awesome and will allow you to preview the response of any URL.\\n\\nGo to the [Extract API Explorer](http://embed.ly/docs/explore/extract)\",\n  \"title\": \"Want to try out the Extract API?\"\n}\n[/block]","excerpt":"Extract allows users to dive into specifics on a site and beyond. With this API we allow developers to extract article text, topics, and retrieve more meta-data about articles, blog posts, and stories.","slug":"extract","type":"get","title":"/1/extract"}

get/1/extract

Extract allows users to dive into specifics on a site and beyond. With this API we allow developers to extract article text, topics, and retrieve more meta-data about articles, blog posts, and stories.

Definition

{{ api_url }}{{ page_api_url }}

Parameters

url:
string
The URL is to retrieve embedding information. This URL must be escaped to ensure that Embedly retrieves the correct link. For example, this Embedly URL.
urls:
string
A comma separated list of urls for Embedly to process. Each URL must be escaped, but commas separating URLS must NOT be URL encoded. urls accepts a maximum of 10 urls at a time. Embedly processes these urls in parallel, therefore, it’s quicker to use urls for batched processing.
maxwidth:
integer
This is the maximum width of the embed in pixels. maxwidth is used for scaling down embeds so they fit into a certain width. If the container for an embed is 500px you should pass maxwidth=500 in the query parameters.
maxheight:
integer
This is the maximum height of the embed in pixels. Functions the same as maxwidth, but for the height of the embed instead. It’s noteworthy that maxwidth is preferred over maxheight.
width:
integer
Will scale embeds type rich and video to the exact width that a developer specifies in pixels. Embeds smaller than this width will be scaled up and embeds larger than this width will be scaled down. Note that using this may cause distortion when scaling up embeds.
height:
integer
Will scale embeds type rich and video to the exact height that a developer specifies in pixels. Embeds smaller than this height will be scaled up and embeds larger than this height will be scaled down. Note that using this may cause distortion when scaling up embeds.
format:
string
The response format – Accepted values: (xml, json)
wmode:
string
Will append the wmode value to the flash object. Possible values include window, opaque and transparent.
callback:
string
Returns a (jsonp) response format. The callback is the name of the javascript function to execute.
allowscripts:
boolean
By default Embedly does not return script embeds for jsonp requests. They just don’t work and cause lots of issues. In some cases, you may need the script tag for saving and displaying later. In order for Embedly to send the script embeds over jsonp add allowscripts=true. Use with care, and this option is only valid when a callback is supplied, otherwise, it is ignored.
autoplay:
boolean
This will tell the video/rich media to automatically play when the media is loaded. Accepted values: (true, false) Default: false
words:
string50
The words parameter works by trying to split the description at the closest sentence to that word count
chars:
string
chars is much simpler than words. Embedly will blindly truncate a description to the number of characters you specify adding ... at the end when needed.
luxe:
boolean0
With luxe Embedly’s iframe is initially loaded with poster image and play button rather than loading the whole embed. When the user clicks play the embed is loaded and starts playing.
secure:
boolean
secure allows you to serve embeds with a SSL connection. You can also serve images over SSL with our Display product. You can enable this by adding secure=true.
scheme:
string
scheme allows to set the protocol scheme explicity to http or https. By default embeds are sent back protocol-less so that they will work in any page. You can explicity set a protocol by adding scheme=https.
title:
string
With title Embedly will set the title response attribute to the open_graph, meta, or twitter title if available in the page. Accepted values: (og, twitter, meta)
description:
string
With description Embedly will set the description response attribute to the open_graph, meta, or twitter description if available in the page. Accepted values: (og, twitter, meta)
meta_images:
boolean0
Will return only images found in meta tags or an API response if set.

Examples


Result Format


Documentation

[block:api-header] { "type": "basic", "title": "Response Attributes" } [/block] **``original_url``** The url that was passed into Embedly. This will be something like a bit.ly shortened link or if there is no redirect it will be the same as the ``url`` attribute. **``url``** The effective url of the request. Whatever Embedly found at the end of any redirects. **``type``** Returns the type of the document at this URL, they can be one of the following: * ``html``: The most common response. The resource is an ``html`` document. * ``text``: The response is a plain ``text`` document. * ``image``: This is a static viewable ``image``. * ``video``: This is a playable ``video``. * ``audio``: This is a playable ``audio``. * ``rss``: The resource is an ``rss`` feed. * ``xml``: The resource is an ``xml`` document. * ``atom``: The resource is an ``atom`` feed. * ``json``: The resource is a ``json`` document. * ``ppt``: The resource is a PowerPoint document. * ``link``: This is a general embed that may not contain HTML. * ``error``: When accessing multiple urls at once Embedly will not throw HTTP errors as normal. Instead, it will return an ``error`` type response that includes the ``url``, ``error_message`` and ``error_code``. **``cache_age``** How long Embedly is going to cache the response for? Generally, this is for a day, unless some external factor tells us to reevaluate the resource. **``safe``** Safe is an attribute that tells you if the url is on a phishing or malware list. Embedly uses Google's [Safe Browsing API](http://code.google.com/apis/safebrowsing/) to obtain a list of malicious urls. By using this API through our service, you agree to its[terms of service](https://developers.google.com/safe-browsing/terms). **``provider_name``** The name of the resource provider. **``provider_url``** The url of the resource provider. **``provider_display``** For display purposes we ``include provider_display``, it's the subdomain, hostname, and public suffix of the provider. **``favicon_url``** The url of the favicon. **``favicon_colors``** List of dominant colors extracted from ``favicon_url``. **``title``** The title of the resource. It's picked in the following order: * The rss entry's title * The oEmbed title * The open graph title * The ``meta`` title tag * The ``title`` attribute in the ``head`` element **``authors``** A list of all the authors that are associated with this article. Each author has a ``url`` and ``name``. Here is an example response: [{ "name": "Sean Creeley" "url": "http://blog.embed.ly/screeley" }] Most articles have only one author, but ``authors`` makes it flexible enough to add more if necessary. **``published``** A representation of the date which the article was published in milliseconds. If an ``offset`` is present, then there was timezone data present, otherwise we assume the Date is in UTC. Like all dates, this is a little confusing, so we will explain. Say the Embedly parser came across the following HTML: <span class="pubdate">Aug 24, 2012</span> Because there is no timezone information, Embedly will not return an ``offset`` and the ``published`` attribute will be in UTC. We will return the following response: "published": 1345766400000 **``offset``** The UTC offset of the date in milliseconds. See the above section for more information about ``offset`` and how to use it with the ``published`` time. **``description``** The description of the resource. It's picked in the following order: * The oEmbed description * The open graph description * The ``meta`` description tag * An excerpt pulled programmaticly by Embedly **``lead``** Often there is a lead paragraph that is a brief summary of the rest of the article. Embedly tries to pull this lead paragraph out for a better reading experience. It is always a ``p`` tag, i.e.:: "lead": "<p>This is a summary of the below article</p>" **``content``** This is the html that we pulled from the URL. It's been sanitized, so it will only contain the following tags:: 'a', 'abbr', 'acronym', 'b', 'big', 'blockquote', 'br', 'cite', 'code', 'del', 'dfn', 'em', 'i', 'ins', 'kbd', 'mark', 'pre', 'q', 's', 'samp', 'small', 'span', 'strike', 'strong', 'sub', 'sup', 'time', 'tt', 'u', 'var', 'p', 'div', 'a', 'h2', 'h3', 'h4', 'h5', 'h6', 'img', 'ol', 'ul', 'li' All tag attributes have been removed as well. The only effective attributes are: * ``href`` on an ``a`` tag * ``src`` on an ``img`` tag **``keywords``** The ``keywords`` object gives you a list of ranked keywords extracted from the article or blog text of a URL. This is different from the meta keywords defined by the page. Embedly uses its own ranking system to determine which keywords are the most relevant. Each keyword has two values: ``name`` Name of the keyword. ``score`` Score of the keyword from the article, larger numbers infer more relevance. **``entities``** The ``entities`` object gives you a list of proper nouns (persons, places, and things) extracted from the article or blog text of a URL. Along with each entity name, Embedly counts the number of times it appears in the text. Each entity has two values: ``name`` Name of the entity (person, place, or thing). ``count`` Number of times an entity appears in the text. **``images``** The ``images`` object is a list of, at most, 5 images that Embedly found while processing the URL. Along with the list of images we pull various pieces of information about each image including dimensions, dominant colors, entropy, captions, and size. Each image contains: ``width``: The width of the image in pixels ``height``: The height of the image in pixels ``size``: The size in bytes of the image. ``caption``: An image caption is the short description or sentence that many sites provide below each image. This text usually describes what the image is depicting. ``entropy``: Image entropy can be roughly thought of as how "busy" an image is. Image entropy can be useful in programmatically choosing the type of image to display. For instance, if an API user wants to display photographic type images, but not logos, they can ignore images with lower entropy. ``colors``: The dominant colors of an image are those colors that make up the majority of an image. The ``color`` attribute is the RGB representation of the color and and the ``wight`` is how prevalent that color is in the image. **``app_links``** There are few different specs for deep linking, they include [App Links](http://applinks.org/), Twitter's [App Card](https://dev.twitter.com/cards/types/app) and Google's [App Indexing](http://developer.android.com/training/app-indexing/enabling-app-indexing.html). Embedly parses and returns all three in a list of objects. Each is dependent on the spec, but two attributes are the same for each: ``namespace``: The type of the deep link. ``ai``, ``twitter`` or ``google ``type``: The type of the device the deep link targets ``ipad``, ``iphone``, ``andriod``, ``ios`` etc. **``media``** The media is primary type of content (video, photo, etc.) that is associated with a ``url``. It follows the general pattern of the [/1/oembed](doc:oembed) Response, but with only a limited set of attributes. Note: It is optional and only available if we can classify it as such type. **``type``** The resource type. Valid values, along with value-specific parameters, are described below. ###The photo type This type is used for representing static photos. The following parameters are defined: ``url`` The source URL of the image. Consumers should be able to insert this URL into an``<img>``element. Only HTTP and HTTPS URLs are valid. ``width`` The width in pixels of the image specified in the ``url`` parameter. ``height`` The height in pixels of the image specified in the ``url`` parameter. ### The video type This type is used for representing playable videos. The following parameters are defined: ``html`` The HTML required to embed a video player. The HTML should have no padding or margins. Consumers may wish to load the HTML in an off-domain iframe to avoid XSS vulnerabilities. ``width`` The width in pixels required to display the HTML. If not supplied the HTML returned will expand horizontally to the size of its parent container. ``height`` The height in pixels required to display the HTML. If not supplied the HTML returned will expand vertically to the size of its parent container. ###The rich type This type is used for rich HTML content that does not fall under one of the other categories. The following parameters are defined: ``html`` (required) The HTML required to display the resource. The HTML should have no padding or margins. Consumers may wish to load the HTML in an off-domain iframe to avoid XSS vulnerabilities. The markup should be valid XHTML 1.0 Basic. ``width`` The width in pixels required to display the HTML. If not supplied the HTML returned will expand horizontally to the size of its parent container. ``height`` The height in pixels required to display the HTML. If not supplied the HTML returned will expand vertically to the size of its parent container. [block:api-header] { "type": "basic", "title": "Error Codes" } [/block] ###JSON Requests 400 Bad Request * Required "url" parameter is missing. * Either "url" or "urls" parameter is reqiured. * Invalid URL format. * Invalid "maxheight" parameter. * Invalid "maxwidth" parameter. * Invalid "urls" parameter, exceeded max count of 20. 401 Unauthorized * Invalid key or oauth_consumer_key provided: <key>, contact: support@embed.ly. * The provided key does not support this endpoint: <key>, contact: support@embed.ly. * URL is private or restricted. 403 Forbidden * This service requires an embedly key parameter, contact: support@embed.ly or sign up: http://embed.ly/signup. * Invalid IP provided: <ip>, contact: support@embed.ly. * Invalid referrer provided: <referrer>, contact: support@embed.ly. 404 Not Found URL Not Found, we will log this and determine if usable. 500 Server issues Embed.ly is having trouble with this url. Please try again or contact us, support@embed.ly. 501 Not Implemented Not implemented for format: acceptable values are ``{json}``. 503 Service Unavailable ``Note``: This happens if our service is down, please contact us immediately: support@embed.ly. ### JSONP Requests Format ``callbackFunction({"url": "url with error", "error_code": "error code", "error_message": "error message", "type": "error"})`` Error Response ``jsonp1273162787542({"url": "http://flickr.com/embedly", "error_code": 404, "error_message": "HTTP 404: Not Found", "type": "error"})`` [block:callout] { "type": "success", "body": "Try out our handy [Extract API Explorer](http://embed.ly/docs/explore/extract). It's awesome and will allow you to preview the response of any URL.\n\nGo to the [Extract API Explorer](http://embed.ly/docs/explore/extract)", "title": "Want to try out the Extract API?" } [/block]