Semver parse
Exactsemver_parseDeterministic and authoritative — the canonical answer for this input.
Parse a SemVer 2.0.0 version string into components: major, minor, patch integers; pre-release identifier list (numeric ids as ints); build metadata list; and canonical form. Leading 'v' tolerated. Invalid strings return is_valid=False with a reason. Processing multiple inputs? Use `semver_parse_batch` to do up to 1000 in one call.
Parameters
versionstringrequiredSemVer 2.0.0 string (leading 'v' tolerated).
Call it
curl -X POST https://api.snipget.ai/v1/semver/parse \
-H "Authorization: Bearer sk_live_..." \
-H "Content-Type: application/json" \
-d '{"version":"1.2.3-beta.1+build.7"}'The Batch tab sends up to 1000 inputs in one call via /v1/semver/parse/batch.
Example response
{
"input": "1.2.3-beta.1+build.7",
"is_valid": true,
"major": 1,
"minor": 2,
"patch": 3,
"pre_release": [
"beta",
1
],
"build": [
"build",
"7"
],
"is_prerelease": true,
"canonical": "1.2.3-beta.1+build.7"
}FAQ
What does parsing a version actually give me?
It breaks a version string into its named pieces: the major, minor, and patch numbers, any pre-release labels like "beta.1", and any build metadata. Instead of slicing the string yourself, you get each part cleanly separated and correctly typed.
Why use this instead of splitting the string on dots?
Versions are messier than they look. A leading "v" is tolerated, pre-release and build sections use different separators, and numeric pieces need to become real numbers. This tool follows the full SemVer 2.0.0 grammar so edge cases are handled for you, not guessed at.
Can I trust the breakdown?
Yes. Parsing is exact and deterministic by the SemVer 2.0.0 specification, so the same input always produces the same components. It is the canonical answer, not a best-effort estimate.
What does it not do?
It only takes apart a single version string. It does not compare two versions, check a version against a range, or tell you which is newer. Use the compare or satisfies tools for those jobs.
What if my string isn't a valid version?
It does not error. You get is_valid false with confidence 0 and a why_invalid reason. For example, "1.2" is rejected because SemVer requires all three numbers, like "1.2.0".