Package API
This API provides information about packages across different ecosystems.
Endpoint
GET /api/package/{ecosystem}/{packageName}
Parameters
{ecosystem}
(string): The package ecosystem (e.g., "pypi", "conda"){packageName}
(string): The full package name- For PyPI: Use the package name (e.g., "flask")
- For Conda: Use the format
<channel>/<package-name>
(e.g., "conda-forge/flask")
Response
The API returns a JSON object with the following structure:
{
"ecosystem": string,
"name": string,
"source": Score,
"pkg": Package
}
Score
An object containing detailed scoring information about the package:
{
timestamp: Date;
last_updated?: Date;
source_url: string;
maturity: MaturityScore;
health_risk: HealthRiskScore;
packages: Package[];
ecosystem_destination: {
pypi: string | null;
npm: string | null;
conda: string | null;
};
license: boolean;
license_kind: boolean;
license_modified: boolean;
}
MaturityScore
{
value: MaturityValue;
notes: string[];
}
MaturityValue
A string representing the maturity of the package. Possible values are:
- "Mature"
- "Legacy"
- "Experimental"
- "Unknown"
- "Placeholder"
HealthRiskScore
{
value: HealthRiskValue;
notes: string[];
}
HealthRiskValue
A string representing the health risk of the package. Possible values are:
- "Healthy"
- "Caution Needed"
- "Moderate Risk"
- "High Risk"
- "Unknown"
- "Placeholder"
Package
An object containing information about the package:
{
ecosystem: string;
name: string;
version?: string;
release_date?: Date;
health_risk?: {
value: HealthRiskValue | null;
notes: string[];
};
}
Example
Request:
GET /api/package/pypi/flask
Response:
{
"ecosystem": "pypi",
"name": "flask",
"source": {
"timestamp": "2024-09-10T11:49:21.627Z",
"last_updated": "2024-09-01T16:04:14.000Z",
"source_url": "https://github.com/pallets/flask",
"license": "BSD-3",
"license_kind": "BSD",
"license_modified": false,
"ecosystem_destination": {
"pypi": "flask",
"npm": null,
"conda": null
},
"maturity": {
"notes": [],
"value": "Mature"
},
"health_risk": {
"notes": [],
"value": "Healthy"
}
},
"pkg": {
"ecosystem": "PyPI",
"name": "flask",
"version": "3.0.3",
"release_date": "2024-04-07T19:26:08.000Z",
"health_risk": {
"notes": [],
"value": null
}
}
}