Skip to main content
POST
/
v2
/
components
/
statistics
Get the statistics for the specified components
curl --request POST \
  --url https://api.scanoss.com/v2/components/statistics \
  --header 'Content-Type: application/json' \
  --data '
{
  "components": [
    {
      "purl": "pkg:github/scanoss/engine@1.0.0"
    },
    {
      "purl": "pkg:github/scanoss/scanoss.py@v1.30.0"
    }
  ]
}
'
{
  "component_statistics": [
    {
      "purl": "pkg:github/scanoss/engine@5.0.0",
      "version": "5.0.0",
      "statistics": {
        "total_source_files": 156,
        "total_lines": 25430,
        "total_blank_lines": 3420,
        "languages": [
          {
            "name": "C",
            "files": 89
          },
          {
            "name": "C Header",
            "files": 45
          }
        ]
      }
    }
  ],
  "status": {
    "status": "SUCCESS",
    "message": "Component statistics successfully retrieved"
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.scanoss.com/llms.txt

Use this file to discover all available pages before exploring further.

Body

application/json

Represents a list of software component to be analyzed by SCANOSS API services. Allows analysis of multiple software components in a single API call, improving performance over individual requests.

Represents a list of software component to be analyzed by SCANOSS API services. Allows analysis of multiple software components in a single API call, improving performance over individual requests.

components
Array of component requests to analyze · object[]
required

Response

A successful response.

component_statistics
Component statistic details · object[]
status
object

Detailed response details.