# Packages Msys2 — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://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. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-packages-msys2-org-api-d8a31cee/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## 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.paywithlocus.com/api/wrapped/parse-packages-msys2-org-api-d8a31cee/get_build_queue \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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.paywithlocus.com/api/wrapped/parse-packages-msys2-org-api-d8a31cee/get_mirrors \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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.paywithlocus.com/api/wrapped/parse-packages-msys2-org-api-d8a31cee/get_outdated_packages \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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.paywithlocus.com/api/wrapped/parse-packages-msys2-org-api-d8a31cee/get_package_detail \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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.paywithlocus.com/api/wrapped/parse-packages-msys2-org-api-d8a31cee/get_packages_by_repo \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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.paywithlocus.com/api/wrapped/parse-packages-msys2-org-api-d8a31cee/get_removals \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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.paywithlocus.com/api/wrapped/parse-packages-msys2-org-api-d8a31cee/get_repos \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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.paywithlocus.com/api/wrapped/parse-packages-msys2-org-api-d8a31cee/get_traffic_stats \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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.paywithlocus.com/api/wrapped/parse-packages-msys2-org-api-d8a31cee/search_packages \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"qtype":"<string>","query":"<string>"}'
```
