RESTful Web Service to get the text of well-known licenses

The licensius site provides technologies to support smart licensing.

Licensius includes a set of HTTP RESTful Web Services. One of them retrieves programmatically the text of 179 well-known licenses.
You can read the full documentation in the testeable swagger.
Nevertheless this post comments the steps towards getting the text of a license.

1. Get the available licenses in the RDFLicense dataset

You may want first a query to see all the licenses we have in the RDFLicense dataset (see our paper at JURIX2014). If you query...

And you will get a JSON list of URIs of valid RDFLicenses.

[ "", 

2. Get the languages for which the licenses text is available

You may want to query for the first of the licenses,, like this:

Getting as a result:

["en", ]

3. Get the license text

And finally, the service getlicensetext with two parameters (uri of a RDFLicense and a ISO 639-1 language code). From the previous call, we learnt that an English version was available...

The result is plain text:

Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 
Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. 

The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software

Have fun!