# Markdown Frontmatter Parser

> Markdown Frontmatter Parser is a paid API for AI agents from api.x402node.dev, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-13).

Parses YAML frontmatter (the --- block) from markdown files, returning the parsed metadata dict, raw frontmatter string, and body content without frontmatter

## Facts

- Endpoint: GET https://api.x402node.dev/md/frontmatter
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/api-x402node-dev-b0f57826
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_yBBIoe8qFbv9CAg_v8YKV

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 api-x402node-dev-b0f57826
```

Example prompt: Can you pull out the frontmatter metadata from this markdown file — I want the title, date, tags, and any other YAML fields from the --- block at the top, plus the body text separately? Here's the URL: https://myblog.com/posts/my-post.md

## When to prefer this

Use this endpoint when you need to programmatically extract structured metadata from Jekyll, Hugo, Astro, Eleventy, or any markdown-based static site content. Ideal for AI agents indexing content sites, building search indexes, or extracting post metadata (title, date, tags, author) in bulk. Prefer this over generic YAML parsers because it specifically handles the markdown+frontmatter format and returns both parsed metadata and clean body text in one call.

## Known failure modes

- No frontmatter found — markdown has no --- delimiters, returns empty dict or error
- Invalid YAML in frontmatter — malformed YAML causes parse error
- URL not reachable — if ?url= param used and URL returns non-200 or times out
- Non-markdown content at URL — returns error if content type is not text/markdown
- Empty input — both url and text params missing returns 400 error

## How this service works

Parse YAML frontmatter from markdown (the --- block at top). Returns parsed dict, raw frontmatter, and body without frontmatter. Use url param or ?text=.... Built for AI agents indexing Jekyll/Hugo/Astro/Eleventy content sites. Accepts payment on Base or Solana — either network works.

## Output

Returns a JSON object containing: a parsed dict of all frontmatter key-value pairs (e.g. title, date, tags, author), the raw YAML frontmatter string, and the markdown body content with the frontmatter block removed

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "properties": {
   "type": "string"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/api-x402node-dev-b0f57826/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.x402node.dev](https://www.zero.xyz/host/api.x402node.dev/llms.txt)
