A Go service that mirrors microsoft/winget-pkgs, indexes manifests into SQLite (FTS5), and exposes a versioned API for package search and manifest download.
go run ./cmd/poppypkgsWe now have a public API you can use at pkgs.poppy.party. If you wish to use the API we ask that you do the following.
- When possible, use a
User-Agentheader. They should be formated likeAuthor/My App Name (1.0.0) - There are no rate limits implemented, but when possible try to keep requests down to under 5 requests per second.
- When utilizing our our hosted API, please link to
https://poppy.partysomewhere in your app. - When hosting
poppy-pkgson your own infrastructure, please link to this repository somewhere in your app.
GET /api/v1/healthGET /api/v1/statusGET /api/v1/search?q=<query>&limit=20&offset=0GET /api/v1/packages/:packageIdGET /api/v1/packages/:packageId/versionsGET /api/v1/packages/:packageId/versions/:version/manifestsGET /api/v1/packages/:packageId/versions/:version/manifests/:manifestId/rawGET /api/v1/packages/:packageId/versions/:version/manifests/:manifestId/download
version supports latest as a shortcut (for example: /api/v1/packages/Foo.Bar/versions/latest/manifests).
Search prioritization:
- Exact
PackageIdentifiermatch - Prefix
PackageIdentifiermatch - FTS relevance
Search packages:
curl "http://localhost:8080/api/v1/search?q=yucca&limit=5"Get package metadata (includes latest_version):
curl "http://localhost:8080/api/v1/packages/Addi.Yucca"List unique package versions:
curl "http://localhost:8080/api/v1/packages/Addi.Yucca/versions"Fetch manifests for latest version:
curl "http://localhost:8080/api/v1/packages/Addi.Yucca/versions/latest/manifests"Download a manifest file from API (no GitHub URL needed):
curl -L -o manifest.yaml "http://localhost:8080/api/v1/packages/Addi.Yucca/versions/latest/manifests/123/download"POPPY_LISTEN_ADDR(default:8080)POPPY_DB_PATH(default./data/poppypkgs.db)POPPY_REPO_PATH(default./data/winget-pkgs)POPPY_REPO_URL(defaulthttps://github.com/microsoft/winget-pkgs.git)POPPY_SYNC_INTERVAL(default1m, supports duration like30s)POPPY_LOG_LEVEL(debug|info|warn|error, defaultinfo)