Skip to content
Embedly library for PHP
PHP JavaScript CSS
Latest commit a2cbf6d Feb 5, 2015 @dokipen dokipen Merge pull request #21 from uzairfarooq/http_error_codes_handling
If there's an http error code, return the error in all results



A PHP library for using the Embedly API. To find out what Embedly is all about, please visit To see our api documentation, visit


You will need at least PHP version 5.3 with curl enabled. Behat and PHPUnit are required to run the test suite. Pear is recommended.


To install:

1. Download the composer.phar executable or use the installer.

curl -sS | php

2. Create a composer.json defining your dependencies. Note that this example is a short version for applications that are not meant to be published as a packages themselves.

  "require": [
  1. Run Composer: php composer.phar install


require_once('Embedly/src/Embedly/Embedly.php');  // if using pear
// require_once('src/Embedly/Embedly.php');  // if using source

$api = new Embedly\Embedly(array('user_agent' => 'Mozilla/5.0 (compatible; mytestapp/1.0)'));

// Single url
$objs = $api->oembed('');

// Multiple urls
$obj = $api->oembed(array(
    'urls' => array(

// Call with pro (you'll need a real key)
$pro = new Embedly\Embedly(array(
    'key' => 'xxxxxxxxxxxxxxxx',
    'user_agent' => 'Mozilla/5.0 (compatible; mytestapp/1.0)'
$objs = $pro->extract(array(
    'urls' => array(


git clone git://
curl -sS | php
php composer.phar install
export EMBEDLY_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxx

Note on Patches/Pull Requests

  • Fork the project.
  • Make your feature addition or bug fix.
  • Add tests for it. This is important so I don't break it in a future version unintentionally.
  • Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
  • Send me a pull request. Bonus points for topic branches.


Copyright (c) 2011, Inc. See MIT-LICENSE for details.

Something went wrong with that request. Please try again.