# Get a post

> One post, render-ready: markdown and safe HTML, table of contents, head metadata, JSON-LD and related posts.

Canonical: https://revnu.com/docs/content-post

```bash
curl -H "Authorization: Bearer $REVNU_TOKEN" \
  https://revnu.com/api/content/v1/posts/graph-rag
```

## Response

```json
{
  "blog": { "creatorName": "…", "authorName": "…", "logoUrl": "…", "baseUrl": "…" },
  "post": {
    "slug": "graph-rag",
    "title": "…",
    "canonicalPath": "/guides/graph-rag",
    "canonicalUrl": "https://yourdomain.com/blog/guides/graph-rag",
    "body": { "markdown": "…", "html": "…" },
    "toc": [{ "text": "…", "slug": "…" }],
    "heroImageUrl": "https://…",
    "faqItems": [{ "question": "…", "answer": "…" }],
    "citations": ["https://…"],
    "publishedAt": 1753000000000,
    "updatedAt": 1753100000000
  },
  "headMeta": { "title": "…", "description": "…", "canonical": "…", "openGraph": {}, "twitter": {} },
  "jsonLd": [{ "@type": "Article" }, { "@type": "BreadcrumbList" }, { "@type": "FAQPage" }],
  "related": [{ "slug": "…", "title": "…", "canonicalPath": "…" }]
}
```

## Using it

- **Routing.** Use `canonicalPath`: `/{slug}` for regular posts, `/{prefix}/{slug}` for typed content such as guides and comparisons. Mount everything under one path, for example `/blog`.
- **Links between posts** in `body.html` are root-relative. If your blog mounts at `/blog`, rewrite them once when rendering: `html.replace(/href="\/(?!\/)/g, 'href="/blog/')`.
- **Styling.** Wrap `body.html` in a container and style plain tags. Raw HTML in the source is escaped and `javascript:` URLs are rejected, so it is safe to inject.
- **Head tags.** Pipe `headMeta` into your framework's metadata API and embed each `jsonLd` entry in a `<script type="application/ld+json">`. This is the same structured data the hosted blog ships.
- **Hero image.** `heroImageUrl` is a stable URL; hotlink it.

`404` for an unknown slug or an unknown or revoked token.

## Frequently asked questions

### Should I render the markdown or the HTML?

The HTML, unless you have a reason not to. It is the hosted blog's exact pipeline, already escaped, with a table of contents to match. The markdown is there for full control.

### Do I get the FAQ rich result too?

Yes. `jsonLd` includes the FAQPage entry when the post has FAQs; embed every entry and the rich results the hosted blog earns carry over.
