Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I wonder if there is an API available for using contents from the Ubuntu Software Center on my webpage. I know The Ubuntu Apps Directory website contains an almost complete database of applications available in Ubuntu. There are all categories, it contains ratings, images, descriptions and also the download button. So, is it possible to use some of the content available on this page elsewhere?

share|improve this question
    
See also askubuntu.com/questions/139032/… for the local API –  David Planella May 25 '12 at 23:34

1 Answer 1

up vote 12 down vote accepted

Well, yes. Keep in mind that

  1. The only acknowledged consumer of this API is the Software Center project. The syntax can and probably will be viciously deprecated in the future, with no regard for third parties.
  2. In the future, the Software Center may come to multiplex applications from other source APIs, such as those of Mozilla Marketplace and Appstream. As such this API may not be comprehensive.
  3. If you abuse this API you will be blocked.

With all those caveats aside

Applications

https://software-center.ubuntu.com/api/2.0/applications/$LANG/ubuntu/$SERIES/$ARCH/

will return a JSON document detailing third party applications currently installable for a given language code, release name prefix, and architecture. For example, here are the Software Center items currently provided for Ubuntu 12.04.

For technical reasons that would be constitutionally painful to explain, applications available from the Ubuntu archives (eg the Universe) are handled by a data package: app-install-data. You can get the list with apt-get source -t $SERIES app-install-data and handle it on your server locally; it doesn't change very often.

Reviews

http://reviews.ubuntu.com/reviews/api/1.0/reviews/filter/$LANG/ubuntu/$SERIES/$VERSION/$PACKAGE/

Will get you reviews for a package. Note that most fields here can be replaced with any. For example, here are reviews of Warsaw written for 11.10.

Ratings

http://reviews.ubuntu.com/reviews/api/1.0/review-stats/ubuntu/$SERIES/

Will get you all ratings for all packages.

Images

http://screenshots.ubuntu.com/thumbnail-with-version/$PACKAGE/$VERSION
http://screenshots.ubuntu.com/screenshot-with-version/$PACKAGE/$VERSION

Will get you the thumbnail and screenshot for an application. For example, here is VLC's latest screenshot.

Other minor metadata

/usr/share/software-center/softwarecenter/distro/Ubuntu.py
/usr/share/software-center/softwarecenter/backend/piston/

For more API fun, visit these paths in your file browser. It's all in very readable Python. There's a lot of miscellanea for things like pagination, filtering, licensing text, review statistics, etcetera that you might be interested in:

share|improve this answer
    
Problem.. this do not return all apps or askubuntu.com/questions/244186/… –  Voidcode Jan 17 '13 at 10:12
    
And there is no way to get the app-reviews in smart way: askubuntu.com/questions/236501/… –  Voidcode Jan 17 '13 at 10:14
    
How can I get categories only? –  Ionică Bizău May 30 at 8:48

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.