/api/v1/audit/gfmAudit GFM compliance API
Single H1, fence langs, link/image hygiene.
POST /api/v1/audit/gfm runs a GitHub Flavored Markdown compliance checklist over a document: H1 count, fence language tags, link/image hygiene, pipe table validity.
Overview
Runs a quick GitHub Flavored Markdown checklist: single H1, fenced code blocks have a language tag, no empty link labels, images have alt text, pipe tables parse cleanly.
Request
Authenticate with Authorization: Bearer YOUR_API_KEY and send a JSON body containing the parameters below. Pick your language:
curl -X POST 'https://trymarkdownviewer.com/api/v1/audit/gfm' \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"markdown":"# A\n\n```\necho hi\n```"}'Body parameters
| Field | Type | Required | Description |
|---|---|---|---|
| markdown | string | required | Markdown source. |
Response
Success responses are wrapped in a data field. Errors use { error: { code, message } } with an appropriate HTTP status — see the error reference.
{
"data": {
"items": [
{
"id": "h1",
"label": "Single H1 (recommended)",
"ok": true,
"detail": "One H1."
},
{
"id": "fence-lang",
"label": "Fenced code blocks specify a language when possible",
"ok": false,
"detail": "At least one ``` fence lacks a language tag."
}
],
"passed": 1,
"total": 2
}
}Related endpoints
Try in browser
Free tools that run the same logic locally — no API key, no upload.
Try it
Send a real request against your account in the API playground. Errors there link straight back to the error reference.