Structured JSON output for document layout

Async mdkit jobs also produce a structured JSON document — fetch it with format=json when you need layout and structure, not just text.

Last updated

Markdown is the right output for LLM prompts, but some pipelines need structure: what was a table, what was a heading, how the document was laid out. Async conversion jobs produce both outputs — Markdown for text, JSON for structure — and you choose per fetch.

Fetch both formats

curl -H "X-API-Key: $MDKIT_API_KEY" \
  "https://api.mdkit.online/v1/convert/jobs/$JOB_ID/result?format=markdown" -o doc.md
curl -H "X-API-Key: $MDKIT_API_KEY" \
  "https://api.mdkit.online/v1/convert/jobs/$JOB_ID/result?format=json" -o doc.json

The JSON document is the conversion engine's full structured representation of the input. The sync lane (POST /v1/convert) returns Markdown only — JSON output is an async-lane feature.

Try it

Try it free — submit one document through the async lane and diff the two outputs.

FAQ

How do I get structured JSON instead of Markdown?
Fetch an async job's result with format=json. JSON output is an async-lane feature — the synchronous /v1/convert endpoint returns Markdown only.
What is in the JSON document?
The conversion engine's full structured representation of the input — what was a heading, what was a table, how the document was laid out. Use it when you need structure rather than prompt-ready text.
Can I get both Markdown and JSON from one job?
Yes. A single async job produces both; you choose per fetch by changing the format parameter, at no extra credit cost.