{"openapi":"3.1.0","info":{"title":"URI Template API","version":"1.0.0","description":"Expand URI Templates (RFC 6570) — the standard used by GitHub, OpenAPI/Swagger, HAL and many hypermedia APIs — to build URLs from a template and a set of variables. The expand endpoint takes a template such as /users/{user}{?page,per_page} and a JSON object of variables, and returns the finished URI with everything correctly percent-encoded. It implements all four levels of the spec: simple expansion {var}; reserved {+var} and fragment {#var} expansion; the label {.var}, path {/var}, path-style-parameter {;var}, query {?var} and query-continuation {&var} operators; multiple variables {x,y}; and the value modifiers — prefix {var:3} (first N characters) and explode {var*} (expand lists and maps element by element). Variables can be strings, lists or associative maps. The parse endpoint inspects a template and lists its expressions, operators and variable names. Everything is computed locally and deterministically, so it is instant and private. Ideal for REST and hypermedia clients, API SDKs and code generators, OpenAPI tooling, and link building. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This expands URI templates; for building or parsing query strings use a query-string API and for canonicalising URLs use a URL API.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/uritemplate-api","description":"oanor gateway"}],"tags":[{"name":"URI Template"},{"name":"Meta"}],"components":{"securitySchemes":{"oanorKey":{"type":"apiKey","in":"header","name":"x-oanor-key","description":"Get your key at https://www.oanor.com/developer/keys"}}},"security":[{"oanorKey":[]}],"paths":{"/v1/expand":{"get":{"operationId":"get_v1_expand","tags":["URI Template"],"summary":"Expand a URI template","description":"","parameters":[{"name":"template","in":"query","required":true,"description":"The URI template","schema":{"type":"string"},"example":"/users/{user}{?page}"},{"name":"variables","in":"query","required":false,"description":"JSON object of values","schema":{"type":"string"},"example":"{\"user\":\"fred\",\"page\":2}"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"result":"/users/fred?page=2","template":"/users/{user}{?page}","variables":{"page":2,"user":"fred"}},"meta":{"timestamp":"2026-06-03T17:42:14.266Z","request_id":"2c31ce51-1bc7-4084-8648-987607e570ed"},"status":"ok","message":"Expand template","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/parse":{"get":{"operationId":"get_v1_parse","tags":["URI Template"],"summary":"Inspect a template","description":"","parameters":[{"name":"template","in":"query","required":true,"description":"The URI template","schema":{"type":"string"},"example":"/users/{user}{?page,per_page}"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"template":"/users/{user}{?page,per_page}","expressions":[{"operator":"(simple)","variables":[{"name":"user","explode":false}],"expression":"{user}"},{"operator":"?","variables":[{"name":"page","explode":false},{"name":"per_page","explode":false}],"expression":"{?page,per_page}"}],"variable_names":["user","page","per_page"]},"meta":{"timestamp":"2026-06-03T17:42:14.365Z","request_id":"32ecac44-94f7-4288-a34b-0363e19baa9b"},"status":"ok","message":"Parse template","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/meta":{"get":{"operationId":"get_v1_meta","tags":["Meta"],"summary":"Spec","description":"","parameters":[],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"name":"URI Template API","notes":"Implements RFC 6570 levels 1-4. Variables may be strings, lists (arrays) or maps (objects). Undefined and empty-composite values are skipped per the spec. Nothing is stored.","version":"v1","endpoints":[{"path":"/v1/expand","params":{"template":"the URI template, e.g. /users/{user}{?page}","variables":"a JSON object of values"},"returns":"the expanded URI"},{"path":"/v1/parse","params":{"template":"the URI template"},"returns":"its expressions, operators and variable names"},{"path":"/v1/meta","params":[],"returns":"this document"}],"description":"Expand URI Templates (RFC 6570) — the standard, used by GitHub, OpenAPI/Swagger, HAL and many hypermedia APIs, for building URLs from a template and a set of variables. The expand endpoint takes a template such as /users/{user}{?page,per_page} and a JSON object of variables, and returns the finished URI with everything correctly percent-encoded. It implements all four levels of the spec: simple expansion {var}; reserved {+var} and fragment {#var} expansion; the label {.var}, path {/var}, path-style-parameter {;var}, query {?var} and query-continuation {&var} operators; multiple variables {x,y}; and the value modifiers — prefix {var:3} (first N characters) and explode {var*} (expand lists and maps element by element). Variables can be strings, lists or associative maps. The parse endpoint inspects a template and lists its expressions, operators and variable names. Everything is computed locally and deterministically, so it is instant and private. Ideal for REST and hypermedia clients, API SDKs and code generators, OpenAPI tooling, and link building. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This expands URI templates; for parsing or building query strings use a query-string API and for canonicalising URLs use a URL API."},"meta":{"timestamp":"2026-06-03T17:42:14.469Z","request_id":"2a76e2e1-2f8a-406e-9514-e5cbe19e3c9a"},"status":"ok","message":"Meta","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}}},"x-oanor-pricing":[{"slug":"free","name":"Free","price_cents_month":0,"monthly_call_quota":6235,"rps_limit":2,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":775,"monthly_call_quota":15750,"rps_limit":8,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":2765,"monthly_call_quota":208500,"rps_limit":20,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":6565,"monthly_call_quota":1085000,"rps_limit":50,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/uritemplate-api"}