Mastodon
What Mastodon data is for.
Use Mastodon when you need public profiles and creator metadata, posts, videos and catalog records, comments and reviews, search and discovery without maintaining a separate adapter for each route. Start with the lowest-cost live operation, then add search or list endpoints only when the response shape fits your product.
Live
23
Paid only
0
Price floor
1 cr
Use cases
Mastodon account
Call /v1/mastodon/account when you need a normalized mastodon account response with the same credit and cache rules as the rest of the catalog.
Mastodon statuses
Call /v1/mastodon/statuses when you need a normalized mastodon statuses response with the same credit and cache rules as the rest of the catalog.
Mastodon hashtag
Call /v1/mastodon/tag when you need a normalized mastodon hashtag response with the same credit and cache rules as the rest of the catalog.
Auth & error contract.
Auth
Send x-api-key: cf_live_... or Authorization: Bearer cf_live_.... A missing or invalid key returns 401.
Billing
Successful lookups charge the listed credits. Cache hits, 5xx responses and mapped 503 routes cost 0 credits.
Limits
429 includes Retry-After and costs nothing. Paid-only routes return 403 plan_required before any provider call.
Mapped routes
4 routes are cataloged but not connected. They return 503 upstream_not_configured and never charge.
Operations
Live / 23
readyMastodon account
/v1/mastodon/account| Name | Type | Required | Description |
|---|---|---|---|
| instance | string | yes | Mastodon instance hostname, for example mastodon.social. |
| username | string | yes | Public handle without the @ prefix. |
curl -s "https://api.cleanfetch.dev/v1/mastodon/account?instance=mastodon.social&username=nasa" \ -H "x-api-key: $CLEANFETCH_API_KEY"
{
"data": {
"platform": "mastodon",
"id": "123456",
"username": "nasa",
"name": "NASA",
"url": "https://example.com/nasa",
"followers": 12500000,
"description": "Public profile record normalized by CleanFetch."
},
"meta": {
"lookupStatus": "found",
"creditsCharged": 1,
"cached": false
}
}Returns
platformidusernamenameurlfollowersdescriptionInput notes
- • Free accounts can call this endpoint up to 5 times per day.
- • Responses are cached for 1h.
- • A public record that does not exist returns not_found and is charged once.
Mastodon statuses
/v1/mastodon/statuses| Name | Type | Required | Description |
|---|---|---|---|
| instance | string | yes | Mastodon instance hostname, for example mastodon.social. |
| username | string | yes | Public handle without the @ prefix. |
| limit | string | no | Maximum records to return, from 1 to 20. |
curl -s "https://api.cleanfetch.dev/v1/mastodon/statuses?instance=mastodon.social&username=nasa" \ -H "x-api-key: $CLEANFETCH_API_KEY"
{
"data": {
"platform": "mastodon",
"count": 1,
"items": [
{
"id": "123456",
"url": "https://example.com/item/123456",
"text": "Example public post returned by this endpoint.",
"createdAt": "2026-11-30T00:00:00.000Z",
"author": {
"username": "nasa",
"name": "NASA"
}
}
]
},
"meta": {
"lookupStatus": "found",
"creditsCharged": 2,
"cached": false
}
}Returns
platformcountitems[].iditems[].urlitems[].textitems[].createdAtInput notes
- • Free accounts can call this endpoint up to 3 times per day.
- • Responses are cached for 6h.
- • A public record that does not exist returns not_found and is charged once.
Mastodon hashtag
/v1/mastodon/tag| Name | Type | Required | Description |
|---|---|---|---|
| instance | string | yes | Mastodon instance hostname, for example mastodon.social. |
| hashtag | string | yes | Hashtag without the # prefix. |
| limit | string | no | Maximum records to return, from 1 to 20. |
curl -s "https://api.cleanfetch.dev/v1/mastodon/tag?instance=mastodon.social&hashtag=nike" \ -H "x-api-key: $CLEANFETCH_API_KEY"
{
"data": {
"platform": "mastodon",
"count": 1,
"items": [
{
"id": "123456",
"url": "https://example.com/item/123456",
"text": "Example public post returned by this endpoint.",
"createdAt": "2026-11-30T00:00:00.000Z",
"author": {
"username": "nasa",
"name": "NASA"
}
}
]
},
"meta": {
"lookupStatus": "found",
"creditsCharged": 2,
"cached": false
}
}Returns
platformcountitems[].iditems[].urlitems[].textitems[].createdAtInput notes
- • Free accounts can call this endpoint up to 3 times per day.
- • Responses are cached for 6h.
- • A public record that does not exist returns not_found and is charged once.
List Mastodon server profile directory
/v1/mastodon/directory| Name | Type | Required | Description |
|---|---|---|---|
| host | string | yes | Lookup parameter. |
| order | string | no | Lookup parameter. |
| scope | string | no | Lookup parameter. |
| cursor | string | no | Lookup parameter. |
| offset | string | no | Lookup parameter. |
| limit | string | no | Maximum records to return, from 1 to 20. |
curl -s "https://api.cleanfetch.dev/v1/mastodon/directory?host=example" \ -H "x-api-key: $CLEANFETCH_API_KEY"
{
"data": {
"platform": "mastodon",
"count": 1,
"items": [
{
"id": "123456",
"url": "https://example.com/item/123456",
"text": "Example public post returned by this endpoint.",
"createdAt": "2026-11-30T00:00:00.000Z",
"author": {
"username": "nasa",
"name": "NASA"
}
}
]
},
"meta": {
"lookupStatus": "found",
"creditsCharged": 1,
"cached": false
}
}Returns
platformcountitems[].iditems[].urlitems[].textitems[].createdAtInput notes
- • Free accounts can call this endpoint up to 3 times per day.
- • Responses are cached for 6h.
- • A public record that does not exist returns not_found and is charged once.
Get Mastodon post
/v1/mastodon/posts| Name | Type | Required | Description |
|---|---|---|---|
| url | string | yes | Public page, post, profile or video URL. |
curl -s "https://api.cleanfetch.dev/v1/mastodon/posts?url=https%3A%2F%2Fcleanfetch.dev" \ -H "x-api-key: $CLEANFETCH_API_KEY"
{
"data": {
"platform": "mastodon",
"count": 1,
"items": [
{
"id": "123456",
"url": "https://example.com/item/123456",
"text": "Example public post returned by this endpoint.",
"createdAt": "2026-11-30T00:00:00.000Z",
"author": {
"username": "nasa",
"name": "NASA"
}
}
]
},
"meta": {
"lookupStatus": "found",
"creditsCharged": 1,
"cached": false
}
}Returns
platformcountitems[].iditems[].urlitems[].textitems[].createdAtInput notes
- • Free accounts can call this endpoint up to 3 times per day.
- • Responses are cached for 6h.
- • A public record that does not exist returns not_found and is charged once.
Get Mastodon post reply tree
/v1/mastodon/posts/context| Name | Type | Required | Description |
|---|---|---|---|
| url | string | yes | Public page, post, profile or video URL. |
curl -s "https://api.cleanfetch.dev/v1/mastodon/posts/context?url=https%3A%2F%2Fcleanfetch.dev" \ -H "x-api-key: $CLEANFETCH_API_KEY"
{
"data": {
"platform": "mastodon",
"count": 1,
"items": [
{
"id": "123456",
"url": "https://example.com/item/123456",
"text": "Example public post returned by this endpoint.",
"createdAt": "2026-11-30T00:00:00.000Z",
"author": {
"username": "nasa",
"name": "NASA"
}
}
]
},
"meta": {
"lookupStatus": "found",
"creditsCharged": 1,
"cached": false
}
}Returns
platformcountitems[].iditems[].urlitems[].textitems[].createdAtInput notes
- • Free accounts can call this endpoint up to 3 times per day.
- • Responses are cached for 6h.
- • A public record that does not exist returns not_found and is charged once.
List Mastodon post edit history
/v1/mastodon/posts/edits| Name | Type | Required | Description |
|---|---|---|---|
| url | string | yes | Public page, post, profile or video URL. |
curl -s "https://api.cleanfetch.dev/v1/mastodon/posts/edits?url=https%3A%2F%2Fcleanfetch.dev" \ -H "x-api-key: $CLEANFETCH_API_KEY"
{
"data": {
"platform": "mastodon",
"count": 1,
"items": [
{
"id": "123456",
"url": "https://example.com/item/123456",
"text": "Example public post returned by this endpoint.",
"createdAt": "2026-11-30T00:00:00.000Z",
"author": {
"username": "nasa",
"name": "NASA"
}
}
]
},
"meta": {
"lookupStatus": "found",
"creditsCharged": 1,
"cached": false
}
}Returns
platformcountitems[].iditems[].urlitems[].textitems[].createdAtInput notes
- • Free accounts can call this endpoint up to 3 times per day.
- • Responses are cached for 6h.
- • A public record that does not exist returns not_found and is charged once.
List Mastodon post boosts and likes
/v1/mastodon/posts/reactions| Name | Type | Required | Description |
|---|---|---|---|
| url | string | yes | Public page, post, profile or video URL. |
| kind | string | yes | Lookup parameter. |
| cursor | string | no | Lookup parameter. |
| limit | string | no | Maximum records to return, from 1 to 20. |
curl -s "https://api.cleanfetch.dev/v1/mastodon/posts/reactions?url=https%3A%2F%2Fcleanfetch.dev&kind=example" \ -H "x-api-key: $CLEANFETCH_API_KEY"
{
"data": {
"platform": "mastodon",
"count": 1,
"items": [
{
"id": "123456",
"url": "https://example.com/item/123456",
"text": "Example public post returned by this endpoint.",
"createdAt": "2026-11-30T00:00:00.000Z",
"author": {
"username": "nasa",
"name": "NASA"
}
}
]
},
"meta": {
"lookupStatus": "found",
"creditsCharged": 1,
"cached": false
}
}Returns
platformcountitems[].iditems[].urlitems[].textitems[].createdAtInput notes
- • Free accounts can call this endpoint up to 3 times per day.
- • Responses are cached for 6h.
- • A public record that does not exist returns not_found and is charged once.
Get Mastodon profile
/v1/mastodon/profiles/{handle}| Name | Type | Required | Description |
|---|---|---|---|
| handle | string | yes | Public handle or username. |
| include | string | no | Lookup parameter. |
curl -s "https://api.cleanfetch.dev/v1/mastodon/profiles/{handle}" \
-H "x-api-key: $CLEANFETCH_API_KEY"{
"data": {
"platform": "mastodon",
"count": 1,
"items": [
{
"id": "123456",
"url": "https://example.com/item/123456",
"text": "Example public post returned by this endpoint.",
"createdAt": "2026-11-30T00:00:00.000Z",
"author": {
"username": "nasa",
"name": "NASA"
}
}
]
},
"meta": {
"lookupStatus": "found",
"creditsCharged": 1,
"cached": false
}
}Returns
platformcountitems[].iditems[].urlitems[].textitems[].createdAtInput notes
- • Free accounts can call this endpoint up to 3 times per day.
- • Responses are cached for 6h.
- • A public record that does not exist returns not_found and is charged once.
List Mastodon profile followers
/v1/mastodon/profiles/{handle}/followers| Name | Type | Required | Description |
|---|---|---|---|
| handle | string | yes | Public handle or username. |
| cursor | string | no | Lookup parameter. |
| limit | string | no | Maximum records to return, from 1 to 20. |
curl -s "https://api.cleanfetch.dev/v1/mastodon/profiles/{handle}/followers" \
-H "x-api-key: $CLEANFETCH_API_KEY"{
"data": {
"platform": "mastodon",
"count": 1,
"items": [
{
"id": "123456",
"url": "https://example.com/item/123456",
"text": "Example public post returned by this endpoint.",
"createdAt": "2026-11-30T00:00:00.000Z",
"author": {
"username": "nasa",
"name": "NASA"
}
}
]
},
"meta": {
"lookupStatus": "found",
"creditsCharged": 1,
"cached": false
}
}Returns
platformcountitems[].iditems[].urlitems[].textitems[].createdAtInput notes
- • Free accounts can call this endpoint up to 3 times per day.
- • Responses are cached for 6h.
- • A public record that does not exist returns not_found and is charged once.
List who a Mastodon profile follows
/v1/mastodon/profiles/{handle}/following| Name | Type | Required | Description |
|---|---|---|---|
| handle | string | yes | Public handle or username. |
| cursor | string | no | Lookup parameter. |
| limit | string | no | Maximum records to return, from 1 to 20. |
curl -s "https://api.cleanfetch.dev/v1/mastodon/profiles/{handle}/following" \
-H "x-api-key: $CLEANFETCH_API_KEY"{
"data": {
"platform": "mastodon",
"count": 1,
"items": [
{
"id": "123456",
"url": "https://example.com/item/123456",
"text": "Example public post returned by this endpoint.",
"createdAt": "2026-11-30T00:00:00.000Z",
"author": {
"username": "nasa",
"name": "NASA"
}
}
]
},
"meta": {
"lookupStatus": "found",
"creditsCharged": 1,
"cached": false
}
}Returns
platformcountitems[].iditems[].urlitems[].textitems[].createdAtInput notes
- • Free accounts can call this endpoint up to 3 times per day.
- • Responses are cached for 6h.
- • A public record that does not exist returns not_found and is charged once.
List Mastodon profile posts
/v1/mastodon/profiles/{handle}/posts| Name | Type | Required | Description |
|---|---|---|---|
| handle | string | yes | Public handle or username. |
| filter | string | no | Lookup parameter. |
| tag | string | no | Lookup parameter. |
| cursor | string | no | Lookup parameter. |
| limit | string | no | Maximum records to return, from 1 to 20. |
| labels | string | no | Lookup parameter. |
curl -s "https://api.cleanfetch.dev/v1/mastodon/profiles/{handle}/posts" \
-H "x-api-key: $CLEANFETCH_API_KEY"{
"data": {
"platform": "mastodon",
"count": 1,
"items": [
{
"id": "123456",
"url": "https://example.com/item/123456",
"text": "Example public post returned by this endpoint.",
"createdAt": "2026-11-30T00:00:00.000Z",
"author": {
"username": "nasa",
"name": "NASA"
}
}
]
},
"meta": {
"lookupStatus": "found",
"creditsCharged": 1,
"cached": false
}
}Returns
platformcountitems[].iditems[].urlitems[].textitems[].createdAtInput notes
- • Free accounts can call this endpoint up to 3 times per day.
- • Responses are cached for 6h.
- • A public record that does not exist returns not_found and is charged once.
Search Mastodon server
/v1/mastodon/search| Name | Type | Required | Description |
|---|---|---|---|
| host | string | yes | Lookup parameter. |
| query | string | yes | Search query or keyword. |
| type | string | no | Lookup parameter. |
| limit | string | no | Maximum records to return, from 1 to 20. |
curl -s "https://api.cleanfetch.dev/v1/mastodon/search?host=example&query=nike" \ -H "x-api-key: $CLEANFETCH_API_KEY"
{
"data": {
"platform": "mastodon",
"count": 1,
"items": [
{
"id": "123456",
"url": "https://example.com/item/123456",
"text": "Example public post returned by this endpoint.",
"createdAt": "2026-11-30T00:00:00.000Z",
"author": {
"username": "nasa",
"name": "NASA"
}
}
]
},
"meta": {
"lookupStatus": "found",
"creditsCharged": 1,
"cached": false
}
}Returns
platformcountitems[].iditems[].urlitems[].textitems[].createdAtInput notes
- • Free accounts can call this endpoint up to 3 times per day.
- • Responses are cached for 6h.
- • A public record that does not exist returns not_found and is charged once.
Get Mastodon server
/v1/mastodon/servers/{host}| Name | Type | Required | Description |
|---|---|---|---|
| host | string | yes | Lookup parameter. |
| include | string | no | Lookup parameter. |
curl -s "https://api.cleanfetch.dev/v1/mastodon/servers/{host}" \
-H "x-api-key: $CLEANFETCH_API_KEY"{
"data": {
"platform": "mastodon",
"count": 1,
"items": [
{
"id": "123456",
"url": "https://example.com/item/123456",
"text": "Example public post returned by this endpoint.",
"createdAt": "2026-11-30T00:00:00.000Z",
"author": {
"username": "nasa",
"name": "NASA"
}
}
]
},
"meta": {
"lookupStatus": "found",
"creditsCharged": 1,
"cached": false
}
}Returns
platformcountitems[].iditems[].urlitems[].textitems[].createdAtInput notes
- • Free accounts can call this endpoint up to 3 times per day.
- • Responses are cached for 6h.
- • A public record that does not exist returns not_found and is charged once.
Get Mastodon server weekly activity
/v1/mastodon/servers/{host}/activity| Name | Type | Required | Description |
|---|---|---|---|
| host | string | yes | Lookup parameter. |
curl -s "https://api.cleanfetch.dev/v1/mastodon/servers/{host}/activity" \
-H "x-api-key: $CLEANFETCH_API_KEY"{
"data": {
"platform": "mastodon",
"count": 1,
"items": [
{
"id": "123456",
"url": "https://example.com/item/123456",
"text": "Example public post returned by this endpoint.",
"createdAt": "2026-11-30T00:00:00.000Z",
"author": {
"username": "nasa",
"name": "NASA"
}
}
]
},
"meta": {
"lookupStatus": "found",
"creditsCharged": 1,
"cached": false
}
}Returns
platformcountitems[].iditems[].urlitems[].textitems[].createdAtInput notes
- • Free accounts can call this endpoint up to 3 times per day.
- • Responses are cached for 6h.
- • A public record that does not exist returns not_found and is charged once.
List Mastodon server domain blocks
/v1/mastodon/servers/{host}/blocks| Name | Type | Required | Description |
|---|---|---|---|
| host | string | yes | Lookup parameter. |
curl -s "https://api.cleanfetch.dev/v1/mastodon/servers/{host}/blocks" \
-H "x-api-key: $CLEANFETCH_API_KEY"{
"data": {
"platform": "mastodon",
"count": 1,
"items": [
{
"id": "123456",
"url": "https://example.com/item/123456",
"text": "Example public post returned by this endpoint.",
"createdAt": "2026-11-30T00:00:00.000Z",
"author": {
"username": "nasa",
"name": "NASA"
}
}
]
},
"meta": {
"lookupStatus": "found",
"creditsCharged": 1,
"cached": false
}
}Returns
platformcountitems[].iditems[].urlitems[].textitems[].createdAtInput notes
- • Free accounts can call this endpoint up to 3 times per day.
- • Responses are cached for 6h.
- • A public record that does not exist returns not_found and is charged once.
List Mastodon server peers
/v1/mastodon/servers/{host}/peers| Name | Type | Required | Description |
|---|---|---|---|
| host | string | yes | Lookup parameter. |
| q | string | no | Lookup parameter. |
| cursor | string | no | Lookup parameter. |
| limit | string | no | Maximum records to return, from 1 to 20. |
curl -s "https://api.cleanfetch.dev/v1/mastodon/servers/{host}/peers" \
-H "x-api-key: $CLEANFETCH_API_KEY"{
"data": {
"platform": "mastodon",
"count": 1,
"items": [
{
"id": "123456",
"url": "https://example.com/item/123456",
"text": "Example public post returned by this endpoint.",
"createdAt": "2026-11-30T00:00:00.000Z",
"author": {
"username": "nasa",
"name": "NASA"
}
}
]
},
"meta": {
"lookupStatus": "found",
"creditsCharged": 1,
"cached": false
}
}Returns
platformcountitems[].iditems[].urlitems[].textitems[].createdAtInput notes
- • Free accounts can call this endpoint up to 3 times per day.
- • Responses are cached for 6h.
- • A public record that does not exist returns not_found and is charged once.
List Mastodon server public timeline
/v1/mastodon/timelines/public| Name | Type | Required | Description |
|---|---|---|---|
| host | string | yes | Lookup parameter. |
| scope | string | no | Lookup parameter. |
| mediaOnly | string | no | Lookup parameter. |
| cursor | string | no | Lookup parameter. |
| limit | string | no | Maximum records to return, from 1 to 20. |
curl -s "https://api.cleanfetch.dev/v1/mastodon/timelines/public?host=example" \ -H "x-api-key: $CLEANFETCH_API_KEY"
{
"data": {
"platform": "mastodon",
"count": 1,
"items": [
{
"id": "123456",
"url": "https://example.com/item/123456",
"text": "Example public post returned by this endpoint.",
"createdAt": "2026-11-30T00:00:00.000Z",
"author": {
"username": "nasa",
"name": "NASA"
}
}
]
},
"meta": {
"lookupStatus": "found",
"creditsCharged": 1,
"cached": false
}
}Returns
platformcountitems[].iditems[].urlitems[].textitems[].createdAtInput notes
- • Free accounts can call this endpoint up to 3 times per day.
- • Responses are cached for 6h.
- • A public record that does not exist returns not_found and is charged once.
List Mastodon trending links
/v1/mastodon/trends/links| Name | Type | Required | Description |
|---|---|---|---|
| host | string | yes | Lookup parameter. |
| cursor | string | no | Lookup parameter. |
| offset | string | no | Lookup parameter. |
| limit | string | no | Maximum records to return, from 1 to 20. |
curl -s "https://api.cleanfetch.dev/v1/mastodon/trends/links?host=example" \ -H "x-api-key: $CLEANFETCH_API_KEY"
{
"data": {
"platform": "mastodon",
"count": 1,
"items": [
{
"id": "123456",
"url": "https://example.com/item/123456",
"text": "Example public post returned by this endpoint.",
"createdAt": "2026-11-30T00:00:00.000Z",
"author": {
"username": "nasa",
"name": "NASA"
}
}
]
},
"meta": {
"lookupStatus": "found",
"creditsCharged": 1,
"cached": false
}
}Returns
platformcountitems[].iditems[].urlitems[].textitems[].createdAtInput notes
- • Free accounts can call this endpoint up to 3 times per day.
- • Responses are cached for 6h.
- • A public record that does not exist returns not_found and is charged once.
List Mastodon trending posts
/v1/mastodon/trends/posts| Name | Type | Required | Description |
|---|---|---|---|
| host | string | yes | Lookup parameter. |
| cursor | string | no | Lookup parameter. |
| offset | string | no | Lookup parameter. |
| limit | string | no | Maximum records to return, from 1 to 20. |
curl -s "https://api.cleanfetch.dev/v1/mastodon/trends/posts?host=example" \ -H "x-api-key: $CLEANFETCH_API_KEY"
{
"data": {
"platform": "mastodon",
"count": 1,
"items": [
{
"id": "123456",
"url": "https://example.com/item/123456",
"text": "Example public post returned by this endpoint.",
"createdAt": "2026-11-30T00:00:00.000Z",
"author": {
"username": "nasa",
"name": "NASA"
}
}
]
},
"meta": {
"lookupStatus": "found",
"creditsCharged": 1,
"cached": false
}
}Returns
platformcountitems[].iditems[].urlitems[].textitems[].createdAtInput notes
- • Free accounts can call this endpoint up to 3 times per day.
- • Responses are cached for 6h.
- • A public record that does not exist returns not_found and is charged once.
Mapped / 4
503 · 0 creditsGet Mastodon posts by id
/v1/mastodon/posts/batch
List Mastodon profile collections
/v1/mastodon/profiles/{handle}/collections
Get Mastodon profiles by id
/v1/mastodon/profiles/batch
List Mastodon server custom emoji
/v1/mastodon/servers/{host}/emojis
Common Mastodon API questions
How many Mastodon operations are live?
23 of 27 cataloged operations are live. 4 mapped operations return 503 upstream_not_configured and cost 0 credits.
What does a Mastodon call cost?
Live operations range from 1 to 2 credits. 23 are available on the free daily cap and 0 are paid-only. Cache hits cost 0 credits.
Are Mastodon responses cached?
Successful responses are cached between 1h and 6h. A cache hit costs 0 credits and does not consume the free daily cap.
How do I authenticate Mastodon requests?
Send x-api-key or Authorization: Bearer with a CleanFetch key. Missing or invalid keys return 401; paid-only routes return 403 plan_required; rate limits return 429 with Retry-After. A 5xx or timeout costs 0 credits.