{"uid":"cap_7RkiKHZaWEc7U3hoUw_e4","slug":"fittings-semver-range-resolve-8c858036","name":"fittings Semver Range Resolve","description":"Tests versions against an npm-style semver range and returns which satisfy it, the highest and lowest that do, and the range expanded into explicit comparators.","url":"https://fittings.sh/v1/semver/range-resolve","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":["range"],"properties":{"range":{"type":"string","description":"npm range, e.g. ^1.2.3, ~1.2, 1.x || >=2.5.0, 1.2.3 - 2.3.4"},"version":{"type":"string","description":"A single version to test"},"versions":{"type":"array","description":"Versions to test, as an array or a comma-separated string; at most 200"},"includePrerelease":{"type":"boolean","description":"Let prereleases satisfy comparators that do not name one, default false"}}}},"additionalProperties":false}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.004398","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.004398/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.004398","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.004398","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_RLxoQBSVI21jwN8VH9vXf","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.004398","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Tests one or more version strings against an npm-style semver range and returns which versions satisfy it, the highest and lowest matches, and the expanded comparators.","exampleAgentPrompt":"Which of these versions — 1.0.0, 1.2.3, 1.5.0, 2.0.0, 2.1.4 — satisfy the semver range ^1.2.0, and what's the highest one that matches?","exampleUseCases":[{"title":"Dependency compatibility check","prompt":"I have these library versions available: 3.0.0, 3.1.2, 3.4.0, 4.0.0-beta.1, 4.0.0 — which ones satisfy the range >=3.1.0 <4.0.0, and what's the highest match?"},{"title":"Single version validation","prompt":"Does version 2.5.0-rc.1 satisfy the semver range ~2.5.0? Also include prereleases in the check."},{"title":"Range expansion for CI pipeline","prompt":"Can you expand the semver range 1.2.3 - 2.3.4 into its explicit comparators so I can hardcode them in my CI config?"}],"resultDescription":"Returns which of the supplied versions satisfy the given semver range, the highest and lowest satisfying versions, and the range expanded into its explicit comparator set.","failureModes":["Invalid or malformed semver range returns an error","More than 200 versions submitted exceeds the limit","Versions array contains non-semver strings causing parse failure","Missing required 'range' query parameter returns an error","Prerelease versions excluded by default unless includePrerelease is set"],"whenToPreferThis":"Use this endpoint when you need to programmatically evaluate npm-style semver ranges against lists of versions — for example, resolving dependency compatibility, filtering candidate releases, or expanding a range into explicit comparator logic. Prefer it over manual string parsing or local semver libraries when you need a reliable, hosted computation without shipping code.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-13T12:40:04.956Z","isFirstParty":false}