# Software Licenses API
> The full SPDX License List as an API — all 729 software licenses with metadata and the complete license text for each. Look up any license by its SPDX id (e.g. MIT, Apache-2.0, GPL-3.0-only, MPL-2.0) and get the exact, canonical license text plus its name, reference URL, see-also links and standard header. Search or list licenses by name/id and filter by OSI-approved (Open Source Initiative), FSF-libre (Free Software Foundation) or deprecated status. Ideal for SBOM / license-compliance tooling, package managers, repository scanners, legal review, and open-source governance dashboards.

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/licenses-api/..."
```

## Pricing
- **Free** (Free) — 4,500 calls/Mo, 2 req/s
- **Starter** ($6/Mo) — 52,000 calls/Mo, 8 req/s
- **Pro** ($15/Mo) — 265,000 calls/Mo, 20 req/s
- **Mega** ($37/Mo) — 1,320,000 calls/Mo, 50 req/s

## Endpoints

### Licenses

#### `GET /v1/license` — One license by SPDX id, with full text

**Parameters:**
- `id` (query, required, string) — SPDX license id, e.g. MIT, Apache-2.0, GPL-3.0-only Example: `MIT`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/licenses-api/v1/license?id=MIT"
```

**Response:**
```json
{
    "data": {
        "license": {
            "name": "MIT License",
            "seeAlso": [
                "https://opensource.org/license/MIT",
                "https://gitlab.freedesktop.org/xorg/xserver/-/blob/dd5c2595a42d3ff0c4f18d9b53d1f6c3fd934fd4/COPYING#L365-389"
            ],
            "licenseId": "MIT",
            "reference": "https://spdx.org/licenses/MIT.html",
            "isFsfLibre": true,
            "licenseText": "MIT License\n\nCopyright (c) <year> <copyright holders>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and\nassociated documentation files (the \"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the\nfollowing conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial\nportions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT\nLIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO\nEVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE 
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/list` — Paginated license list (metadata) + filters

**Parameters:**
- `osi_approved` (query, optional, string) — true = OSI-approved only
- `fsf_libre` (query, optional, string) — true = FSF-libre only
- `deprecated` (query, optional, string) — false = exclude deprecated ids
- `limit` (query, optional, string) — Results per page (1-200, default 50) Example: `50`
- `offset` (query, optional, string) — Pagination offset Example: `0`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/licenses-api/v1/list?limit=50&offset=0"
```

**Response:**
```json
{
    "data": {
        "count": 50,
        "limit": 50,
        "total": 729,
        "offset": 0,
        "filters": {
            "fsf_libre": null,
            "deprecated": null,
            "osi_approved": null
        },
        "licenses": [
            {
                "name": "BSD Zero Clause License",
                "licenseId": "0BSD",
                "reference": "https://spdx.org/licenses/0BSD.html",
                "isFsfLibre": false,
                "isOsiApproved": true,
                "isDeprecatedLicenseId": false
            },
            {
                "name": "3D Slicer License v1.0",
                "licenseId": "3D-Slicer-1.0",
                "reference": "https://spdx.org/licenses/3D-Slicer-1.0.html",
                "isFsfLibre": false,
                "isOsiApproved": false,
                "isDeprecatedLicenseId": false
            },
            {
                "name": "Attribution Assurance License",
                "licenseId": "AAL",
                "reference": "https://spdx.org/licenses/AAL.html",
                "isFsfLibre": false,
                "isOsiApproved": true,
                "isDeprecatedLicenseId": false
            },
            {
                "name": "Abstyles License",
                "licenseId": "Abstyles",
                "reference": "https://spdx.org/licenses/Abstyles.html",
                "isFsfLibre": false,
                "isOsiApproved": false,
                "isDeprecatedLicenseId": false
        
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/search` — Search licenses by id / name + filters

**Parameters:**
- `q` (query, optional, string) — Search term matched against id and name Example: `apache`
- `osi_approved` (query, optional, string) — true = OSI-approved only
- `fsf_libre` (query, optional, string) — true = FSF-libre only
- `deprecated` (query, optional, string) — false = exclude deprecated ids
- `limit` (query, optional, string) — Results per page (1-100, default 20) Example: `20`
- `offset` (query, optional, string) — Pagination offset Example: `0`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/licenses-api/v1/search?q=apache&limit=20&offset=0"
```

**Response:**
```json
{
    "data": {
        "count": 3,
        "limit": 20,
        "query": "apache",
        "total": 3,
        "offset": 0,
        "filters": {
            "fsf_libre": null,
            "deprecated": null,
            "osi_approved": null
        },
        "results": [
            {
                "name": "Apache License 1.0",
                "licenseId": "Apache-1.0",
                "reference": "https://spdx.org/licenses/Apache-1.0.html",
                "isFsfLibre": true,
                "isOsiApproved": false,
                "isDeprecatedLicenseId": false
            },
            {
                "name": "Apache License 1.1",
                "licenseId": "Apache-1.1",
                "reference": "https://spdx.org/licenses/Apache-1.1.html",
                "isFsfLibre": true,
                "isOsiApproved": true,
                "isDeprecatedLicenseId": false
            },
            {
                "name": "Apache License 2.0",
                "licenseId": "Apache-2.0",
                "reference": "https://spdx.org/licenses/Apache-2.0.html",
                "isFsfLibre": true,
                "isOsiApproved": true,
                "isDeprecatedLicenseId": false
            }
        ]
    },
    "meta": {
        "timestamp": "2026-05-31T07:16:12.736Z",
        "request_id": "d811c80d-6f10-4f9d-94ca-fa8093ba912d"
    },
    "status": "ok",
    "message": "Licenses searched",
    "success": true
}
```

### Meta

#### `GET /v1/meta` — Totals & breakdown

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/licenses-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "note": "Identify and retrieve software licenses by SPDX id (e.g. MIT, Apache-2.0, GPL-3.0-only). /v1/license returns the full license text; /v1/search and /v1/list return metadata. Flags: OSI-approved (Open Source Initiative), FSF-libre (Free Software Foundation), deprecated SPDX id.",
        "total": 729,
        "fields": [
            "licenseId",
            "name",
            "isOsiApproved",
            "isFsfLibre",
            "isDeprecatedLicenseId",
            "reference",
            "seeAlso",
            "standardLicenseHeader",
            "licenseText"
        ],
        "source": "SPDX License List (spdx.org/licenses)",
        "fsf_libre": 127,
        "deprecated": 32,
        "osi_approved": 150,
        "license_list_version": "3dfd9aa"
    },
    "meta": {
        "timestamp": "2026-05-31T07:16:12.782Z",
        "request_id": "ec79c5f7-80f6-4cef-9991-c8e2183df354"
    },
    "status": "ok",
    "message": "Meta retrieved",
    "success": true
}
```


---
Marketplace page: https://www.oanor.com/api/licenses-api
OpenAPI spec: https://www.oanor.com/api/licenses-api/openapi.json
