Add API Documentation to a WordPress Site
You don’t need a plugin for this — WordPress’s block editor has a Custom HTML block that outputs
whatever you paste into it exactly as written, including <script> tags, which normal paragraph or text
blocks strip out for safety.
Add a Custom HTML block
On the page or post where you want the docs, add a Custom HTML block (search for “Custom HTML” in the block inserter) and paste this in, replacing the spec URL with your own:
<div id="api-docs" style="height: 100vh"></div>
<script src="https://cdn.getman.dev/latest/getman-ui.js"></script>
<script>
GetMan.launch(
document.getElementById('api-docs'),
{ url: 'https://your-api.com/openapi.json' }
);
</script>
Use the block’s Preview tab to confirm it renders before publishing — the editor canvas itself doesn’t execute scripts, only the Preview and the live page do.
If your theme strips scripts
Some WordPress security plugins (Wordfence, certain “disable scripts in content” settings) block inline
<script> tags in post content by default. If the explorer doesn’t appear on the published page but does
in Preview, check your security plugin’s content-filtering settings for an allowlist rule, or add the
script via your theme’s wp_footer hook instead of the block editor.
Full-width layout
WordPress themes usually cap post content to a narrow reading width. For a docs page you’ll usually want a full-width or “Cover” template instead, so the three-pane explorer has enough horizontal room to be useful rather than being squeezed into a 700px column.
If cost is the main reason you’re avoiding a docs plugin, see free API documentation tool for what “free” guarantees beyond just this embed — no account, no paywalled features, ever.
Try it with your own spec
Paste any OpenAPI or Swagger URL and see it rendered live — no signup, no install.
Open the explorer