Mastodon Hashtag timeline API
One page of the public tag timeline on instance. An empty page costs 0 credits.
Quick start
cURL
curl --request GET 'https://api.fetchproof.com/v1/mastodon/hashtag?hashtag=photography&instance=mastodon.social' \
--header 'x-api-key: YOUR_API_KEY' JavaScript
const response = await fetch("https://api.fetchproof.com/v1/mastodon/hashtag?hashtag=photography&instance=mastodon.social", {
method: 'GET',
headers: {
'x-api-key': process.env.FETCHPROOF_API_KEY,
},
});
const data = await response.json();
console.log(data); Python
import os
import requests
response = requests.get(
"https://api.fetchproof.com/v1/mastodon/hashtag?hashtag=photography&instance=mastodon.social",
headers={"x-api-key": os.environ["FETCHPROOF_API_KEY"]},
)
print(response.json()) Go
package main
import (
"fmt"
"io"
"net/http"
"os"
)
func main() {
req, _ := http.NewRequest("GET", "https://api.fetchproof.com/v1/mastodon/hashtag?hashtag=photography&instance=mastodon.social", nil)
req.Header.Set("x-api-key", os.Getenv("FETCHPROOF_API_KEY"))
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
} PHP
<?php
$ch = curl_init("https://api.fetchproof.com/v1/mastodon/hashtag?hashtag=photography&instance=mastodon.social");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
'x-api-key: ' . getenv('FETCHPROOF_API_KEY'),
],
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response; {
"success": true,
"credits_remaining": 100,
"credits_charged": 1,
"hashtag": "photography",
"statuses": [
{
"id": "117628237828267270",
"created_at": "2026-11-16T21:27:45.000Z",
"url": "https://pixelfed.social/p/CURTISSH/1028056062082996867",
"content": "<a href=\"https://pixelfed.social/discover/tags/sunset?src=hash\" class=\"u-url hashtag\" rel=\"nofollow noopener\" target=\"_blank\">#sunset</a> over <a href=\"https://pixelfed.social/discover/tags/boston?src=hash\" class=\"u-url hashtag\" rel=\"nof...",
"text": "#sunset over #boston #ocean #coastal #goldenhour #massachusetts #newengland #photography",
"spoiler_text": "",
"sensitive": false,
"language": null,
"replies_count": 0,
"reblogs_count": 0,
"favourites_count": 0,
"in_reply_to_id": null,
"account": {
"id": "113835796439658529",
"acct": "",
"username": "CURTISSH",
"display_name": "Curtis",
"url": "https://pixelfed.social/CURTISSH"
},
"media": [
{
"type": "image",
"url": "https://files.mastodon.social/cache/media_attachments/files/117/628/237/790/052/118/original/2a35359b4fbf9426.jpg",
"description": null
}
],
"tags": [
"photography",
"sunset",
"ocean"
],
"reblog": null
},
{
"id": "117628232287264296",
"created_at": "2026-11-16T21:26:24.268Z",
"url": "https://mastodon.social/@markmccaughrean/117628232287264296",
"content": "<p>Well, that’s one way of staying warm on another cold Edinburgh night 🥶🔥</p><p>I wonder if I can hire him (or is it them?) to keep my bedroom toasty? 🤨</p><p>As seen walking across the Meadows this evening – apparently Monday is fir...",
"text": "Well, that’s one way of staying warm on another cold Edinburgh night 🥶🔥\nI wonder if I can hire him (or is it them?) to keep my bedroom toasty? 🤨\nAs seen walking across the Meadows this evening – apparently Monday is fire spinning club...",
"spoiler_text": "",
"sensitive": false,
"language": "en",
"replies_count": 0,
"reblogs_count": 1,
"favourites_count": 0,
"in_reply_to_id": null,
"account": {
"id": "108194517328875592",
"acct": "markmccaughrean",
"username": "markmccaughrean",
"display_name": "Mark McCaughrean",
"url": "https://mastodon.social/@markmccaughrean"
},
"media": [
{
"type": "image",
"url": "https://files.mastodon.social/media_attachments/files/117/628/220/871/155/973/original/8dbbf53a98170c04.jpeg",
"description": "A long exposure photo taken at night showing a person spinning a staff with flames at both ends, making a rough ellipse of yellow. The person moved during the one second exposure, yielding two views of their face. The person is dressed i..."
}
],
"tags": [
"scotland",
"edinburgh",
"photography"
],
"reblog": null
},
{
"id": "117628221459115885",
"created_at": "2026-11-16T21:23:36.000Z",
"url": "https://sfba.social/@ram/117628221259943384",
"content": "<p>One from Steinbeck's backyard ;-)</p><p><a href=\"https://sfba.social/tags/photography\" class=\"mention hashtag\" rel=\"nofollow noopener\" target=\"_blank\">#<span>photography</span></a> <a href=\"https://sfba.social/tags/iPhone\" class=\"ment...",
"text": "One from Steinbeck's backyard ;-)\n#photography #iPhone #iPhonePhotography #montereyBay",
"spoiler_text": "",
"sensitive": false,
"language": "en",
"replies_count": 0,
"reblogs_count": 1,
"favourites_count": 0,
"in_reply_to_id": null,
"account": {
"id": "109295614011024424",
"acct": "",
"username": "ram",
"display_name": "Ram Prakash",
"url": "https://sfba.social/@ram"
},
"media": [
{
"type": "image",
"url": "https://files.mastodon.social/cache/media_attachments/files/117/628/221/335/875/907/original/c0130ec116a08389.jpg",
"description": "A photo of a beach with a concrete structure on the right. There is a painting of two men working on a boat on the concrete wall."
}
],
"tags": [
"photography",
"iphone",
"iphonephotography"
],
"reblog": null
}
],
"next_max_id": "117628032750983946"
} What it returns
- success boolean
- credits_remaining integer
- credits_charged integer
- hashtag string
- statuses array
- next_max_id string
- Pass as max_id for the next page. Null when this page is the last.
Parameters
Tag name, with or without a leading #.
Instance hostname.
Return statuses older than this id.
Serve a cached response when it is newer than this. A cache hit costs 0 credits.
Use cases
- Follow public discussion around a conference tag
- Collect hashtag posts for a community digest
- Find public release announcements tied to a project tag
- Review posts under a niche topic on the selected instance
Billing
Errors cost zero credits, and so do cache hits through cache_max_age. Empty results follow this operation’s rules.
Default: 1 credit when no rule matches.
- 0 credits when response field statuses is empty or absent.
An empty result costs 0 credits.
How charges are determined
Cost is decided per call, not per endpoint: the same operation can cost different amounts depending on what it returns.
A call that fails costs 0 credits. A result served from cache costs 0 credits.
`default` is the cost when no rule matches. Rules are evaluated in order and the first whose conditions all hold wins.
A `when` condition is one of: `param` (the request parameter is true), `outcome` (the classifier's outcome), `empty` / `nonEmpty` (a response field is empty and absent, or a non-empty array or string), `flag` (a response field is exactly true).
A cost of `{ perStartedMinute: n, of: [fields] }` is n x max(1, ceil(seconds / 60)), so even a short result bills at least one minute.
Guides
Related Mastodon endpoints
FAQ
How much does the Mastodon Hashtag timeline API cost?
A call costs 1 credit by default. A response whose statuses comes back empty costs 0 credits. Errors cost 0 credits, and a cached result served through cache_max_age costs 0. New accounts get 100 free credits with no card. After that, credits come in one-time packs that never expire: 25,000 for $27 and 500,000 for $297 (plus any tax). There is no subscription.
What do I need to call it?
An API key in the x-api-key header, plus hashtag and instance. You don't need a Mastodon account or developer app.
What does it return?
Typed JSON. Top-level fields include hashtag, statuses and next_max_id. The full schema and a real sample response are on this page and in the API reference.
Is this an official Mastodon API?
No. Fetchproof is an unofficial API that returns public Mastodon data only.