Sample - GitHub REST API
GET/licenses

List commonly used licenses

Lists the most commonly used licenses available on GitHub. Use featured to limit results to featured licenses, and use page and per_page to paginate the results.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

3 parameters
featuredbooleanoptional
When true, return only featured licenses.
per_pageintegeroptional
Number of results per page, up to 100. Defaults to 30 when omitted.
Default:30
pageintegeroptional
Page number to retrieve. Defaults to 1 when omitted.
Default:1

2 status codes
200Returns an array of commonly used license objects containing each license's key, name, URL, SPDX identifier, node identifier, and HTML URL.
keystringrequired
namestringrequired
urlstringrequired
spdx_idstringrequired
node_idstringrequired
html_urlstringoptional
304Returns no updated representation when the requested resource has not changed.

Error handling

per_page must not exceed 100, and page identifies the results page to retrieve. featured must be a boolean when provided.