licenses
Get the license for a repository
This method returns the contents of the repository's license file, if one is detected.
Similar to Get repository content, this method also supports custom media types for retrieving the raw license content or rendered license HTML.
get/repos/{owner}/{repo}/license
Path parameters
ownerstring required
The account owner of the repository. The name is not case sensitive.
repostring required
The name of the repository without the .git extension. The name is not case sensitive.
Response
Response
Example response
{
"license": {
"key": "mit",
"name": "MIT License",
"url": "https://api.github.com/licenses/mit",
"spdx_id": "MIT",
"node_id": "MDc6TGljZW5zZW1pdA=="
}
}