Mastodon API
Federated open-source social network
Live Technical Metrics
Pre-calculated · updated every 20 min| Uptime Status | ⬜ Unknown — not yet probed |
|---|---|
| Server Latency | N/A |
| Hosting Server | Not disclosed |
| Content-Type | Not disclosed |
| Cache-Control | Not set |
| CORS Support | ✅ Enabled — safe for browser fetch() |
| Authentication | ⚠️ Requires OAuth — obtain credentials from the official documentation |
| Category | Social |
- Endpoint:
- https://docs.joinmastodon.org/api/
Quick Integration Code
⚠️ Auth: OAuth// ⚠️ This API requires OAuth authentication
// Add your credentials to the headers below
fetch("https://docs.joinmastodon.org/api/")
.then(response => {
if (!response.ok) throw new Error(`HTTP ${response.status}`);
return response.json();
})
.then(data => console.log(data))
.catch(error => console.error("Request failed:", error));
# ⚠️ This API requires OAuth authentication
# Add your credentials to the headers dict below
import requests
url = "https://docs.joinmastodon.org/api/"
headers = {
"Accept": "application/json",
# "Authorization": "Bearer YOUR_TOKEN_HERE",
}
response = requests.get(url, headers=headers, timeout=10)
response.raise_for_status()
data = response.json()
print(data)
curl -X GET "https://docs.joinmastodon.org/api/" \
-H "Authorization: Bearer YOUR_TOKEN_HERE" \
-H "Accept: application/json" \
-H "User-Agent: MyApp/1.0" \
--max-time 10 \
--silent | python3 -m json.tool
Sample JSON Response — Social
Social{
"data": {
"id": "1627349282885754880",
"text": "Introducing our new API endpoint for developers!",
"author_id": "2244994945",
"created_at": "2025-01-15T18:00:00.000Z",
"public_metrics": {
"retweet_count": 142,
"reply_count": 38,
"like_count": 892,
"quote_count": 21
}
}
}