{"openapi":"3.1.0","info":{"title":"HTML API","version":"1.0.0","description":"A fast, fully-local HTML toolkit: extract structured data from supplied HTML (title, meta description, canonical link, language, Open Graph and Twitter card tags, links, images, headings and word counts), convert HTML to readable plain text, list all links resolved against a base URL, and sanitize HTML with a strict allowlist (scripts, iframes, inline event handlers, javascript: URLs and unknown tags are stripped). It works on the HTML you send and never fetches URLs (for live link previews see the oanor URL Tools API). Input via the query string or the request body, up to 2 MB. Pure server-side compute, no third-party upstream, so responses are instant and always available. Ideal for scrapers and data pipelines, comment and email sanitization, RAG and content extraction, and CMS tooling.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/html-api","description":"oanor gateway"}],"tags":[{"name":"HTML"}],"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/extract":{"get":{"operationId":"get_v1_extract","tags":["HTML"],"summary":"Extract structured data","description":"","parameters":[{"name":"html","in":"query","required":true,"description":"HTML markup","schema":{"type":"string"},"example":"<html><head><title>Example</title></head><body><h1>Hi</h1><a href=\"/about\">About</a></body></html>"},{"name":"base_url","in":"query","required":false,"description":"Base URL to resolve relative links","schema":{"type":"string"},"example":"https://example.com"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"links":[{"href":"https://example.com/about","text":"About"}],"title":"Example","counts":{"links":1,"words":1,"images":0,"headings":1},"images":[],"twitter":[],"headings":[{"text":"Hi","level":1}],"open_graph":[]},"meta":{"timestamp":"2026-05-30T09:00:22.850Z","request_id":"b62f3f51-8ae9-48f5-8d0f-bad8d2a7438e"},"status":"ok","message":"OK","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/links":{"get":{"operationId":"get_v1_links","tags":["HTML"],"summary":"List links","description":"","parameters":[{"name":"html","in":"query","required":true,"description":"HTML markup","schema":{"type":"string"},"example":"<html><head><title>Example</title></head><body><h1>Hi</h1><a href=\"/about\">About</a></body></html>"},{"name":"base_url","in":"query","required":false,"description":"Base URL","schema":{"type":"string"},"example":"https://example.com"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"count":1,"links":[{"href":"https://example.com/about","text":"About"}]},"meta":{"timestamp":"2026-05-30T09:00:22.926Z","request_id":"27b26579-6bb9-4936-822a-8dd8cec69701"},"status":"ok","message":"OK","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/sanitize":{"get":{"operationId":"get_v1_sanitize","tags":["HTML"],"summary":"Sanitize HTML","description":"","parameters":[{"name":"html","in":"query","required":true,"description":"HTML markup","schema":{"type":"string"},"example":"<p onclick=\"x()\">Hi<script>bad()</script></p>"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"html":"<p>Hi</p>","length":9},"meta":{"timestamp":"2026-05-30T09:00:22.997Z","request_id":"67d3bc59-668f-4984-ba92-9dadf3809203"},"status":"ok","message":"OK","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/text":{"get":{"operationId":"get_v1_text","tags":["HTML"],"summary":"HTML to plain text","description":"","parameters":[{"name":"html","in":"query","required":true,"description":"HTML markup","schema":{"type":"string"},"example":"<html><head><title>Example</title></head><body><h1>Hi</h1><a href=\"/about\">About</a></body></html>"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"text":"Hi\nAbout","length":8},"meta":{"timestamp":"2026-05-30T09:00:23.062Z","request_id":"aeccb657-806a-42cd-80f4-78001998eb4d"},"status":"ok","message":"OK","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":6000,"rps_limit":2,"hard_limit":true},{"slug":"basic","name":"Basic","price_cents_month":500,"monthly_call_quota":140000,"rps_limit":8,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":1700,"monthly_call_quota":900000,"rps_limit":25,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":4800,"monthly_call_quota":5000000,"rps_limit":80,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/html-api"}