# Markdown Frontmatter to JSON Converter

> Markdown Frontmatter to JSON Converter is a paid API for AI agents from toolshed.lemon-agent.dev, paid per call via x402, $0.004/call, status unknown (last checked 2026-09-14).

Parses YAML frontmatter from a Markdown file and returns the metadata as structured JSON alongside the raw body content.

## Facts

- Endpoint: POST https://toolshed.lemon-agent.dev/convert/frontmatter-json
- Price: $0.004/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/markdown-frontmatter-to-json-converter-65c8b37a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_BEk75y6ka8Wp1GxqeukYv

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability markdown-frontmatter-to-json-converter-65c8b37a -d '<json body>'
```

Example prompt: 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.

## When to prefer this

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.

## Known failure modes

- 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

## How this service works

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.

## Output

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.

## Request schema (JSON Schema)

```json
{
 "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
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/markdown-frontmatter-to-json-converter-65c8b37a/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from toolshed.lemon-agent.dev](https://www.zero.xyz/host/toolshed.lemon-agent.dev/llms.txt)
