Introduction
The SCANOSS API provides software composition analysis capabilities, enabling developers and organisations to:- Identify open-source components in their codebase
- Detect vulnerabilities in dependencies
- Analyse cryptographic algorithms and implementations
- Retrieve component metadata and licensing information
- Enrich dependencies with security and compliance data
API Endpoints
The SCANOSS API is organised into several functional areas:Cryptography API
Analyse cryptographic algorithms, protocols, and libraries used in software components. Base URL:https://api.scanoss.com/v2/cryptography/
Key Endpoints:
GET /algorithms/component— Get algorithms for a single componentPOST /algorithms/components— Get algorithms for multiple componentsGET /algorithms/range/component— Get algorithms across version rangesGET /hints/component— Get cryptographic hints for a componentGET /algorithms/versions/range/component— Get versions with or without algorithms
Vulnerability API
Access vulnerability intelligence including CVEs, CPEs, and security advisories. Base URL:https://api.scanoss.com/v2/vulnerabilities/
Key Endpoints:
GET /component— Get vulnerabilities for a single componentPOST /components— Get vulnerabilities for multiple componentsGET /cpes/component— Get CPE identifiers for a componentPOST /cpes/components— Get CPE identifiers for multiple components
Component Search API
Search and retrieve information about open-source components. Base URL:https://api.scanoss.com/v2/components/
Key Endpoints:
GET /search— Search components by name, PURL, or attributesGET /versions/component— Retrieve version information for a componentGET /metadata/component— Retrieve component metadata and licensing
Dependency Decoration API
Enrich dependency information with security, licensing, and compliance data. Decoration refers to augmenting a dependency record with additional intelligence (vulnerabilities, licences, cryptographic data) without modifying the original dependency definition. Base URL:https://api.scanoss.com/v2/dependencies/
Key Endpoints:
POST /decorations— Decorate dependencies with vulnerability dataPOST /decorations/licenses— Add licence and compliance informationPOST /decorations/cryptography— Enrich with cryptographic intelligence
Raw Output API
Access raw scan results and low-level component matching data. Base URL:https://api.scanoss.com/scan/
Key Endpoints:
POST /direct— Submit code directly for scanningPOST /fingerprint— Submit file fingerprints for matchingGET /results— Retrieve raw match results
Authentication
All API requests require authentication using an API key.Obtaining an API Key
- Visit SCANOSS Platform
- Sign up or log in to your account
- Navigate to the API Keys section
- Generate a new API key
- Copy the API key for use in your requests
Using Your API Key
Include your API key in the request header:Example with curl
Environment Variable Setup
For convenience, store your API key as an environment variable:Persistent Configuration
Add to your shell profile for persistence:Common Concepts
Package URLs (PURLs)
SCANOSS uses Package URLs (PURLs) as the standard identifier for software components. A PURL follows this format:pkg:github/scanoss/engine@5.0.0pkg:npm/express@4.18.2pkg:maven/org.springframework/spring-core@5.3.23pkg:pypi/django@4.2.0
Version Requirements
Therequirement field accepts semantic version (semver) constraints
to filter results by version range:
>=5.0.0— Greater than or equal to version 5.0.0~1.30.0— Patch-level changes only (approximately equivalent to 1.30.x)^2.0.0— Minor- and patch-level changes only (compatible with 2.x.x)1.0.0— Exact version match
Request Formats
The API supports both GET and POST requests: GET requests are used for single-component queries:Response Format
All API responses follow a consistent JSON structure. Thecomponent
object contains fields specific to the endpoint called, alongside a
top-level status object:
Note: Additional fields are returned within the component object
depending on the endpoint. Refer to each endpoint’s reference page for
the full response schema.
Error Handling
Request-level errors are indicated by standard HTTP status codes:| Code | Meaning |
|---|---|
400 Bad Request | Invalid request format or parameters |
401 Unauthorized | Invalid or missing API key |
404 Not Found | Endpoint or resource not found |
429 Too Many Requests | Rate limit exceeded |
500 Internal Server Error | Unexpected server-side error |