Twitpic API for getting pictures out

I’ve been using Twitpic either via TwitterFon on my iPhone or Tweetie from my desktop for Twitter, but one thing struck me last night: Twitpic doesn’t allow me to get my content back out.

So here’s my fix: http://twitpicapi.appspot.com/

Twitpic JSON API

I’ve created an API that scrapes the data straight off the Twitpic site to get your images back out.

I’ve not gone so far as creating integration to Flickr (which actually where I want to put my images), mostly because that exists already.

The JSON API is easy to use, but I’ve had to limit it to one page at a time (because the backend processing takes too long).

http://twitpicapi.appspot.com/

Usage and examples are explained, but it’s pretty self explanitary (and it supports JSONP too):

http://twitpicapi.appspot.com/rem?callback=mypics

The service will resolve to the original url of your image too, but annoyingly, the title/description isn’t always present, since it depends on your client sending it along at the same time (TwitterFon does this, but Tweetie doesn’t).

Open Source

With any hacking I play around with, I’ve made the project open source, and all the code is available on GitHub here: http://github.com/remy/twitpic-json

Feel free to log issues, fork it and make it better.

Experiment

In addition to GitHub lovelyness, this is my first Google App Engine project written in Python (which I’ve not written before).

I was a 2 hour hack project, the initial source of which came from Simon Willison‘s JSON-time project on GitHub, and then I hacked from there, occasionally checking out the manual :-)

It wasn’t too painful, though I definitely thought Python was more OO that my experience (though it’s likely I screwed up!).

I’d like to move Twivatar across to App Engine at some point to reduce the load on my database, and I needed an excuse to play with Python, so this was an attempt to scratch an itch.

5 Responses to “Twitpic API for getting pictures out”

  1. It’s good man thanks!!

    twitter.com/sonergonul
    friendfeed.com/sonergonul

  2. You should checkout Pikchur.com .. they have an API (http://pikchur.com/api) and much more to get your pics out. They allow you to post via mobile, etc to multiple sources.

  3. Nice work… i am just wonder whether we can get the thumbnail of latest image uploaded from my twitpic account without providing image name ? This is like tweet api which returns my latest 20 tweets ???

  4. Hi, can u return data in json format … so that we can easily parse in objective c… format something like mypics({“id” = “somevalue”,”twitter_url” = “somevalue”}) and also is it possible to know how many pages are available…. so that we can easily navigate through all the pages.

  5. Hello,

    I wanted to use this but I don’t know how. Basically what do i need to do to show my twitpic pictures on a page which I can design with css afterwards.

    Cheers,

Leave a Reply
Not required

CODE: Please escape code and wrap in <pre><code>, doing so will automatically syntax highlight