# Mastodon API

Category: [Social media](https://free-web-services.com/web-services/communication/social-media/)  
Page: https://free-web-services.com/web-services/communication/social-media/mastodon-api.html  
Documentation: https://docs.joinmastodon.org/client/public/

The Mastodon API works with any Mastodon server in the fediverse: read public timelines, hashtags, accounts and posts, and with OAuth publish posts, follow accounts and upload media. Call https:///api/v1/... for example /api/v1/timelines/tag/cats, and get JSON back. Some servers switch off public timelines, so check the server you use. Free, no key needed for public data; posting needs an OAuth token from the server.

- API key: Not needed
- Pricing: Free, no key needed for public data; posting needs an OAuth token from the server.
- From the browser: Yes (CORS)
- Formats: JSON
- Interface: REST, HTTP-GET
- Provider: docs.joinmastodon.org
- Last checked: Working on November 1st, 2026

Example request:

```sh
curl 'https://mastodon.social/api/v1/trends/tags?limit=1'
```

The JavaScript works in a web page as well as in Node.js 18 or newer.

