mastodon-api/posts
Recent posts from the profile itself, via the official API of the account's own instance. No key.
| Name | What it is |
|---|---|
handle | user@instance. Without the instance, 400. |
limit | 1 to 40, default 20. Outside the range it is refused with 400 rather than clamped — the source clamps in silence, and someone asking for 100 would get 40 and think the account has 40 posts. |
user@instanceActivityPub uriA field we cannot read comes back null, never 0. A zero would be a claim about the account; null is a fact about our collection.
A boost is a third party's post and does not enter — 15 in every 20 of the raw feed. The outer object of a boost arrives with empty text and zeroed metrics, so counting them would report an account posting empty statuses. A reply to another person DOES enter, because the account wrote it. The body comes in two fields: text, already stripped of HTML, and text_html with the original — that one is third-party HTML and must be sanitised before it reaches a page.
1 credit per call. A call that finds nothing costs nothing.
Because a boost is not a post by this account. The outer object carries empty text and zeroed metrics.
Yes. The account wrote the reply, so it is the account's post.
No. It is third-party HTML and needs sanitising first, or you have an XSS. Use text if you want it already clean.