# Vextorium Semantic Version Sorter & Range Matcher

> Vextorium Semantic Version Sorter & Range Matcher is a paid API for AI agents from api.vextorium.com, paid per call via x402, $0.003/call, status unknown (last checked 2026-10-16).

Sorts a list of SemVer 2.0 versions (including pre-releases), returns highest/lowest, stable versions, bump type between two versions, and filters/ranks versions against an npm-style range expression.

## Facts

- Endpoint: POST https://api.vextorium.com/comparar-versiones-pago?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-16
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/vextorium-semantic-version-sorter-range-matcher-e258f7d0
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_2qBPeOIAp2B_i6V0BJ_Ar

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability vextorium-semantic-version-sorter-range-matcher-e258f7d0 -d '<json body>'
```

Example prompt: Sort these versions from oldest to newest and tell me the highest and lowest, then filter which ones satisfy the range ^1.2.0 and pick the best match: 1.2.3-beta.2, 1.2.3, 1.10.0, 2.0.0.

## When to prefer this

Choose this endpoint when you need server-side, authoritative SemVer 2.0 sorting and npm range filtering without adding a semver library to your runtime — especially useful in agents or serverless environments where importing 'semver' npm package is not practical. It handles pre-release ordering and complex npm range syntax (^, ~, ||, x wildcards) in one call.

## Known failure modes

- Missing required 'versiones' array returns validation error
- Invalid semver strings (e.g. '1.2' without patch) may be rejected or cause unexpected sorting
- Malformed npm range expression in 'rango' may return null range results
- Empty versions array may return nulls for mayor/menor
- More than 500 versions exceeds the documented limit

## How this service works

Sort Semantic Versioning 2.0 versions (pre-releases included), give highest and lowest, the bump type between two, and which satisfy an npm-style range (^1.2.0, ~1.2, >=1.0 <2.0, 1.x || 2.x) plus the best match.

## Output

Returns a JSON object with: 'ordenadas' (all versions sorted ascending), 'mayor' (highest version), 'menor' (lowest version), 'estables' (stable non-pre-release versions), and optionally 'rango' containing the input range string, 'cumplen' (versions satisfying the range), and 'mejor' (best/highest match within the range).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "rango": {
   "type": "string",
   "description": "npm-style range (optional)"
  },
  "versiones": {
   "type": "array",
   "items": {
    "type": "string"
   },
   "description": "Versions (1-500)"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "mayor": "2.0.0",
  "menor": "1.2.3-beta.2",
  "rango": {
   "mejor": "1.10.0",
   "rango": "^1.2.0",
   "cumplen": [
    "1.2.3",
    "1.10.0"
   ]
  },
  "estables": [
   "1.2.3",
   "1.10.0",
   "2.0.0"
  ],
  "ordenadas": [
   "1.2.3-beta.2",
   "1.2.3",
   "1.10.0",
   "2.0.0"
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/vextorium-semantic-version-sorter-range-matcher-e258f7d0/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.vextorium.com](https://www.zero.xyz/host/api.vextorium.com/llms.txt)
