Request Visual Studio Code Extension Stats from Marketplace
Visual Studio Code (VSCode) marketplace server collects information about installations and updates for every extension published on market place. It can be requested through REST API endpoint.
To get extension GUID use
> vsce show publisher.extension-name --json
Find "extensionId" in console output and send HTTP POST request to (3) REST endpoint.
POST https://marketplace.visualstudio.com/_apis/public/gallery/extensionquery HTTP/1.1
content-type: application/json
accept: application/json;api-version=3.0-preview.1
{
filters: [{
criteria: [{
filterType: 4,
value: "your-ext-guid"
}]
}],
assetTypes: [],
flags: 0x100
};
Find in response text install and updatCount statistics
"statistics": [
{
"statisticName": "install",
"value": 25908
},
{
"statisticName": "updateCount",
"value": 60984
}
]
Links
- Original post from reddit.com
- Gallery service source from https://github.com/microsoft/vscode
- VSCode Marketplace REST endpoint