{"openapi":"3.1.0","info":{"title":"Highlight API","version":"1.0.0","description":"Highlight search terms in text. The highlight endpoint wraps every match of one or more terms in a marker — defaulting to <mark>…</mark>, or any open/close strings you choose (** for Markdown, ANSI codes for the terminal, a CSS span, anything) — and returns the marked-up text and a match count. The snippets endpoint returns short excerpts of the surrounding context around each match, the way a search-results page shows where your query appears. Matching is case-insensitive by default with optional whole-word mode, and terms are matched literally (regex characters are safely escaped). Perfect for search results and in-page find, keyword spotting, log review and document previews. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. Distinct from search, summarization and diff APIs.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/highlight-api","description":"oanor gateway"}],"tags":[{"name":"Highlight"},{"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/highlight":{"get":{"operationId":"get_v1_highlight","tags":["Highlight"],"summary":"Highlight terms in text","description":"","parameters":[{"name":"text","in":"query","required":true,"description":"Text to search","schema":{"type":"string"},"example":"The quick brown fox jumps over the lazy dog"},{"name":"query","in":"query","required":true,"description":"Term or comma-separated terms","schema":{"type":"string"},"example":"fox,dog"},{"name":"open","in":"query","required":false,"description":"Marker start (default <mark>)","schema":{"type":"string"}},{"name":"close","in":"query","required":false,"description":"Marker end (default </mark>)","schema":{"type":"string"}},{"name":"case_insensitive","in":"query","required":false,"description":"true/false (default true)","schema":{"type":"string"}},{"name":"whole_word","in":"query","required":false,"description":"true/false","schema":{"type":"string"}}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"count":2,"terms":["fox","dog"],"highlighted":"The quick brown <mark>fox</mark> jumps over the lazy <mark>dog</mark>"},"meta":{"timestamp":"2026-06-03T09:25:08.672Z","request_id":"4700bb9e-c23f-4cdc-a2b9-efa98c69430b"},"status":"ok","message":"Highlight terms in text","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/snippets":{"get":{"operationId":"get_v1_snippets","tags":["Highlight"],"summary":"Snippets around matches","description":"","parameters":[{"name":"text","in":"query","required":true,"description":"Text to search","schema":{"type":"string"},"example":"The quick brown fox jumps over the lazy dog"},{"name":"query","in":"query","required":true,"description":"Term or terms","schema":{"type":"string"},"example":"fox"},{"name":"context","in":"query","required":false,"description":"Chars of context each side (default 40)","schema":{"type":"string"},"example":"40"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"count":1,"terms":["fox"],"snippets":[{"match":"fox","start":16,"snippet":"The quick brown <mark>fox</mark> jumps over the lazy dog"}]},"meta":{"timestamp":"2026-06-03T09:25:08.773Z","request_id":"0f6f38cb-a48d-4cb8-bacf-3e7b0ec0e0e0"},"status":"ok","message":"Snippets around matches","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":"Highlight API","notes":"Terms are matched literally (regex characters are escaped). The markers are inserted as-is — pick HTML-safe markers if you will render the result as HTML. Nothing is stored.","version":"v1","endpoints":[{"path":"/v1/highlight","params":{"open":"marker start (default <mark>)","text":"the text (required)","close":"marker end (default </mark>)","query":"a term or comma-separated terms (required)","whole_word":"true/false","case_insensitive":"default true"},"returns":"the highlighted text and match count"},{"path":"/v1/snippets","params":{"text":"the text (required)","query":"terms (required)","context":"chars of context each side (default 40)"},"returns":"a snippet around each match"},{"path":"/v1/meta","params":[],"returns":"this document"}],"description":"Highlight one or more search terms in text by wrapping every match in a marker (defaults to <mark>…</mark>, or any open/close strings you choose), and extract short snippets of surrounding context around each match — the way a search-results page shows matches. Case-insensitive by default, with optional whole-word matching. Pure local, no key."},"meta":{"timestamp":"2026-06-03T09:25:08.850Z","request_id":"5d1e81d1-0388-4385-9dd2-bb7e6627eb8f"},"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":1215,"rps_limit":2,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":255,"monthly_call_quota":10550,"rps_limit":8,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":2245,"monthly_call_quota":156500,"rps_limit":20,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":6045,"monthly_call_quota":825000,"rps_limit":50,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/highlight-api"}