Welcome to the Winget Package Search API! This guide will help you get up and running quickly, whether you're a beginner or an experienced developer.
- Go 1.21 or higher
- Node.js 18 or higher
- MongoDB (local or remote instance)
- pnpm (for the website frontend)
git clone https://github.com/yourusername/winget-pkg-api.git
cd winget-pkg-apiCreate .env files in the respective directories:
MONGODB_URL=mongodb://localhost:27017MONGODB_URL=mongodb://localhost:27017
SALT=your-secret-salt-hereAPI_KEY=your-api-key-herecd api
go mod download
go run main.go- The API will be available at: http://localhost:8080
cd website
pnpm install
pnpm dev- The website will be available at: http://localhost:3000
cd cli
go run main.go- Follow the prompts to register a new user and generate an API key.
- Use this API key in your requests (see below).
All requests require an API key in the X-API-Key header.
curl -H "X-API-Key: your-api-key-here" https://winget-pkg-api.onrender.com/api/v1/pingcurl -H "X-API-Key: your-api-key-here" "https://winget-pkg-api.onrender.com/api/v1/search?q=firefox"- Limit: 20 requests per second per API key.
- Headers: Check
X-RateLimit-Remainingin responses. - Warning: This is a free project on a free server. Please do not scrape or abuse the API. Heavy use may result in your key being revoked.
- MongoDB connection errors: Ensure MongoDB is running and accessible at the URL in your
.envfile. - Port conflicts: Make sure ports 8080 (API) and 3000 (website) are free.
- API key issues: Double-check your API key and ensure it is included in the
X-API-Keyheader. - Slow performance: The API is hosted on a free server and may be slow under high load.
- For questions or issues, open a GitHub issue or contact the maintainer.
- This project is for the tech side project community—be respectful and have fun!
Built with ❤️ for the Windows Package Manager community by Bijoy Kar