{"uid":"cap_ICS8I1t165recgyiPNuCX","slug":"markdown-front-matter-splitter-afd13f95","name":"Markdown Front-Matter Splitter","description":"Split YAML front-matter from a document — returns the parsed metadata object and the remaining content body. Malformed YAML is rejected as a clean 400.","url":"https://markdown.openverbs.com/v1/frontmatter","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":"object","required":["text"],"properties":{"text":{"type":"string","maxLength":500000,"description":"Document, optionally beginning with a --- YAML front-matter block."}},"additionalProperties":false},"type":{"type":"string","const":"http"},"method":{"enum":["POST"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","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.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_u0INuhJO1Mx5C7gABTBdb","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Parses and separates YAML front-matter from a Markdown document, returning the metadata object and the remaining content body as distinct fields.","exampleAgentPrompt":"Split the front matter from this markdown document and give me both the parsed metadata fields and the remaining body text: '---\\ntitle: My Post\\ndate: 2024-01-15\\ntags: [blog, writing]\\n---\\n\\n## Hello World\\n\\nThis is my content.'","exampleUseCases":[{"title":"Blog pipeline metadata extraction","prompt":"I have a folder of Jekyll blog posts in Markdown — pull the front matter out of this one so I can read the title, date, and tags separately from the article body: '---\\ntitle: Getting Started with Rust\\ndate: 2024-03-10\\nauthor: Jane Doe\\ntags: [rust, programming]\\n---\\n\\n# Getting Started\\n\\nRust is a systems programming language...'"},{"title":"CMS content ingestion validation","prompt":"Before I import this markdown file into our CMS, check that it has valid YAML front matter and show me the parsed metadata alongside the content body: '---\\ntitle: Q1 Product Update\\ncategory: announcements\\npublished: true\\n---\\n\\nWe are excited to announce...'"},{"title":"Static site build tooling","prompt":"Parse the front matter out of this Hugo page so I can use the layout, draft status, and slug fields in our build script: '---\\nlayout: post\\ndraft: false\\nslug: intro-to-agents\\nweight: 3\\n---\\n\\nAI agents are increasingly...'"}],"resultDescription":"Returns a parsed metadata object containing all YAML front-matter key-value pairs, plus a string of the remaining document body with the front-matter block stripped. If the document contains no front-matter block, the metadata object is empty and the full text is returned as the body. Malformed YAML front-matter triggers a 400 error with a descriptive rejection message.","failureModes":["Malformed YAML syntax in the front-matter block returns a 400 Bad Request with a parse error description","Document exceeding 500,000 characters is rejected","Missing required 'text' field in the request body returns a validation error","Front-matter block that is not properly delimited with '---' may be treated as having no front-matter","Payment failure or missing x402 payment header results in a 402 Payment Required response"],"whenToPreferThis":"Choose this endpoint when you need to reliably separate YAML front-matter metadata from Markdown document bodies — particularly useful in static site generator pipelines (Jekyll, Hugo, Gatsby), CMS ingestion workflows, or any agent that needs to read structured metadata fields (title, date, tags, author) independently from the prose content. Prefer this over manual string splitting or regex approaches when you need clean validation: malformed YAML is rejected with a 400 rather than silently producing garbage output.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T12:34:21.850Z","isFirstParty":false}