{"uid":"cap_D1jlZNY57q3ERc0JctN8r","slug":"fastx402-semantic-version-comparator-fba5b761","name":"FastX402 Semantic Version Comparator","description":"200 pay-per-call tools for AI agents, from $0.001 per request in USDC on Base or Solana with x402. No account, no API key.","url":"https://fastx402.tools/semver-compare?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["a","b"],"properties":{"a":{"type":"string","description":"First semantic version string (e.g. 1.2.3-beta.4+build.5)"},"b":{"type":"string","description":"Second semantic version string"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"a":{"type":"string"},"b":{"type":"string"},"a_parsed":{"type":"object","properties":{"build":{"type":"array","items":{}},"major":{"type":"integer"},"minor":{"type":"integer"},"patch":{"type":"integer"},"prerelease":{"type":"array","items":{"type":"string"}}}},"b_parsed":{"type":"object","properties":{"build":{"type":"array","items":{}},"major":{"type":"integer"},"minor":{"type":"integer"},"patch":{"type":"integer"},"prerelease":{"type":"array","items":{"type":"string"}}}},"relation":{"type":"string"},"comparison":{"type":"integer"}}}}}}},"responseSchema":{"type":"json","example":{"a":"1.0.0-alpha.1","b":"1.0.0-alpha.2","a_parsed":{"build":[],"major":1,"minor":0,"patch":0,"prerelease":["alpha",1]},"b_parsed":{"build":[],"major":1,"minor":0,"patch":0,"prerelease":["alpha",2]},"relation":"a < b","comparison":-1}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_Be_pwK6f7B18QAOcklSy_","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Compares two semantic version strings and returns their ordering relationship and parsed components","exampleAgentPrompt":"Compare these two versions for me — which one is greater: 2.3.0-beta.1 or 2.3.0-alpha.5?","exampleUseCases":[{"title":"Dependency upgrade decision","prompt":"I need to know if version 3.1.0-rc.2 is newer than 3.0.9 — can you compare them and tell me the ordering?"},{"title":"CI pipeline version gate","prompt":"Check whether 1.5.0+build.42 comes before or after 1.5.0 — I need to know the exact semver relation between them."},{"title":"Release changelog ordering","prompt":"I have two release tags: v4.0.0-alpha.1 and v4.0.0-alpha.10. Which one is the later version according to semver rules?"}],"resultDescription":"Returns a JSON object containing both input version strings, each parsed into major, minor, patch, prerelease, and build fields, plus a human-readable relation string (e.g. 'a < b') and a numeric comparison value (-1, 0, or 1) indicating ordering.","failureModes":["Invalid semver string (e.g. missing patch segment) may return an error or unexpected parse","Missing required query parameters 'a' or 'b' returns a validation error","Build metadata differences may be ignored per semver spec, resulting in comparison=0 even when build strings differ","Payment failure via x402 protocol blocks the request entirely"],"whenToPreferThis":"Use this endpoint when you need strict semver-spec-compliant comparison including prerelease precedence rules, or when you need the parsed breakdown of version components. Prefer it over string sorting or regex-based comparisons, which fail on prerelease ordering (e.g. 1.0.0-alpha < 1.0.0).","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-28T12:38:26.559Z","isFirstParty":false,"canonicalSlug":"fastx402-semantic-version-comparator-fba5b761"}