# Packages Msys2 — Wrapped API

> **You are on:** `https://api.beta.paywithlocus.com/api` | [llms.txt](https://beta.paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Search and explore MSYS2 packages across repositories, view build queues and outdated packages, and access detailed package information including dependencies and statistics. Monitor repository traffic, find available mirrors, and track package removals to stay updated with the latest MSYS2 ecosystem changes.

**Category:** Developer Tools | **Website:** [packages.msys2.org/](https://packages.msys2.org/) | **Docs:** [parse.bot/marketplace/d8a31cee-e6a5-4d3b-8330-cb112ce2bcbe/packages-msys2-org-api](https://parse.bot/marketplace/d8a31cee-e6a5-4d3b-8330-cb112ce2bcbe/packages-msys2-org-api)

Pay-per-use API proxy for Locus Pro. Each call burns credits from your workspace balance.

## Access

**Base URL:** `https://api.beta.paywithlocus.com/api/wrapped/credits/packages-msys2/`
**Auth:** `Authorization: Bearer <LOCUS_CREDITS_SECRET_KEY>` (an `lcr_` secret key or a scoped `lcac_` agent credential)
**Required header:** `Idempotency-Key: <fresh UUID per call>`. A retry with the same key replays the stored result without a new charge.
**Response:** the provider response after any endpoint-specific normalization. `X-Locus-Credits-Charged` carries the charge and `X-Locus-Credits-Balance` the remaining balance. Insufficient credits return `402` before the provider is called.
**Pricing:** estimated costs below are USD. Locus debits the credit equivalent at your workspace rate.

Full call contract: https://docs.paywithlocus.com/api-reference/introduction

> Using a Pay With Locus wallet key (`claw_` prefix)? Wallet routes are documented separately: https://docs.paywithlocus.com/wrapped-apis/for-agents

## Endpoints

### Get build queue

Retrieve the current build queue. Returns packages currently queued for building with their target versions, repository URLs, and per-architecture build information. May be empty when no builds are pending.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/packages-msys2/get-build-queue \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Get mirrors

Retrieve MSYS2 mirror status including today's download count, data transferred, and last synchronization time for each mirror.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/packages-msys2/get-mirrors \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Get outdated packages

Retrieve packages where the upstream version is newer than the current git version. Each entry includes the current git version, the newer upstream version, and the source repository path.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/packages-msys2/get-outdated-packages \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Get package detail

Retrieve full details for a binary package including version, dependencies, build info, file list, and vulnerability information. The package_name must be the full binary package name (e.g. 'mingw-w64-ucrt-x86_64-gcc'), not the base package name.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `package_name` | string | Yes | Full binary package name (e.g. 'mingw-w64-ucrt-x86_64-gcc', 'mingw-w64-clang-x86_64-python'). |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/packages-msys2/get-package-detail \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"package_name":"<string>"}'
```

### Get packages by repo

List all binary packages for a specific MSYS2 repository. Returns package name, version, description, and detail URL for each package. The full repository listing is returned in a single response (no server-side pagination).

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `repo` | string | No | Repository name: 'ucrt64', 'clang64', 'clangarm64', 'mingw64', 'mingw32', 'msys'. |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/packages-msys2/get-packages-by-repo \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"repo":"<string>"}'
```

### Get removals

Retrieve the list of packages pending removal from MSYS2 repositories. Returns package name and repository for each pending removal. May be empty when no packages are scheduled for removal.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/packages-msys2/get-removals \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Get repos

Retrieve the list of MSYS2 repositories with statistics including package counts, total package size, and installed size.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/packages-msys2/get-repos \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Get traffic stats

Retrieve bandwidth statistics for the MSYS2 repository server. Returns four tables: hourly traffic, daily traffic, monthly traffic, and top-days by total bandwidth. Each record includes received, sent, and total bandwidth.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/packages-msys2/get-traffic-stats \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Search packages

Full-text search across the MSYS2 package repository by base or binary package name. Returns an exact match (if any) and a list of related results. The search is server-side; results are not paginated — a single request returns all matches.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `qtype` | string | No | Search type: 'pkg' for base package name, 'binpkg' for binary package name. |
| `query` | string | Yes | Search query string (e.g. 'gcc', 'python', 'boost') |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/packages-msys2/search-packages \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"qtype":"<string>","query":"<string>"}'
```

## Next steps

- [All wrapped API providers](https://beta.paywithlocus.com/wapi/index.md): pick another provider.
- [Find and call tools](https://beta.paywithlocus.com/agent/tools.md): price ceilings, async results, and errors.
- [Credits and billing](https://beta.paywithlocus.com/agent/billing.md): what a call costs and how to add credits.
- [Agent docs index](https://beta.paywithlocus.com/agent/index.md): every Locus agent page.