Open Source licenses as JSON
The data is automatically fetched from these repositories every day:
The information is then merged and committed into the repository if changes were made.
License objects have the following fields:
id
β Short identifier specified by spdx.org/licensestitle
β The license name specified by spdx.org/licensesdescription
β A human-readable description of the licensehowToUse
β Instructions on how to implement the licensenote
β Additional information about the licensesisOsiApproved
β Whether this license is OSI approvedisFsfLibre
β Whether this license complies with the definition of free software by the FSFpermissions
(array, see below)conditions
(array, see below)limitations
(array, see below)text
β The license text with[placeholders]
:[fullname]
β The full name or username of the copyright owner[login]
β The copyright owner's username[email]
β The copyright owner's primary email address[project]
β The project name[description]
β The description of the project[year]
β The current year[projecturl]
β The repository URL or other project website
commercial-use
β The software and derivatives may be used for commercial purposes.modifications
β The software may be modified.distribution
β The software may be distributed.private-use
β The software may be used and modified in private.patent-use
β The license provides an express grant of patent rights from contributors.
include-copyright
β A copy of the license and copyright notice must be included with the software.include-copyright--source
β A copy of the license and copyright notice must be included with the software in source form, but is not required for binaries.document-changes
β Changes made to the code must be documented.disclose-source
β Source code must be made available when the software is distributed.network-use-disclose
β Users who interact with the software via network are given the right to receive a copy of the source code.same-license
β Modifications must be released under the same license when distributing the software. In some cases a similar or related license may be used.same-license--file
β Modifications of existing files must be released under the same license when distributing the software. In some cases a similar or related license may be used.same-license--library
β Modifications must be released under the same license when distributing the software. In some cases a similar or related license may be used, or this condition may not apply to works that use the software as a library.
trademark-use
β The license explicitly states that it does NOT grant trademark rights, even though licenses without such a statement probably do not grant any implicit trademark rights.liability
β The license includes a limitation of liability.patent-use
β The license explicitly states that it does NOT grant any rights in the patents of contributors.warranty
β The license explicitly states that it does NOT provide any warranty.
All files are located in the data
directory.
licenses.json
β An array of all license objects without thetext
field.licenses.full.json
β An array of all license objects.license-names.json
β An array of all license IDs.licenses/[id].json
β The license object for[id]
without thetext
field.licenses/[id].txt
β The license text for[id]
.licenses/[id].full.json
β The license object for[id]
.
They are served under https://license-data.moritzruth.de
.
Example: To access data/licenses/0BSD.json, use https://license-data.moritzruth.de/licenses/0BSD.json
npm install spdx-license-data
# or
yarn add spdx-license-data
Usage:
import licenses from "spdx-license-data"
console.log(`There are ${licenses.length} licenses.`)
console.log(`Title of the AFL-3.0 license: ${licenses.find(license => license.id === "AFL-3.0").title}`)
See LICENSE
.