Detect API versioning scheme from URL
An address whose path starts with v1 is path-based, version 1, found at /v1. Paste any address to see whether its version sits in the path, after the question mark or only in headers, before you build a gateway rule, client or docs badge. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Web address
- https://api.example.com/v1/users
- Scheme
- path_based
- Version
- 1
- Version raw
- v1
- Location
- /v1
When a version appears in the path or query it is extracted and returned with the raw token and the location that matched.
Three places a web service can keep its version
Web services announce their version in different ways. The most common is a path segment, such as v2 between slashes, right in the address. Another is a key after the question mark that carries the number, for example a version value of 2. The third leaves the address clean and expects the version to travel separately, in headers. Paste one complete address and the detector tells you which of the three styles it uses and, when a version is visible, what it is and where it was found. An address whose path starts with v1, followed by users, is reported as path-based, version 1, with the raw token v1 and the location /v1.
What the detector checks and what it never does
Only complete addresses that start with http or https are accepted; anything else is refused instead of guessed. Keys after the question mark are matched without regard to capital letters, and the first key from a fixed priority list that has a value wins, so the order of items never changes the answer. A version written as v2 is normalized to 2, while 1.0.0 stays as it is and word tokens such as beta or a date like 2024-01-01 are kept unchanged. The detector never connects to the service and never invents a version from the host name alone, so the same address always gives the same answer.
FAQ
What counts as path-based versioning?
A path segment matching v plus a numeric version (v1, v2.0) or the form version/1 or versions/2.0.
What does it mean when no version is found in the address?
The result is header-implied: neither the path nor the part after the question mark carries a version marker. Such services usually expect the version in headers, or they are not versioned in the address at all.
Does the order of the items after the question mark matter?
No. Keys are matched without regard to capital letters, and the first key from a fixed priority list that has a value wins, so the same address gives the same answer however its items are ordered.
What happens to versions written as v2 or 1.0.0?
A leading v is dropped when the rest is only digits and dots, so v2 becomes 2 and 1.0.0 stays as it is. Word tokens such as beta, or a date like 2024-01-01, are kept unchanged.
Does the tool visit the address I paste?
No. It only reads the text of the address and never connects to the service. It also never guesses a version from the host name alone, so an address without a marker is reported as such.
Related tools
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/dev/api-versioning-scheme-detect \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"url":"https://api.example.com/v1/users"}'const res = await fetch("https://api.kit.forhosting.com/dev/api-versioning-scheme-detect", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"url": "https://api.example.com/v1/users"
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/dev/api-versioning-scheme-detect",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"url": "https://api.example.com/v1/users"
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/dev/api-versioning-scheme-detect", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"url":"https://api.example.com/v1/users"}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"url":"https://api.example.com/v1/users"}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/dev/api-versioning-scheme-detect", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"url": "https://api.example.com/v1/users"
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "dev.api_versioning_scheme_detect",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
Technical notes
Public HTTP APIs advertise their versioning style in different places: a path segment such as /v2/, a query string such as ? api_version=2, or nowhere in the URL at all when clients are expected to send Accept or custom headers. Integrations, gateways, SDK generators, and documentation crawlers all need a single deterministic answer for which scheme a given endpoint URL uses and which version token it carries. This capability accepts one absolute API URL, rejects strings that are not well-formed http or https URLs, and classifies the versioning scheme as path_based, query_param, or header_implied. When neither path nor query contains a conventional version marker, the result is header_implied with has_version false, signalling that versioning is conventionally out-of-band relative to the URL.
How path, query, and header-implied schemes are distinguished
Keys are matched case-insensitively; the first key in that fixed priority list that has a non-empty value wins, so results stay stable regardless of parameter order in the original URL. Values may look like 2, v2, or 1.0.0; a leading v is stripped for the normalized version field when the token is purely numeric with optional dots. Free-form alphanumerical tokens such as beta or 2024-01-01 are kept as-is when they match a safe identifier pattern. The detector never performs network I/O and never invents a version from hostnames alone. Path-based versioning is the dominant REST convention: a segment such as v1, v2, or v1.2.3 appears in the pathname, often under /api/ or as the first meaningful segment after the host. This detector walks path segments left to right and treats a case-insensitive match of v followed by a numeric version as path_based, returning the numeric part as version and the original segment as version_raw with location set to that segment (for example /v2). It also recognizes the two-segment form version/1 or versions/2.0 so documentation-style routes still classify correctly. Query-param versioning places the token in the search string under common keys including version, api_version, api-version, apiversion, ver, and v. When both path and query would match, path_based takes priority because public REST documentation almost always treats the path segment as the primary contract and the query string as a secondary override. When neither source yields a version, the scheme is header_implied: the URL alone does not encode a version, which in modern APIs usually means Accept: application/vnd.example.v1+json, a custom X-API-Version header, or an unversioned surface.
Input contract, success payload, and validation errors
Example: https://api.example.com/users? POST a JSON body with a single required string field named url. The value must be a well-formed absolute URL using the http or https scheme; relative paths, bare hostnames without a scheme, empty strings, non-string types, and other protocols such as ftp or mailto fail with invalid_input and are not billed. On success the response always includes the echoed url, scheme (one of path_based, query_param, or header_implied), has_version (boolean), path (pathname), and host. When has_version is true the payload also includes version (normalized token), version_raw (as found in the URL), and location (a short pointer such as /v2 or ? api_version=2). For query_param results, param_name records the original key spelling from the URL. Optional fields are omitted rather than set to null when has_version is false, keeping the contract DOM-safe and easy to render. Example: https://api.example.com/v2/users yields scheme path_based, version 2, and location /v2. api_version=2 yields scheme query_param, version 2, and param_name api_version. Example: https://api.example.com/users with no version markers yields scheme header_implied and has_version false. Use the free browser tool for one-off inspection, or the API at $0.002 per successful item when you classify endpoints in bulk from an inventory file or OpenAPI crawl.
Where URL versioning detection earns its keep
Platform teams inventory hundreds of internal and partner base URLs and need a consistent label before routing traffic through a gateway that enforces deprecation windows. Failed validation does not consume balance. SDK generators and client scaffolding tools branch templates on whether the server expects /vN/ in the path, a query flag, or header-only versioning, and a pure classifier avoids brittle ad-hoc regexes scattered across repositories. Documentation sites and API marketplaces show badges for versioning style next to each listing; feeding them this endpoint keeps marketing copy aligned with the live URL shape. Security and compliance reviews often ask whether production hosts still expose unversioned paths or mixed schemes that complicate rollout of breaking changes; exporting scheme and has_version into a spreadsheet answers that in one pass. CI jobs can fail a pull request when a newly added service base URL silently switches from path_based to header_implied without an ADR.
Integration use cases
API inventory and gateway routing
Classify base URLs in a service catalogue as path_based, query_param, or header_implied before applying deprecation policies and routing rules.
SDK and client scaffolding
Choose the correct URL template when generating SDKs: inject /vN/, append ?version=, or document required Accept headers when the URL carries no version.
Docs badges and compliance audits
Label public API listings with their versioning style and flag unversioned production hosts during security or architecture reviews.
Technical questions
How do I detect the API versioning scheme of a URL?
Send a well-formed absolute http(s) URL in the url field. The response scheme is path_based, query_param, or header_implied, with version extracted when present in the path or query string.
Which query parameters are recognized?
version, api_version, api-version, apiversion, ver, and v, matched case-insensitively in that priority order. The first non-empty value yields scheme query_param.
What does header_implied mean?
Neither the path nor the query string carries a conventional version marker. Versioning is conventionally conveyed by headers (Accept, X-API-Version) or the API is unversioned in the URL.
What does detecting the API versioning scheme cost?
The browser tool is free. API requests use prepaid KIT balance at $0.002 per successful call; invalid or non-well-formed URLs are not billed.