# How do I check the license of an npm or PyPI package?

**Short answer:** Example: a package declaring MIT, shipped commercially: Yes.

Packages declare their license in registry metadata. Rightshold reads it for you: pass the package page URL as source_url.

## Example: a package declaring MIT, shipped commercially — Yes

License: [MIT License](https://opensource.org/license/mit) (`MIT`, curated)

- Every use you described is granted by MIT, and nothing you described is prohibited.

Duties: attribution, license_notice

## Context
- A declared license is the publisher's claim; check the LICENSE file for anything unusual. Packages with no declared license have no grant: no license found is not permission.

## Sources
- [npm package.json license field](https://docs.npmjs.com/cli/v10/configuring-npm/package-json#license)
- [PyPI core metadata: License-Expression](https://packaging.python.org/en/latest/specifications/core-metadata/#license-expression)

## Check it yourself (free, no key)
```json
{
  "tool": "check_license",
  "arguments": {
    "license": "MIT",
    "intended_use": {
      "commercial_use": true,
      "redistribution": true
    }
  }
}
```
REST: POST https://www.rightshold.com/v1/licenses/check

_Computed from Rightshold's license profiles; not legal advice. Updated 2026-10-19. JSON: https://www.rightshold.com/answers/how-to-check-an-npm-or-pypi-package-license.json_