CTAN Comprehensive TeX Archive Network

Querying the CTAN Database with JSON – List of Licenses

The list of licenses can be obtained under the URL

http://www.ctan.org/json/1.1/licenses

The result is a JSON file as in the following listing:

[ {"key":"apache2","name":"Apache License, version 2.0","free":true},
  {"key":"artistic","name":"Perl Artistic License","free":false},
  {"key":"artistic2","name":"Perl Artistic License, version 2","free":true},
  {"key":"bsd","name":"BSD Style License","free":true},
  {"key":"bsd2","name":"FreeBSD License","free":true},
  {"key":"bsd3","name":"Simplified BSD License","free":true},
  {"key":"bsd4","name":"BSD License","free":true},
  {"key":"fdl","name":"Free Documentation License","free":true},
  {"key":"gfl","name":"The GUST Font License (GFL)","free":true},
  {"key":"gfsl","name":"The GUST Font Source License (GFSL)","free":true},
  {"key":"gpl","name":"GNU General Public License","free":true},
  {"key":"gpl2","name":"GNU General Public License, version 2","free":true},
  {"key":"gpl3","name":"GNU General Public License, version 3","free":true},
  … ]  

The licenses contained in this list are ordered ascending on the key of the license.

license

Each license is represented as JSON object. This object has several attributes:

key
This attribute contains the key of the license. This attribute is mandatory.
name
This attribute contains the printable name of the license.
free
This attribute contains the indication whether the license is considered free. It can take the values true or false.

Selecting

The list can be restricted to contain part of the licenses only. The condition is that the key starts with a given string. This string is specified with the parameter key.

http://www.ctan.org/json/1.1/licenses?key=gpl

The following example extracts all topics for which the key starts with the letter n:

http://www.ctan.org/json/1.1/licenses?key=n
Guest Book Sitemap Contact Contact Author