Recent posts on mastodon

Posts recentes do proprio perfil no Mastodon, via API oficial da instancia da conta (sem chave). O handle e SEMPRE usuario@instancia: o Mastodon e federado, e o nome sozinho nao identifica ninguem. Aceita ?limit= de 1 a 40, padrao 20; valor fora da faixa e recusado com 400 em vez de aparado -- a fonte apara em silencio, e quem pedisse 100 receberia 40 achando que a conta tem 40 posts. Boost (repasse de terceiro) NAO entra: sao 15 em cada 20 no feed cru, e o objeto de cima de um boost vem com texto vazio e metricas zeradas. Resposta a outra pessoa entra, porque foi a conta que escreveu. Devolve likes, replies, reposts e quotes. O corpo vem em DOIS campos: text ja limpo de HTML, e text_html com o original -- este ultimo e HTML de terceiro e precisa ser sanitizado antes de ir para uma pagina, sob risco de XSS. title e sempre null (status nao tem titulo) e position e sempre null (ordem cronologica nao e ranking).

get/api/v1/mastodon/posts

Request

  • Base URL: https://honesthook.com
  • URL: https://honesthook.com/api/v1/mastodon/posts
  • Auth: HTTP bearer

Query parameters

handlestring required
Example:Gargron@mastodon.social

user@instance, and the instance is required. Mastodon is federated: Gargron alone identifies nobody, because a different person can hold that name on every server. A handle without an instance is refused with 400 rather than completed with a default server — completing it would return somebody else's profile with success: true. The instance must be a public DNS name: IP literals, ports and paths are refused. The handle comes back fully qualified, so the response value is a valid next request.

limitinteger

How many posts to return, 1 to 40. A value outside the range is refused with 400, not clamped: the source clamps in silence, and a caller asking for more than the maximum would conclude the account has fewer posts than it does.

Response

Posts found. has_more differs by platform: on Bluesky it is computed from the cursor the source returns, so it can be true. On Mastodon it is false today because we do not yet read the Link header. On Threads it is null — the posts arrive inside the profile document and there is nothing to page, so we cannot know. null means unknown, never no more.

successboolean required
platformstring required
endpointstring required
errorobject nullable required
credits_usedinteger required
cachedboolean required
request_idstring required

Changes

No recorded changes to this operation across all 1 revision of this API.