CTAN Comprehensive TeX Archive Network

Query­ing the CTAN Database with JSON – List of Li­censes

The list of li­censes can be ob­tained un­der the URL


The re­sult is an XML file as in the fol­low­ing list­ing:

[ {"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 li­censes con­tained in this list are or­dered as­cend­ing on the key of the li­cense.


Each li­cense is rep­re­sented as JSON ob­ject. This ob­ject has sev­eral at­tributes:

This at­tribute con­tains the key of the li­cense. This at­tribute is manda­tory.
This at­tribute con­tains the print­able name of the li­cense.
This at­tribute con­tains the in­di­ca­tion whether the li­cense is con­sid­ered free. It can take the val­ues true or false.


The list can be re­stricted to con­tain part of the li­censes only. The con­di­tion is that the key starts with a given string. This string is spec­i­fied with the pa­ram­e­ter key.


The fol­low­ing ex­am­ple ex­tracts all top­ics for which the key starts with the let­ter n:

Guest Book Sitemap Contact Contact Author