The Details

Making a Request

To access the data, you simply request a url from vimeo.com and let us know what you want. The urls are simple, they can be built with the following format:

http://vimeo.com/api/username/request/output

username: The username can either be the url name, or user id of the user.

output: Specify the output type. We currently offer JSON, PHP, and XML formats.

request: The following requests can be made. More soon...

user_info
clips
subscriptions
contacts_like
contacts_clips
appears_in
all_user_clips
User info for the specified user
Videos created by user
Videos the user is subscribed to
Videos that the user's contacts like
Videos that the user's contacts created
Videos that the user appears in
Videos that the user appears in AND created

To get an xml dump of videos that you appear in, you'd make this request:

http://vimeo.com/api/ted/appears_in/xml

That is pretty much it! Simple, eh?

The Data

For Clips
title
url
clip_id
caption
thumbnail_small
thumbnail_medium
thumbnail_large
user_name
user_url
uploaded_on
user_thumbnail_small
user_thumbnail_large
stats_number_of_likes
stats_number_of_views
stats_number_of_comments
tags
Clip Title
URL to the Video Page
Clip ID
The caption or description of the video
URL to a small version of the thumbnail
Medium
Large
The user name of the video's uploader
The URL to the user profile
The date/time the video was uploaded on
Small user thumbnail
Large
# of likes
# of views
# of comments
comma separated list of tags
For User Info
id
display_name
created_on
location
url
bio
profile_url
videos_url
total_videos_uploaded
total_videos_appears_in
total_videos_liked
total_contacts
total_albums
total_channels
thumbnail_small
thumbnail_medium
thumbnail_large
User ID
User name
Date the user signed up
Examples: NYC, Home, 10012
User supplied url
The bio information from the user profile
URL to the user profile
URL to the video list for this user
Total # of videos uploaded
Total # of videos user appears in
Total # of videos liked by user
Total # of contacts
Total # of albums
Total # of channels moderated by user
Small Thumbnail
Medium Thumbnail
Large Thumbnail

JSON (Javascript)

All of the different types of feeds have the same data in their different formats. The JSON format is used by including the javascript feed directly from Vimeo.com's servers. You tell us what data you want and which function to give it to, then you simply define the function that uses the data. There is a complete example of this below.

PHP

You can also request a serialized php array. You can run it through unserialize() and you'll have an array of arrays filled with video data.

XML

And finally, we offer an XML version of the data. This is a very very simple xml format that should be pretty easy for you to parse. Simply use xml as the output type and you'll get what you need.

Here's an example of an XML video. You'll probably have a bunch of these returned. (URLs have been shortened for formatting, you'll get the full url in your results).

<?xml version="1.0" encoding="utf-8"?>
<clips>
     <clip>
          <title>Lobster</title>
          <url>http://www.vimeo.com/148651</url>
          <clip_id>148651</clip_id>
          <caption>In NYC, they will deliver ...</caption>
          <thumbnail_small>http://90.media.vimeo.com/...</thumbnail_small>
          <thumbnail_medium>http://86.media.vimeo.com/...</thumbnail_medium>
          <thumbnail_large>http://26.media.vimeo.com/... </thumbnail_large>
          <user_name>Ted!</user_name>
          <user_url>http://www.vimeo.com/ted</user_url>
          <uploaded_on>2007-08-09 15:37:46</uploaded_on>
          <user_thumbnail_small>http://86.media.vimeo.com/...</user_thumbnail_small>
          <user_thumbnail_large>http://41.media.vimeo.com/...</user_thumbnail_large>
          <stats_number_of_likes>3</stats_number_of_likes>
          <stats_number_of_views>191</stats_number_of_views>
          <stats_number_of_comments>6</stats_number_of_comments>
          <tags>lobster, timelapse, gawker, food, eating</tags>
     </clip>
</clips>

Here's an example of the response from a user_info call

<?xml version="1.0" encoding="utf-8"?>
<users>
  <user>
     <id>151542</id>
     <display_name>Ted Roden</display_name>
     <created_on>2007-01-13 15:58:10</created_on>
     <location>NYC</location>
     <url>http://tedroden.com</url>
     
     <bio>
       Hi! I live in NYC. I work at Vimeo. I am a programmer. ...
     </bio>
     
     <profile_url>http://vimeo.com/ted</profile_url>
     <videos_url>http://vimeo.com/ted/videos</videos_url>
     
     <total_videos_uploaded>55</total_videos_uploaded>
     <total_videos_appears_in>66</total_videos_appears_in>
     <total_videos_liked>585</total_videos_liked>
     <total_contacts>54</total_contacts>
     <total_albums>0</total_albums>
     <total_channels>5</total_channels>
     
     <thumbnail_small>http://40.media.vimeo.com/....jpg</thumbnail_small>
     <thumbnail_medium>http://10.media.vimeo.com/....jpg</thumbnail_medium>
     <thumbnail_large>http://40.media.vimeo.com/....jpg</thumbnail_large>
  </user>
</users>

How about a quick example?

The easiest way to access the data is probably via javascript, here's an example. You can copy this to your computer and run it. Then do something neat and show it off in the forums.

<html>
<head>
<script type="text/javascript">
<!--
// This just goes through the list of clips we get
// and shows them on the page... you can doi better than this!
function showMyThumbs(stuff) {
// show some stats
document.getElementById("stats").innerHTML = "Loaded " + stuff.length + " thumbs";

// setup the thumbs list.
var thumbs = document.getElementById("thumbs");
thumbs.innerHTML = "";
for(var i = 0; i < stuff.length; ++i) {
thumbs.innerHTML += 
"<p><img src=" + stuff[i].thumbnail_medium + "><BR>" +
"<a href=" + stuff[i].url + ">" +
stuff[i].title + "</a></p>";
}
}

// this is just a fancy way of loading the javascript from vimeo.
function initPage() {

// user name of clips to load
var vimeoUserName = "ted";

// we need to tell vimeo which function to call
var myVimeoCallback = "showMyThumbs";

// ok, set up the url
var url = "http://vimeo.com/api/" + vimeoUserName + "/clips/js";
url += "?callback=" + myVimeoCallback;

var js = document.createElement("script");
js.setAttribute("language", "JavaScript");
js.setAttribute("type", "text/javascript");
js.setAttribute("src", url);
document.getElementsByTagName("head").item(0).appendChild(js);
}

// setup the onload
window.onload = initPage;
//   -->
</script>

</head>

<body>
<div id="stats">&nbsp;</div>
<div id="thumbs">Loading ...</div>
</body>

</html>