Free trial: 3 of 3 test requests left. Get your own API key with 100 free credits. No credit card.
List the public timeline of a Mastodon server.
Endpoint
/v1/mastodon/timelines/public
Query
The Mastodon server to ask, e.g. `mastodon.social`. A server URL is also accepted. The server you name is the one that answers.
`all` (default) is everything the server has seen, `local` only the server's own accounts, `remote` only accounts from other servers.
Only posts with media attachments.
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/timelines/public?host=fosstodon.org", { headers: { "x-api-key": "YOUR_API_KEY" } } ); const data = await response.json(); console.log(data);