> **For coding agents and LLMs:** This is one Social Fetch marketing page (markdown export). For API orientation start with [`/llms.txt`](https://www.socialfetch.dev/llms.txt); for auth and crawl rules use [`/agents.txt`](https://www.socialfetch.dev/agents.txt); for every operation use [`/llms-endpoints.txt`](https://www.socialfetch.dev/llms-endpoints.txt).

## This page

- **On-site (HTML):** <https://www.socialfetch.dev/platforms/mastodon/posts-context>
- **Markdown (.mdx) URL:** <https://www.socialfetch.dev/platforms/mastodon/posts-context.mdx>

---

# Mastodon Reply Tree API

The conversation around a post: every parent and the replies, as full post records.

`GET /v1/mastodon/posts/context?url=https://mastodon.social/@Gargron/1` returns the conversation around the post, from the server in the post URL. `data.ancestors` holds the parents, oldest first. `data.descendants` holds the replies in thread order; without a login, servers return at most 60. Every entry is a full post with its `author`, `contentHtml`, `text`, `stats`, `media`, `hashtags`, `mentions` and `replyTo`, so one request gives you the whole thread without a lookup per reply.

A missing post returns `lookupStatus: not_found` with both lists empty. A server that needs a login for the thread returns `restricted`. There is no paging: the server decides how much of the tree is public.

## Request

- **Endpoint:** `GET /v1/mastodon/posts/context`
- **Credits:** 1 credit
Failed requests are free
- **Input:** by URL
- **Full reference:** [docs](https://www.socialfetch.dev/docs/api/v1/mastodon/posts/context/get)
- **Platform page:** [/platforms/mastodon](https://www.socialfetch.dev/platforms/mastodon)

## FAQ

### How are the two lists ordered?

ancestors go oldest first, from the root towards the post. descendants are in thread order, so a reply appears near what it answers. replyTo on each post names the post and account it answers.

### How many credits does a reply tree cost?

Pricing is documented on the operation in the API registry (shown on this page). Confirm on every response with meta.creditsCharged: that field is the billing source of truth.

### Why are there at most 60 replies?

The public tree is limited. Servers cap descendants at 60, and deeper replies can be omitted. The post and its ancestors are unaffected.

### Does the context include the post itself?

No. ancestors and descendants are around the post. Fetch GET /v1/mastodon/posts with the same URL for the post itself.
