{"uid":"cap_BEk75y6ka8Wp1GxqeukYv","slug":"markdown-frontmatter-to-json-converter-65c8b37a","name":"Markdown Frontmatter to JSON Converter","description":"Markdown frontmatter to JSON. POST a Markdown file that begins with a --- fence; the response is {\"data\": the parsed YAML frontmatter, \"content\": the body returned byte for byte}. A file with no opening fence is refused rather than reported as having no metadata, because a mistyped fence should not look like an empty one.","url":"https://toolshed.lemon-agent.dev/convert/frontmatter-json","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","bodyType","body"],"properties":{"body":{"type":"string","maxLength":262144,"description":"the raw Markdown with YAML frontmatter file as the request body, up to 256 KB"},"type":{"type":"string","const":"http"},"method":{"type":"string","const":"POST"},"bodyType":{"type":"string","const":"text"}},"additionalProperties":false},"output":{"type":"object","required":["type","format"],"properties":{"type":{"type":"string","const":"text"},"format":{"type":"string","const":"application/json","description":"the converted JSON file as the response body (application/json)"},"example":{"type":"string","description":"the sample request body above, converted — what a the converted JSON file as the response body (application/json) looks like"}},"additionalProperties":false}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.004","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.004/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.004","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.004","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_Srr3PQcO2FCw5VcfQywgn","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.004","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Parses YAML frontmatter from a Markdown file and returns the metadata as structured JSON alongside the raw body content.","exampleAgentPrompt":"Pull out the YAML frontmatter from this Markdown file as JSON — I need the metadata fields (like title, date, and tags) separated from the body content.","exampleUseCases":[{"title":"Blog post metadata extraction","prompt":"I have a Jekyll blog post Markdown file with a YAML frontmatter block containing title, date, author, and tags — can you parse out all that frontmatter as a JSON object and give me the body text separately?"},{"title":"Static site content pipeline","prompt":"For my Hugo site build pipeline, take this Markdown file and extract the frontmatter into structured JSON so I can index the metadata in my content database without manual parsing."},{"title":"Document metadata validation workflow","prompt":"I need to check the frontmatter fields in this Markdown file — can you convert the YAML header to JSON so I can verify that the required fields like title and published_date are present and correctly formatted?"}],"resultDescription":"A JSON object with two keys: `data` containing the parsed YAML frontmatter as a structured object, and `content` containing the Markdown body text (everything after the closing --- fence) returned byte-for-byte. Files missing an opening --- fence are rejected with an error rather than treated as having empty metadata.","failureModes":["File has no opening --- fence — request is refused with an error (not treated as empty frontmatter)","Malformed YAML inside the frontmatter fence causes a parse error","File exceeds 256 KB size limit","YAML frontmatter is syntactically valid but contains unsupported types","Missing or incorrect Content-Type header may cause processing issues","Payment not included or insufficient — x402 payment required at $0.004 USDC per call"],"whenToPreferThis":"Choose this endpoint when you need to reliably separate YAML frontmatter metadata from Markdown body content and receive the result as structured JSON — especially when strict enforcement of the opening fence is desirable (malformed fences are rejected, not silently ignored). Ideal for static site pipelines (Jekyll, Hugo, Gatsby), content indexing workflows, and document metadata extraction tasks where the frontmatter schema matters.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T06:41:55.321Z","isFirstParty":false}