OpenLibrary API RDF wrapper on Google App Engine

I have written a wrapper to expose api data as RDF. It is written in Python and deployed on Google App Engine. It is only an illustration of Linked Data publication, and in order to get a first feedback, so do not rely on it in your application since the URL or the content will change in the future.

How to use it :

Technical information :

Linked Data Sets :

The following data sets are referenced in the data, with the following heuristics :

  • The wrapper references itself, in properties such as « authors », or « rdf:type ».
  • The lingvoj dataset, for languages
    • heuristic : the openlibrary language key (« /l/eng » for exemple) is parsed, the 3 letter language code is extracted, and an attempt is made to find the corresponding 2-letter language code, with an hardcoded mapping table. The 2-letter code is then appended to the root URI « ». If not found, the 3-letter code is appended to the same root URI.
  • The RDF book mashup, in a « owl:sameAs » property
  • (plus it used to call the sparql endpoint to try to match the « subject » property to a corresponding Library of Congress Subject Heading. However this service has recently been shut down…)

Ontology and properties used :

The following properties are used in the generated RDF :

An exhaustive description of how the Open Library data is mapped to RDF properties can be found on this google spreadsheet.

Feedback on this work is more than welcome. The python code is available on request. Potential improvements are :

  • linking subjects to another controlled vocabulary now that is dead;
  • linking authors to DBPedia;
  • linking countries to geonames;
  • defining a clear ontology of properties;
  • etc…

13 Responses to OpenLibrary API RDF wrapper on Google App Engine

  1. ldosdat dit :

    Well done Thomas! How did you like using google app engine?

  2. Thanks. Well, the GAE development environement is kind of buggy, the limitation on URL request is frustating when you need to do SPARQL queries all around, and it works only in Python, not Java, but overall it is easy to deploy your app. I haven’t tried the other services, like google base, that are also adding value to the service.

  3. taboularasa dit :

    I would be very interested to look at your modified SPARQL Wrapper. Would you be willing to share your code with me for educational purposes?
    Thanks in advance.

  4. Sure, but the email address I got with your comment (dupe-2… is invalid. Could you post a comment agin with another valid address ?

  5. taboularasa dit :

    oops! I didn’t know that my profile was out of date. It’s fixed now. but just in case:
    david at hadto dot net

  6. gwordpressuser dit :

    Hi Thomas,

    great work – thanks for blogging that! Did you also find the AppEngine datastore very enticing regarding storage of the ontology triplets?

    And I’m very interested in sharing your code. Could you pass me a copy? Did you decide on the license?


  7. br5492 dit :

    Hey Thomas – this is so very interesting! I wonder if you would mind sharing your code with me? Thanks in advance. I’m also interested in the app engine datastore – what do you think of it?

    kirby at k2group dot com

  8. Hi – I sent you the code by email. I cannot give any advice on the app engine datastore since this wrapper converts data on the fly and does not store anything – so it does not use the datastore.


  9. akrasnoperov dit :

    Hi Thomas,

    I’m working on semantic project, and I’m trying to figure out the feasibility of using GAE as RDF store + SPARQL endpoint. Would you mind sharing your code with me? Also, any thoughts and advises on the subject would be valuable too.

    Thanks a lot,

  10. I’m also interested to find out, how to use rdf on Google App Engine, but via PHP programming language specifically. Im thinking of using Datastore as a cache, cause its easy to implement.

    Google App Engine PHP

  11. Hi, first of all I think GAE does not support PHP natively, only Java and Python. If you want to use PHP you will have to go through a Java-PHP adapter like Quercus (see for example).
    Then, in PHP, you can use the RAP library (
    Good Luck !

  12. Another request for the code here! I’m looking around at at RDF-on-GAE examples, and I’d be happy to see how you’ve handled this…

  13. Hwei-ru Ling dit :

    Great technical information you’ve provided. I wish to get more info and resources in the future. Google Wonder Wheel

Laisser un commentaire

Choisissez une méthode de connexion pour poster votre commentaire:


Vous commentez à l'aide de votre compte Déconnexion /  Changer )

Photo Google+

Vous commentez à l'aide de votre compte Google+. Déconnexion /  Changer )

Image Twitter

Vous commentez à l'aide de votre compte Twitter. Déconnexion /  Changer )

Photo Facebook

Vous commentez à l'aide de votre compte Facebook. Déconnexion /  Changer )


Connexion à %s

%d blogueurs aiment cette page :