View various OSS licenses.
3 endpoints tagged licenses, each listing its
parameters and possible responses. Search or scroll the index below to
jump to a specific endpoint.
No endpoints match your search.
GET /licenses
Lists the most commonly used licenses on GitHub. For more information, see "Licensing a repository ."
| Name | In | Required | Description |
|---|---|---|---|
featured | query | no | |
per_page | query | no | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
page | query | no | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 304 | Not modified | no |
GET /licenses/{license}
Gets information about a specific license. For more information, see "Licensing a repository ."
| Name | In | Required | Description |
|---|---|---|---|
license | path | yes |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
| 304 | Not modified | no |
GET /repos/{owner}/{repo}/license
This method returns the contents of the repository's license file, if one is detected.
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
ref | query | no | The Git reference for the results you want to list. The ref for a branch can be formatted either as refs/heads/<branch name> or simply <branch name>. To reference a pull request use refs/pull/<number>/merge. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 404 | Resource not found | yes |