> **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-batch>
- **Markdown (.mdx) URL:** <https://www.socialfetch.dev/platforms/mastodon/posts-batch.mdx>

---

# Mastodon Posts Batch API

Up to 20 post ids from one server in one request, with the missing ones named.

`GET /v1/mastodon/posts/batch?host=mastodon.social&ids=1` takes one server and a comma-separated list of post ids from that server. It returns `data.posts` with full post records and `data.missingIds` for the requested ids the server did not return. A deleted post, a followers-only post and an id that never existed all land in `missingIds`, because the server does not tell them apart.

The route accepts 1 to 20 ids and does not page. Ids are local to the server: pass post ids from the same host, which you can collect from a profile's posts, a timeline or a batch of post URLs. Use it instead of one request per id when hydrating a page of posts.

## Request

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

## FAQ

### How do I pass the ids?

Send host with the server name and ids as a comma-separated list, for example ids=1,2. Between 1 and 20 ids are accepted, and duplicates are rejected.

### How many credits does one batch 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 is a post in missingIds?

The server did not return it: it was deleted, is not public, or the id never existed there. The server does not explain each id, so missingIds is the only signal.

### Can I batch posts from different servers?

No. One request asks one host. Split the ids by server, because post ids are local to the server that issued them.
