API REST Method: info
Get the known information for a video by its source url (url), source embed code (embed), Magma video id (id), or Magma instance id (instance_id). Information includes known view counts, likes counts, comments counts, title, description, source url, and more.
(Note: The info method can return information for an instance or a video. To learn more about how we categorize videos and instances, please read this page.)
Formats
XML, JSON, YAML, HTML, JS, text
HTTP Method
GET
Authentication
none
Rate Limited
none
Parameters
(* Either id, url, embed, or instance_id must be specified.)
- id. Required* : Magma video identification number.
- Example: http://mag.ma/420278
- url. Required* : Video source URL.
- Example: http://vimeo.com/9749744
- embed. Required* : Video source embed code.
- instance_id. Required* : Magma instance identification number.
- This number is the id given inside the <instance> block. When instance_id is specified, information will always be returned as information for that single instance and not the Magma video.
- instance. Optional. True or false.
- When true returns Magma video information (information from all collected instances), otherwise returns information for all instances of a video. (Default: false, but always true if an instance_id is specified.)
- callback. Optional. Specify a function callback (JSON format only)
Response
Note: The API will return an HTTP status code 404 for unknown videos.
XML Example of instance (where instance parameter is false):
<?xml version="1.0" encoding="UTF-8"?>
<video>
<created_at type="datetime">2010-02-26T19:00:07Z</created_at>
<description>In February, the world's top curators and critics nominated the 100 best
design of 2009. Three projects by FAT Lab fellows were in the hunt... but only one
can win. But anyway, it will probably be that dead fashion designer... Free Art and
Technology Lab: playing above our heads since 2007.</description>
<embed>
<object width="400" height="225">
<param name="allowfullscreen" value="true" />
<param name="allowscriptaccess" value="always" />
<param name="movie" value="http://vimeo.com
/moogaloop.swf?clip_id=9749744&amp;show_title=0&amp;
show_portrait=0&amp;color=&amp;fullscreen=1" />
<embed src="http://vimeo.com/moogaloop.swf?clip_id=9749744
&amp;show_title=0&amp;show_portrait=0&amp;color=
&amp;fullscreen=1" type="application/x-shockwave-flash"
allowfullscreen="true" allowscriptaccess="always"
width="400" height="225"></embed>
</object>
</embed>
<id type="integer">420278</id>
<nsfw type="boolean">false</nsfw>
<score type="float">5.1</score>
<source>vimeo</source>
<thumbnail>http://ts.vimeo.com.s3.amazonaws.com/492/116/49211644_200.jpg</thumbnail>
<title>2009: Year of the FAT</title>
<updated_at type="datetime">2010-03-13T00:19:30Z</updated_at>
<canonical_url>http://mag.ma/jamiew/420278</canonical_url>
<in_channel_url nil="true"></in_channel_url>
<views_count type="integer">667</views_count>
<comments_count type="integer">2</comments_count>
<likes_count type="integer">0</likes_count>
<links_count type="integer">0</links_count>
<tags_list nil="true"></tags_list>
<categories_list nil="true"></categories_list>
<source_url>http://vimeo.com/9749744</source_url>
</video>
XML Example of instance (where instance parameter is true or instance_id is specified):
<?xml version="1.0" encoding="UTF-8"?>
<instances type="array">
<instance>
<created_at type="datetime">2010-02-26T19:00:07Z</created_at>
<description>In February, the world's top curators and critics nominated the 100 best
design of 2009. Three projects by FAT Lab fellows were in the hunt... but only one
can win. But anyway, it will probably be that dead fashion designer... Free Art and
Technology Lab: playing above our heads since 2007.</description>
<embed>
<object width="400" height="225">
<param name="allowfullscreen" value="true" />
<param name="allowscriptaccess" value="always" />
<param name="movie" value="http://vimeo.com
/moogaloop.swf?clip_id=9749744&amp;show_title=0&amp;
show_portrait=0&amp;color=&amp;fullscreen=1" />
<embed src="http://vimeo.com/moogaloop.swf?clip_id=9749744
&amp;show_title=0&amp;show_portrait=0&amp;color=
&amp;fullscreen=1" type="application/x-shockwave-flash"
allowfullscreen="true" allowscriptaccess="always"
width="400" height="225"></embed>
</object>
</embed>
<id type="integer">439007</id>
<published_at type="datetime" nil="true"></published_at>
<score type="integer">5.1</score>
<thumbnail>http://ts.vimeo.com.s3.amazonaws.com/492/116/49211644_200.jpg</thumbnail>
<title>2009: Year of the FAT</title>
<updated_at type="datetime">2010-03-12T07:00:10Z</updated_at>
<video_id type="integer">420278</video_id>
<canonical_url>http://mag.ma/jamiew/420278</canonical_url>
<views_count>667</views_count>
<comments_count>2</comments_count>
<likes_count>9</likes_count>
<links_count type="integer">0</links_count>
<nsfw type="boolean">false</nsfw>
<source>vimeo</source>
<source_url>http://vimeo.com/9749744</source_url>
</instance>
...
</instances>
Example Usage
cURL request using Magma video id (id):
curl http://mag.ma/info.xml?id=420278
cURL request using Magma video id (id) returning instance information:
curl http://mag.ma/info.xml?instance=1&id=420278
cURL request using video URL (url):
curl http://mag.ma/info.xml?url=http://vimeo.com/9749744
cURL request using video embed code (embed):
curl http://mag.ma/info.xml?embed=%3Cobject%3E...%3C%2Fobject%3E
cURL request using video URL (url) and returning instance information:
curl http://mag.ma/info.xml?instance=1&url=http://vimeo.com/9749744
cURL request using Magma instance id (instance_id):
curl http://mag.ma/info.xml?instance_id=439007