{"openapi":"3.1.0","info":{"title":"Link Header API","version":"1.0.0","description":"Parse and build RFC 8288 HTTP Link headers (Web Linking). The parse endpoint turns a Link header into a structured list — each link with its URI, its rel relation(s) and any target attributes (title, type, hreflang, media, anchor) — and also returns a handy rel→uri map, so you can grab the next, prev, first and last URLs for API pagination in a single step. It correctly handles the awkward parts: multiple comma-separated links, commas inside angle-bracketed URIs, quoted parameter values, multiple space-separated rel tokens, and RFC 8187 extended values. The build endpoint assembles a correct Link header from one or more link objects (or a single uri + rel with optional attributes), quoting values only where required. Everything is computed locally and deterministically, so it is instant and private. Ideal for paginated REST APIs and clients, hypermedia and HATEOAS, HTTP preload/prefetch hints, feed and alternate-format discovery, proxies and gateways. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This builds and parses the Link header string itself; it does not fetch a URL.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/linkheader-api","description":"oanor gateway"}],"tags":[{"name":"Link"},{"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/build":{"get":{"operationId":"get_v1_build","tags":["Link"],"summary":"Build a Link header","description":"","parameters":[{"name":"links","in":"query","required":false,"description":"JSON array of link objects ({uri, rel, title, …})","schema":{"type":"string"}},{"name":"uri","in":"query","required":false,"description":"Single link URI (alternative to links)","schema":{"type":"string"},"example":"https://x.com/p?page=2"},{"name":"rel","in":"query","required":false,"description":"Single link relation","schema":{"type":"string"},"example":"next"},{"name":"title","in":"query","required":false,"description":"Optional title attribute","schema":{"type":"string"}},{"name":"type","in":"query","required":false,"description":"Optional type attribute","schema":{"type":"string"}},{"name":"hreflang","in":"query","required":false,"description":"Optional hreflang attribute","schema":{"type":"string"}}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"count":1,"header":"<https://x.com/p?page=2>; rel=\"next\""},"meta":{"timestamp":"2026-06-03T09:25:03.609Z","request_id":"de136cff-fa37-4a6e-9a0b-d85316baaabd"},"status":"ok","message":"Build a Link header","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":["Link"],"summary":"Parse a Link header","description":"","parameters":[{"name":"header","in":"query","required":true,"description":"A Link header value","schema":{"type":"string"},"example":"<https://api.x.com/p?page=2>; rel=\"next\", <https://api.x.com/p?page=5>; rel=\"last\""}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"count":2,"links":[{"rel":"next","uri":"https://api.x.com/p?page=2","rel_tokens":["next"]},{"rel":"last","uri":"https://api.x.com/p?page=5","rel_tokens":["last"]}],"by_rel":{"last":"https://api.x.com/p?page=5","next":"https://api.x.com/p?page=2"}},"meta":{"timestamp":"2026-06-03T09:25:03.699Z","request_id":"ce80d2cf-f4cf-4e31-bf43-977503ba2e33"},"status":"ok","message":"Parse a Link header","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":"Link Header API","notes":"Relations with multiple values are space-separated inside one rel (rel=\"next last\"). Pagination relations are next, prev/previous, first and last. This builds and parses the Link header string — it does not fetch a URL. Nothing is stored.","version":"v1","endpoints":[{"path":"/v1/parse","params":{"header":"a Link header value (required)"},"returns":"the parsed links and a rel→uri map"},{"path":"/v1/build","params":{"rel":"single link relation","uri":"single link URI (alternative to links)","links":"a JSON array of link objects ({uri, rel, title, …})","title/type/hreflang…":"optional target attributes for the single link"},"returns":"the Link header string"},{"path":"/v1/meta","params":[],"returns":"this document"}],"description":"Parse and build RFC 8288 HTTP Link headers (Web Linking). The parse endpoint turns a Link header into a structured list — each link with its URI, rel relation(s) and target attributes (title, type, hreflang, media…) — plus a handy rel→uri map so you can grab next, prev, first and last for pagination in one step. The build endpoint assembles a correct Link header from one or more link objects, quoting values where needed. It correctly handles multiple comma-separated links, quoted parameters, multiple space-separated rel tokens and angle-bracketed URIs. Pure local, no key."},"meta":{"timestamp":"2026-06-03T09:25:03.776Z","request_id":"63fb8b88-575d-45aa-a01a-5d14dab91a6f"},"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":2535,"rps_limit":2,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":405,"monthly_call_quota":12050,"rps_limit":8,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":2395,"monthly_call_quota":171500,"rps_limit":20,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":6195,"monthly_call_quota":900000,"rps_limit":50,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/linkheader-api"}