Count Your Retweets with the Tweetmeme API

I didn’t know this until recently, but Tweetmeme has an API for displaying the number of times and URL has been retweeted. A quick request to http://api.tweetmeme.com/url_info?url=[the URL] will return an XML, JSON or PHP response. You can pass the full URL as the argument, or a short URL that goes to the same place.

<result>
<status>success</status>
<story>
<title>Learning CSS Sprites</title>
<url>http://www.webmaster-source.com/2009/11/06/learning-css-sprites/</url>
<media_type>news</media_type>
<created_at>2009-11-06T11:51:30+00:00</created_at>
<url_count>25</url_count>
<tm_link>http://tweetmeme.com/story/257000589</tm_link>
<comment_count>0</comment_count>
<excerpt>Learning CSS Sprites http://bit.ly/3HlYUl</excerpt>
<thumbnail>http://tweetmeme.s3.amazonaws.com/thumbs/257000589.jpg</thumbnail>
</story>
</result>

If you want to see a quick example of how you can use the API, have a look at this WP Recipes snippet: Display the number of tweets for each page or post.