API Documentation

The Winget Package API provides fast and reliable access to Windows Package Manager package information.

Base URL
"https://winget-pkg-api.onrender.com"
API Version
v1

Authentication

All API requests require authentication using an API key passed in the request header.

Example Request Headerhttp
X-API-Key: your-api-key-here

Rate Limiting

The API implements rate limiting to ensure fair usage and optimal performance.

Rate Limit
100
requests per second
Error Code
429
Too Many Requests
Tracking
By IP Address
Per client tracking
Rate Limit Exceeded Response
{
"error": "Rate limit exceeded"
}

Error Handling

The API uses conventional HTTP response codes to indicate success or failure.

200 - Success

Request completed successfully

{
"message":"pong"
}
400 - Bad Request

Missing or invalid parameters

{
"error":"Query parameter 'q' is required"
}
401 - Unauthorized

Invalid or missing API key

{
"error":"Invalid API key"
}
429 - Too Many Requests

Rate limit exceeded

{
"error":"Rate limit exceeded"
}
500 - Internal Server Error

Server error occurred

{
"error":"Failed to search packages"
}
GET
"/api/v1/ping"

Health Check

Check if the API is running and accessible

Example Request
curl -X GET "https://api.winget.dev/api/v1/ping" \
-H "X-API-Key: your-api-key-here"
Success Response
{
"message": "pong"
}
Error Response
{
"error": "Invalid API key"
}
GET
"/api/v1/packagename"

Search by Package Name

Search for packages by their package name

Parameters
"name"
string
required

Package name to search for

Example Request
curl -X GET "https://api.winget.dev/api/v1/packagename?name=example" \
-H "X-API-Key: your-api-key-here"
Success Response
{
"results": [
{
"PackageIdentifier": "Microsoft.VisualStudioCode",
"PackageName": "Visual Studio Code",
"Publisher": "Microsoft Corporation",
"ShortDescription": "Code editor redefined and optimized for building and debugging modern web and cloud applications.",
"Author": "Microsoft"
}
]
}
Error Response
{
"error": "Query parameter 'name' is required"
}
GET
"/api/v1/packageidentifier"

Search by Package Identifier

Search for packages by their unique package identifier

Parameters
"identifier"
string
required

Package identifier to search for

Example Request
curl -X GET "https://api.winget.dev/api/v1/packageidentifier?identifier=example" \
-H "X-API-Key: your-api-key-here"
Success Response
{
"results": [
{
"PackageIdentifier": "Microsoft.VisualStudioCode",
"PackageName": "Visual Studio Code",
"Publisher": "Microsoft Corporation",
"ShortDescription": "Code editor redefined and optimized for building and debugging modern web and cloud applications.",
"Author": "Microsoft"
}
]
}
Error Response
{
"error": "Query parameter 'identifier' is required"
}
GET
"/api/v1/publisher"

Search by Publisher

Search for packages by their publisher name

Parameters
"publisher"
string
required

Publisher name to search for

Example Request
curl -X GET "https://api.winget.dev/api/v1/publisher?publisher=example" \
-H "X-API-Key: your-api-key-here"
Success Response
{
"results": [
{
"PackageIdentifier": "Microsoft.VisualStudioCode",
"PackageName": "Visual Studio Code",
"Publisher": "Microsoft Corporation",
"ShortDescription": "Code editor redefined and optimized for building and debugging modern web and cloud applications.",
"Author": "Microsoft"
}
]
}
Error Response
{
"error": "Query parameter 'publisher' is required"
}