Mastodon API: Fetching Single Post Data

About This Method

Instead of embedding a pre-formatted post, you can fetch the raw data for a specific status directly from the Mastodon API's /api/v1/statuses/:id endpoint. This gives you complete control over how you display the information.

This example uses the browser's fetch() API in JavaScript to retrieve the data for post 109349688112355529 from macaw.social and displays the raw JSON response below.

You could try the API endpoint directly using a tool like curl:

curl https://macaw.social/api/v1/statuses/109349688112355529

Raw API Response (JSON)

The following is the raw JSON data returned by the API for the specified post:

Loading API data...