# Open Source Licenses API

> Open Source Licenses is a software license API that looks up open source license details by name or identifier. It returns SPDX identifiers, canonical URLs, OSI approval status, legacy IDs, and domain applicability for software, content, or data.

**Endpoint:** `GET https://api.apiverve.com/v1/openlicenses`  
**Category:** Data Lookup  
**Cost:** 1 credit per call  
**Canonical page:** https://apiverve.com/marketplace/openlicenses

## Overview

Pass any license name or identifier to retrieve its official metadata. The API checks the record and returns the full name, canonical URL, SPDX ID, legacy identifiers, and whether it is active, retired, or superseded. It also flags applicability across software, content, or data domains, along with a compatible domains list. Coverage is the full SPDX License List (CC0, refreshed monthly) on top of the Open Knowledge Foundation records, so 0BSD, BlueOak-1.0.0, MIT-0, WTFPL and Unicode-DFS-2016 resolve. Paid plans add obligations: permissions, conditions and limitations for about 45 common licences (from choosealicense.com, MIT), and a copyleft level (none, weak, strong or network).

## Authentication

Every call carries your key in an `x-api-key` header. The same key works across the whole
APIVerve catalog — there are no per-API subscriptions. Responses always use the same three
top-level keys: `status`, `error`, and `data`.

## Example request

```bash
curl "https://api.apiverve.com/v1/openlicenses?name=MIT" \
  -H "x-api-key: YOUR_API_KEY"
```

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | string | Yes | The name of the open source license to get information about. Accepts SPDX ids, full titles and common written forms (Apache 2.0, GPLv3, The MIT License), plus SPDX expressions like MIT OR Apache-2.0 |

## Response fields

- `domain_content` — boolean · Whether the licence is intended for content
- `domain_data` — boolean · Whether the licence is intended for data
- `domain_software` — boolean · Whether the licence is intended for software
- `legacy_ids` — array · Older identifiers this licence has been known by
- `license` — string · SPDX identifier of the licence
- `name` — string · Full name of the licence
- `license_url` — string · Canonical URL of the licence text
- `license_status` — string · Whether the licence is active, retired or superseded
- `isOsiApproved` — boolean · Whether the license is OSI approved
- `compatibleDomains` — array · List of compatible domains (software, content, data)

## Sample response

```json
{
  "status": "ok",
  "error": null,
  "data": {
    "domain_content": false,
    "domain_data": false,
    "domain_software": true,
    "legacy_ids": [
      "mit-license"
    ],
    "license": "MIT",
    "name": "MIT License",
    "license_url": "https://opensource.org/licenses/MIT",
    "license_status": "active",
    "isOsiApproved": true,
    "compatibleDomains": [
      "software"
    ]
  }
}
```

## Use cases

- **Dependency Compliance Auditing** — CI pipelines check third-party package licenses against OSI approval and active status flags before merging pull requests.
- **SBOM Metadata Enrichment** — Software asset managers match SPDX identifiers and canonical URLs to internal components when assembling software bills of materials.
- **Package Registry Verification** — When developers publish a package, code repositories verify that declared license names map to active SPDX IDs.
- **Dataset Ingestion Governance** — Flag datasets governed by retired licenses or terms not meant for data before ingesting them into analytics environments.

## SDKs

- **npm** — `npm install @apiverve/openlicenses` (https://www.npmjs.com/package/@apiverve/openlicenses)
- **NuGet** — `dotnet add package APIVerve.API.OpenSourceLicenses` (https://www.nuget.org/packages/APIVerve.API.OpenSourceLicenses)
- **Source** — https://github.com/apiverve/openlicenses-api

## More

- Full reference: https://docs.apiverve.com/ref/openlicenses
- Get an API key: https://dashboard.apiverve.com
- Full catalog: https://apiverve.com/marketplace
