API REST Method: leaderboard

The Magma Leaderboard (Top 100) is a paginated list of the top 100 videos found across the web specified by an interval length.

While the results are identical to a regular channel request, the Leaderboard has additional parameters for intervals and a max limit on the total number of results.

URL
    http://mag.ma/leaderboard.format

Formats
    XML, RSS, JSON, YAML, HTML, text

HTTP Method
    GET

Authentication
    none

Rate Limited
    none

Parameters

  • interval. Optional. : A string value, can be either 'today', 'week', 'month', or 'all-time'.
    • 'today' returns top videos in the past 24 hours. (Default)
    • 'week' returns top videos over past 7 days.
    • 'month' returns top videos over past 30 days.
    • 'all-time' returns top videos.
    • Example: http://mag.ma/420278
  • page. Optional. Default value is 1, highest allowed page number is 10.
  • callback. Optional. Specify a function callback (JSON format only)

Response

   XML Example:

              <?xml version="1.0" encoding="UTF-8"?>
              <channel>
                <created_at type="datetime" nil="true"></created_at>
                <featured type="boolean">false</featured>
                <nsfw type="boolean">false</nsfw>
                <updated_at type="datetime" nil="true"></updated_at>
                <canonical_url>http://mag.ma/</canonical_url>
                <description>List of today's top videos.</description>
              
                <image_small>http://mag.ma/logos/small/missing.png</image_small>
                <image_large>http://mag.ma/logos/large/missing.png</image_large>
                <image_icon>http://mag.ma/logos/icon/missing.png</image_icon>
                <following_count type="integer">0</following_count>
                <followers_count type="integer">0</followers_count>
                <tagline nil="true"></tagline>
              
                <title>Today's Top Video on Magma</title>
                <type>system</type>
                <videos_count type="integer">0</videos_count>
                <website nil="true"></website>
                <videos type="array">
                  <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>
                        &lt;object width=&quot;400&quot; height=&quot;225&quot;&gt;
              
                          &lt;param name=&quot;allowfullscreen&quot; value=&quot;true&quot; /&gt;
                          &lt;param name=&quot;allowscriptaccess&quot; value=&quot;always&quot; /&gt;
              
                          &lt;param name=&quot;movie&quot; value=&quot;http://vimeo.com
                          /moogaloop.swf?clip_id=9749744&amp;amp;show_title=0&amp;amp;
                          show_portrait=0&amp;amp;color=&amp;amp;fullscreen=1&quot; /&gt;
                          &lt;embed src=&quot;http://vimeo.com/moogaloop.swf?clip_id=9749744
                          &amp;amp;show_title=0&amp;amp;show_portrait=0&amp;amp;color=
                          &amp;amp;fullscreen=1&quot; type=&quot;application/x-shockwave-flash&quot; 
                          allowfullscreen=&quot;true&quot; allowscriptaccess=&quot;always&quot;
                          width=&quot;400&quot; height=&quot;225&quot;&gt;&lt;/embed&gt;
              
                        &lt;/object&gt;
                        </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>http://mag.ma/greg/420278</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>
              
                  ...
              
                </videos>
              </channel>
              

Example Usage

    cURL request getting top 10 videos today:
        curl http://mag.ma/leaderboard.xml 

    cURL request getting top 10-20 videos of all-time:
        curl http://mag.ma/leaderboard.xml?interval=all-time&page=2 

 

Return to API Documentation