# Semver Parser & Version Range Checker (`automation-lab/semver-parser`) Actor

Parse, validate, compare, and sort semantic versions. Supports npm/cargo/pip range syntax (^1.2, ~2.0, >=1.0.0 <2.0.0). Returns parsed components, range checks, and ranked sorted arrays.

- **URL**: https://apify.com/automation-lab/semver-parser.md
- **Developed by:** [Stas Persiianenko](https://apify.com/automation-lab) (community)
- **Categories:** Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Semver Parser & Version Range Checker

Parse, validate, compare, and sort semantic version strings in one API call. Supports npm, Cargo, pip, and Maven range syntax — no code required.

### What does Semver Parser do?

**Semver Parser** accepts a list of version strings (e.g. `1.2.3`, `2.0.0-beta.1`) and performs any combination of four operations:

- 🔍 **Parse** — break every version into `major`, `minor`, `patch`, pre-release, and build-metadata components
- ✅ **Validate** — instantly flag strings that don't conform to the [Semantic Versioning 2.0.0](https://semver.org) spec
- 🎯 **Range check** — test whether each version satisfies an npm/cargo/pip range expression (e.g. `^1.2`, `~2.0`, `>=1.0.0 <2.0.0`)
- 📊 **Sort & rank** — return all valid versions in ascending or descending semver order with a 1-based rank

Every result is written to an Apify dataset as a flat JSON record, ready to export as JSON, CSV, or Excel with a single click.

### Who is Semver Parser for?

**DevOps & platform engineers** who automate dependency pipelines:
- Check whether a batch of library versions satisfies a minimum requirement before deploying
- Validate version strings from package manifests before triggering CI/CD workflows
- Sort release tags from container registries into ascending upgrade paths

**Package maintainers and open-source maintainers**:
- Quickly determine which of your release versions fall inside a support window (e.g. `>=3.0.0 <4.0.0`)
- Detect accidentally published pre-release strings in a release list
- Produce a ranked changelog from an unordered list of git tags

**QA / release managers** who need fast, scriptable version checks:
- Validate that all version fields in a config file are well-formed semver before a release
- Confirm that a proposed version bump is greater than all existing published versions
- Automate go/no-go decisions based on version constraints in your CI pipeline

**Low-code/no-code builders** working in Zapier, Make, or n8n:
- Use the actor as a pure utility step — pass an array of versions, receive parsed JSON, route on `satisfiesRange` or `isValid` fields without writing any code

### Why use Semver Parser?

- 🚀 **Pure HTTP utility** — zero proxy usage, runs in ~1 second, costs fractions of a cent
- 🎯 **Full npm range syntax** — `^1.2`, `~2.0`, `>=1.0.0 <2.0.0`, `1.x`, `*`, `latest` — powered by the battle-tested `semver` npm package (500M+ downloads/week)
- 🔢 **Batch processing** — parse up to 1,000 versions in a single run; extend to 10,000 via the `maxVersions` parameter
- 📦 **Coercion** — loose strings like `v1.2` or `1.0` are coerced to valid semver before processing; the original input is preserved
- ✅ **Pre-release support** — control whether pre-release identifiers (`-beta.1`, `-rc.2`) count for range satisfaction
- 📊 **Ranked output** — valid versions are sorted and assigned a 1-based `rank` field for easy downstream consumption
- 🔗 **API-first** — trigger via REST API, Apify CLI, Zapier, Make, or any HTTP client
- 📁 **Export formats** — JSON, CSV, XLSX, JSONL, XML — direct from the dataset tab

### What data can you extract?

Each input version produces one output record with the following fields:

| Field | Type | Description |
|-------|------|-------------|
| `version` | string | Original input version string |
| `isValid` | boolean | Whether the string is valid semver |
| `major` | number | Major version component |
| `minor` | number | Minor version component |
| `patch` | number | Patch version component |
| `prerelease` | string | Pre-release identifier (e.g. `beta.1`), empty if none |
| `build` | string | Build metadata (e.g. `build.42`), empty if none |
| `coerced` | string | Coerced semver string (e.g. `v1.2` → `1.2.0`), null if uncoerceable |
| `satisfiesRange` | boolean | Whether version satisfies the given range expression; null if no range provided |
| `rank` | number | Sort rank (1 = first in chosen sort order), null if invalid |
| `error` | string | Validation error message for invalid versions; null if valid |

The key-value store also contains a `summary` record with aggregate statistics: counts, range match counts, highest/lowest version, and operation metadata.

### How much does it cost to parse semantic versions?

Semver Parser uses **Pay-Per-Event (PPE)** pricing — you pay only for what you actually process.

| Event | FREE tier | BRONZE | SILVER | GOLD | PLATINUM | DIAMOND |
|-------|-----------|--------|--------|------|----------|---------|
| Actor start (one-time) | $0.005 | $0.005 | $0.005 | $0.005 | $0.005 | $0.005 |
| Per version parsed | $0.00115 | $0.001 | $0.00078 | $0.0006 | $0.0004 | $0.00028 |

**Real-world cost examples:**

| Use case | Versions | Estimated cost (BRONZE) |
|----------|----------|------------------------|
| Validate a manifest | 10 | ~$0.015 |
| Check a release list | 100 | ~$0.105 |
| Audit a lock file | 500 | ~$0.505 |
| Full dependency graph | 1,000 | ~$1.005 |

**Free plan:** Apify gives new users $5 in free credits. At BRONZE pricing, that's ~4,750 version parses at no cost.

💡 Since this actor uses zero proxy bandwidth and minimal compute, the per-item cost is among the lowest on the Apify Store.

### How to parse semantic versions with Semver Parser

1. **Open the actor** at [apify.com/automation-lab/semver-parser](https://apify.com/automation-lab/semver-parser)
2. **Click "Try for free"** and sign in (or create a free account)
3. **Add your version strings** to the "Version strings" field — one per line in the UI, or as a JSON array via the API
4. **Set an optional range** (e.g. `>=1.0.0 <2.0.0`) to test which versions satisfy your constraint
5. **Choose your operation**: `all` (default), `parse`, `validate`, or `compare`
6. **Click "Start"** — the actor runs in ~1-5 seconds for most inputs
7. **View results** in the Dataset tab — export as JSON, CSV, or Excel

**Example: validate a list of dependency versions**

Input:
```json
{
    "versions": ["1.2.3", "2.0.0-beta.1", "invalid-ver", "3.0.0"],
    "range": ">=1.0.0 <3.0.0",
    "operation": "all",
    "sortOrder": "desc"
}
````

**Example: sort git tags for a changelog**

```json
{
    "versions": ["v0.9.0", "v1.0.0", "v1.1.0", "v0.5.0", "v2.0.0-alpha.1"],
    "operation": "compare",
    "sortOrder": "desc",
    "includePrerelease": false
}
```

**Example: validate only (fast mode)**

```json
{
    "versions": ["1.0.0", "bad-version", "2.0", "1.0.0-alpha"],
    "operation": "validate"
}
```

### Input parameters

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `versions` | string\[] | — | **Required.** Array of version strings to process |
| `range` | string | `""` | Optional range expression to test (`^1.2`, `~2.0`, `>=1.0.0 <2.0.0`, `1.x`, `*`) |
| `operation` | string | `"all"` | `all`, `parse`, `validate`, or `compare` |
| `sortOrder` | string | `"desc"` | `"desc"` (newest first) or `"asc"` (oldest first) |
| `includePrerelease` | boolean | `true` | Whether pre-release versions count for range satisfaction |
| `maxVersions` | integer | `1000` | Maximum versions to process (1–10,000) |

### Output examples

#### Valid version with range check

```json
{
    "version": "2.5.1",
    "isValid": true,
    "major": 2,
    "minor": 5,
    "patch": 1,
    "prerelease": "",
    "build": "",
    "coerced": "2.5.1",
    "satisfiesRange": true,
    "rank": 1,
    "error": null
}
```

#### Pre-release version

```json
{
    "version": "2.0.0-beta.1",
    "isValid": true,
    "major": 2,
    "minor": 0,
    "patch": 0,
    "prerelease": "beta.1",
    "build": "",
    "coerced": "2.0.0-beta.1",
    "satisfiesRange": true,
    "rank": 2,
    "error": null
}
```

#### Version with build metadata

```json
{
    "version": "3.1.0+build.42",
    "isValid": true,
    "major": 3,
    "minor": 1,
    "patch": 0,
    "prerelease": "",
    "build": "build.42",
    "coerced": "3.1.0+build.42",
    "satisfiesRange": false,
    "rank": 1,
    "error": null
}
```

#### Invalid version with coercion attempt

```json
{
    "version": "invalid-ver",
    "isValid": false,
    "major": null,
    "minor": null,
    "patch": null,
    "prerelease": "",
    "build": "",
    "coerced": null,
    "satisfiesRange": null,
    "rank": null,
    "error": "\"invalid-ver\" is not a valid semver string"
}
```

#### Summary (key-value store `summary` key)

```json
{
    "totalInput": 9,
    "validVersions": 8,
    "invalidVersions": 1,
    "range": ">=1.0.0 <3.0.0",
    "satisfyingRange": 6,
    "notSatisfyingRange": 2,
    "sortOrder": "desc",
    "operation": "all",
    "highestVersion": "3.1.0+build.42",
    "lowestVersion": "0.9.9"
}
```

### Tips for best results

- 🔢 **Start small** — run a sample of 10-20 versions first to verify your range expression works as expected before sending large batches
- 🏷️ **Strip `v` prefixes** — the semver spec doesn't allow leading `v`. Versions like `v1.2.3` are coerced to `1.2.3` automatically; check the `coerced` field if the original had a prefix
- 📦 **npm range syntax** — use standard npm range expressions: `^` for compatible, `~` for patch, `x` for wildcards, `>= <` for bounded ranges
- 🔄 **Scheduling** — use Apify's built-in scheduler to periodically re-check a dependency list; if `satisfyingRange` drops to 0, trigger a webhook or Slack alert
- 💾 **Export options** — after a run, use the Dataset tab to export all results as CSV or Excel for spreadsheet analysis
- 🚫 **Max versions** — default cap is 1,000. For larger dependency graphs, set `maxVersions` up to 10,000
- ⚡ **Compare-only mode** — use `"operation": "compare"` with no range for pure sorting/ranking without range computation overhead

### Integrations

**Semver Parser → Slack/Discord — dependency alert**
Schedule a daily run on your lock-file versions. Use a webhook trigger to post a Slack message when any version falls outside a supported range:

- Actor returns `satisfiesRange: false` for a dependency
- Webhook fires → Slack `#engineering` alert: "Dependency X is outside supported range"

**Semver Parser → Google Sheets — version audit dashboard**
Export the dataset to Google Sheets via the Apify → Google Sheets integration:

- Input: all package versions from a multi-repo scan
- Output: live sheet with `isValid`, `rank`, `satisfiesRange` columns
- Filter for `isValid: false` to find version strings that need fixing

**Semver Parser → Make (Integromat) — CI/CD gate**
Add a version validation step to your release pipeline in Make:

1. POST your new version string to the actor API
2. Receive the `satisfiesRange` result in the Make module
3. Route: if `true` → continue deployment; if `false` → notify release manager

**Semver Parser → n8n — package manifest validation**
Use the HTTP Request node to call the Apify API:

- Input your entire `package.json` dependency list
- Branch on `invalidVersions > 0` to halt pipeline with an error

**Scheduled runs for ongoing compliance monitoring**
Run Semver Parser on a nightly schedule against your approved version allowlist. Any new version added to a repo that fails the range check triggers an automated issue in GitHub via webhook.

### Using the Apify API

#### Node.js

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: 'YOUR_API_TOKEN' });

const run = await client.actor('automation-lab/semver-parser').call({
    versions: ['1.2.3', '2.0.0-beta.1', '3.1.0+build.42'],
    range: '>=1.0.0 <3.0.0',
    operation: 'all',
    sortOrder: 'desc',
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

#### Python

```python
from apify_client import ApifyClient

client = ApifyClient(token='YOUR_API_TOKEN')

run = client.actor('automation-lab/semver-parser').call(run_input={
    'versions': ['1.2.3', '2.0.0-beta.1', '3.1.0+build.42'],
    'range': '>=1.0.0 <3.0.0',
    'operation': 'all',
    'sortOrder': 'desc',
})

items = client.dataset(run['defaultDatasetId']).list_items().items
print(items)
```

#### cURL

```bash
## Start the actor
curl -X POST "https://api.apify.com/v2/acts/automation-lab~semver-parser/runs" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "versions": ["1.2.3", "2.0.0-beta.1", "3.1.0+build.42"],
    "range": ">=1.0.0 <3.0.0",
    "operation": "all",
    "sortOrder": "desc"
  }'

## Fetch results (replace RUN_ID and DATASET_ID)
curl "https://api.apify.com/v2/datasets/DATASET_ID/items?token=YOUR_API_TOKEN"
```

### Use with AI agents via MCP

Semver Parser is available as a tool for AI assistants that support the [Model Context Protocol (MCP)](https://docs.apify.com/platform/integrations/mcp).

Add the Apify MCP server to your AI client — this gives you access to all Apify actors, including this one:

#### Setup for Claude Code

```bash
claude mcp add --transport http apify "https://mcp.apify.com"
```

#### Setup for Claude Desktop, Cursor, or VS Code

Add this to your MCP config file:

```json
{
    "mcpServers": {
        "apify": {
            "url": "https://mcp.apify.com"
        }
    }
}
```

Your AI assistant will use OAuth to authenticate with your Apify account on first use.

#### Example prompts

Once connected, try asking your AI assistant:

- "Use automation-lab/semver-parser to check which of these versions satisfy the range >=2.0.0 <3.0.0: 1.9.9, 2.0.0, 2.5.1, 3.0.0-rc.1, 3.0.0"
- "Parse and sort these git tags from newest to oldest: v1.0.0, v0.5.0, v1.2.3, v2.0.0-beta.1, v0.9.9"
- "Validate this list of dependency versions and tell me which ones are not valid semver strings"

Learn more in the [Apify MCP documentation](https://docs.apify.com/platform/integrations/mcp).

### Is it legal to use Semver Parser?

Yes — completely. Semver Parser is a **pure computation utility** that processes version strings you supply as input. It makes no HTTP requests to any external website, scrapes no data, and involves no third-party terms of service.

The [semver](https://www.npmjs.com/package/semver) npm package it uses is open-source (ISC license) and the Semantic Versioning specification is a public, freely-licensed standard.

Use Semver Parser in any automation, compliance tool, CI/CD pipeline, or commercial workflow without restriction.

### FAQ

**What version range syntax is supported?**
Semver Parser uses the [semver npm package](https://github.com/npm/node-semver), which supports: comparators (`>=`, `<=`, `>`, `<`, `=`), hyphen ranges (`1.2.3 - 2.3.4`), X-ranges (`1.x`, `1.*`, `*`), tilde ranges (`~1.2.3`), caret ranges (`^1.2.3`), and space-separated AND conditions (`>=1.0.0 <2.0.0`). This is the same syntax used by npm, Yarn, pnpm, Cargo, and many other package managers.

**How fast is it? Can I process thousands of versions?**
A single run typically completes in 1-5 seconds for up to 1,000 versions. Processing is sequential but very fast since there are no HTTP requests — everything is in-memory arithmetic. For 10,000 versions (the maximum), expect under 30 seconds. Memory usage stays under 50 MB.

**How much does processing 100 versions cost?**
At BRONZE pricing: 1 start event ($0.005) + 100 version-parsed events ($0.001 × 100 = $0.10) = **$0.105 total**. On the free plan ($5 credits), that's ~47 batches of 100 versions.

**Does the actor handle `v` prefix or loose version strings like `1.0` or `1`?**
Yes — the actor coerces loose strings using `semver.coerce()`. `v1.2.3` → `1.2.3`, `1.0` → `1.0.0`, `1` → `1.0.0`. The `coerced` output field always shows what was actually used for parsing. The original `version` field is preserved unchanged. Strings that cannot be coerced (e.g. `invalid-ver`, `abc`) return `isValid: false` with `coerced: null`.

**Why does a version not satisfy a range when I expect it to?**
The most common cause is pre-release handling. By default (`includePrerelease: true`), pre-release versions like `1.0.0-beta.1` are included in range checks. If `includePrerelease` is `false`, semver spec rules apply: a pre-release version only satisfies a range if the range explicitly includes a pre-release comparator on the same `major.minor.patch` tuple. For example, `^1.0.0` would NOT match `1.0.0-beta.1` when `includePrerelease: false`.

**Can I use this with the Apify Scheduler for recurring dependency audits?**
Yes — set up a scheduled actor run via Apify Console or the API. Store your version list and range in the actor input, and use a webhook to notify you when `satisfyingRange` drops below a threshold or `invalidVersions > 0`. This is useful for ongoing compliance checks against dependency windows.

**What happens if I send the same version multiple times?**
Each entry in the input array is processed independently and produces one output record. Duplicates are preserved — they'll both appear in the dataset with the same `rank`. If you need deduplication, filter the output by `version` after the run.

### Other utility actors from automation-lab

Looking for more developer and DevOps tools?

- 🔗 [JSON Schema Generator](https://apify.com/automation-lab/json-schema-generator) — infer JSON Schema from any JSON sample automatically
- 🎨 [Color Contrast Checker](https://apify.com/automation-lab/color-contrast-checker) — WCAG 2.1 AA/AAA accessibility compliance checker for hex/RGB color pairs
- 🌐 [Lazada Scraper](https://apify.com/automation-lab/lazada-scraper) — extract product listings, prices, and reviews from Lazada
- 🔍 Browse all tools at [apify.com/automation-lab](https://apify.com/automation-lab)

# Actor input Schema

## `versions` (type: `array`):

Enter one or more semver version strings to parse (e.g. 1.2.3, 2.0.0-beta.1, 3.1.0+build.42).

## `range` (type: `string`):

Optional npm/cargo/pip range expression to test versions against (e.g. >=1.0.0 <2.0.0, ^1.2, ~2.0, 1.x). Leave empty to skip range checking.

## `operation` (type: `string`):

Choose the operation to perform: parse (detailed breakdown), validate (pass/fail), compare (sort and rank), or all (do everything).

## `sortOrder` (type: `string`):

Sort direction for version comparison. asc = oldest first (1.0 → 2.0), desc = newest first (2.0 → 1.0).

## `includePrerelease` (type: `boolean`):

When enabled, pre-release versions (e.g. 1.0.0-beta.1) are included in range checks and comparisons. When disabled, pre-release versions are excluded from range matches.

## `maxVersions` (type: `integer`):

Maximum number of version strings to process. Use to cap large inputs. Default is 1000.

## Actor input object example

```json
{
  "versions": [
    "1.2.3",
    "2.0.0-beta.1",
    "3.1.0+build.42"
  ],
  "range": ">=1.0.0 <3.0.0",
  "operation": "all",
  "sortOrder": "desc",
  "includePrerelease": true,
  "maxVersions": 100
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "versions": [
        "1.2.3",
        "2.0.0-beta.1",
        "3.1.0+build.42"
    ],
    "range": ">=1.0.0 <3.0.0",
    "operation": "all",
    "sortOrder": "desc",
    "includePrerelease": true,
    "maxVersions": 100
};

// Run the Actor and wait for it to finish
const run = await client.actor("automation-lab/semver-parser").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "versions": [
        "1.2.3",
        "2.0.0-beta.1",
        "3.1.0+build.42",
    ],
    "range": ">=1.0.0 <3.0.0",
    "operation": "all",
    "sortOrder": "desc",
    "includePrerelease": True,
    "maxVersions": 100,
}

# Run the Actor and wait for it to finish
run = client.actor("automation-lab/semver-parser").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "versions": [
    "1.2.3",
    "2.0.0-beta.1",
    "3.1.0+build.42"
  ],
  "range": ">=1.0.0 <3.0.0",
  "operation": "all",
  "sortOrder": "desc",
  "includePrerelease": true,
  "maxVersions": 100
}' |
apify call automation-lab/semver-parser --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=automation-lab/semver-parser",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Semver Parser & Version Range Checker",
        "description": "Parse, validate, compare, and sort semantic versions. Supports npm/cargo/pip range syntax (^1.2, ~2.0, >=1.0.0 <2.0.0). Returns parsed components, range checks, and ranked sorted arrays.",
        "version": "0.1",
        "x-build-id": "7IVCj2Nub5Kj1fHxy"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/automation-lab~semver-parser/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-automation-lab-semver-parser",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/automation-lab~semver-parser/runs": {
            "post": {
                "operationId": "runs-sync-automation-lab-semver-parser",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/automation-lab~semver-parser/run-sync": {
            "post": {
                "operationId": "run-sync-automation-lab-semver-parser",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "versions"
                ],
                "properties": {
                    "versions": {
                        "title": "📦 Version strings",
                        "type": "array",
                        "description": "Enter one or more semver version strings to parse (e.g. 1.2.3, 2.0.0-beta.1, 3.1.0+build.42).",
                        "items": {
                            "type": "string"
                        }
                    },
                    "range": {
                        "title": "🎯 Version range",
                        "type": "string",
                        "description": "Optional npm/cargo/pip range expression to test versions against (e.g. >=1.0.0 <2.0.0, ^1.2, ~2.0, 1.x). Leave empty to skip range checking."
                    },
                    "operation": {
                        "title": "⚙️ Operation",
                        "enum": [
                            "all",
                            "parse",
                            "validate",
                            "compare"
                        ],
                        "type": "string",
                        "description": "Choose the operation to perform: parse (detailed breakdown), validate (pass/fail), compare (sort and rank), or all (do everything).",
                        "default": "all"
                    },
                    "sortOrder": {
                        "title": "Sort order",
                        "enum": [
                            "desc",
                            "asc"
                        ],
                        "type": "string",
                        "description": "Sort direction for version comparison. asc = oldest first (1.0 → 2.0), desc = newest first (2.0 → 1.0).",
                        "default": "desc"
                    },
                    "includePrerelease": {
                        "title": "Include pre-release versions",
                        "type": "boolean",
                        "description": "When enabled, pre-release versions (e.g. 1.0.0-beta.1) are included in range checks and comparisons. When disabled, pre-release versions are excluded from range matches.",
                        "default": true
                    },
                    "maxVersions": {
                        "title": "Max versions to process",
                        "minimum": 1,
                        "maximum": 10000,
                        "type": "integer",
                        "description": "Maximum number of version strings to process. Use to cap large inputs. Default is 1000.",
                        "default": 1000
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
