Check Licenses

Results

License Count

API Documentation

This API helps in detecting the licenses used in different language dependency files.

Supported Formats

Language File Package Manager
Java pom.xml Maven
Java build.gradle Maven
Scala build.sbt Maven
JavaScript package.json npm
JavaScript package-lock.json npm
JavaScript yarn.lock npm
C# (.NET) packages.config NuGet
C# (.NET) *.csproj NuGet

Calling API from curl

curl -s -F "file=@./pom.xml" https://license.hiqdev.io/stats | jq
{
  "Apache-2.0": 4,
  "BSD-2-Clause": 1,
  "MIT": 1
}
curl -s -F "file=@./yarn.lock" https://license.hiqdev.io/stats | jq
{
  "MIT": 471,
  "CC-BY-4.0": 1,
  // ... more results ...
}

Calling API from JavaScript


    // Example using Fetch API in JavaScript (Node.js environment)
    const fs = require('fs');
    const fetch = require('node-fetch');

    const fileContents = fs.readFileSync('path/to/your/file.json'); // Replace with your file path
    const formData = new FormData();
    formData.append('file', fileContents);

    fetch('https://license.hiqdev.io/stats', {
        method: 'POST',
        body: formData
    })
    .then(response => response.json())
    .then(data => console.log(data))
    .catch(error => console.error('Error:', error));
 

Calling API using Postman

  1. Open Postman and start a new request.
  2. Select 'POST' as the request method.
  3. Enter the API URL: https://license.hiqdev.io/stats
  4. Under the 'Body' tab, select 'form-data'.
  5. In the form-data section, enter 'file' as the key, and select the file type as 'File' from the dropdown.
  6. Upload the file (e.g., pom.xml, package.json) by clicking on the 'Select Files' button next to the key.
  7. Hit 'Send' to make the request and view the response in the 'Response' section.