Free trial: 3 of 3 test requests left. Get your own API key with 100 free credits. No credit card.
List the public posts of a Mastodon profile.
Endpoint
/v1/mastodon/profiles/{handle}/posts
Path
Account handle with its home server, e.g. `Gargron@mastodon.social`. A leading `acct:` or `@`, or a profile URL (`https://mastodon.social/@Gargron`, `https://mastodon.social/web/@Gargron`) is also accepted.
Query
`all` (default) includes replies and boosts, `original` leaves them out, `media` keeps posts with media, `pinned` returns the pinned posts.
Hashtag name without the `#`, e.g. `photography`. Letters of any script are allowed; the server folds case and accents.
Pass `page.nextCursor` from the previous response to get the next page.
Items per page, 1 to 40. Default: 20.
const response = await fetch( "https://api.socialfetch.dev/v1/mastodon/profiles/Gargron%40mastodon.social/posts", { headers: { "x-api-key": "YOUR_API_KEY" } } ); const data = await response.json(); console.log(data);