Mastodon

Get Mastodon profile

Get a Mastodon account's public profile by handle, with the owner's discoverability and indexing flags.

GET/v1/mastodon/profiles/{handle}
1credit
x-api-keystringheader

API key (`sfk_...`)

Parameters
2
handlestringrequiredpath

Account handle with its home server, e.g. `Gargron@mastodon.social`. A leading `acct:` or `@`, or a profile URL (`https://mastodon.social/@Gargron`, `https://mastodon.social/web/@Gargron`) is also accepted.

includestringoptionalquery

`featuredTags` also returns the hashtags the account features.

one of: featuredTags

Response fields
67

Endpoint-specific response payload.

datalookupStatus
string

`found`, `not_found`, `restricted` (login required or closed), `unsupported` (this server does not offer it) or `not_compatible` (the host is not a Mastodon-compatible server). See `reason`.

one of: found, not_found, restricted, unsupported, not_compatible

datahost
string

The server that was asked.

datasoftware
stringnullableoptional

Only on a `not_compatible` result (and always on the server endpoint): the software the host runs, from its NodeInfo, e.g. `misskey` or `lemmy`; null when it does not say. Absent otherwise.

Why `lookupStatus` is not `found`, or null when it is `found`.

datareasoncode
string

Machine-readable reason.

one of: login_required, closed_by_operator, hidden_by_owner, suspended, not_implemented, disabled_by_operator, not_a_mastodon_server, unsupported_server_software, host_not_found, post_not_visible

datareasonmessage
string

Plain-language explanation.

The account when `lookupStatus` is `found`; otherwise null.

dataprofileid
string

Account id on `host`.

dataprofilehost
string

The server this record came from.

dataprofilehandle
string

`user@host`, with the account's home server.

dataprofileusername
string

Username without the host.

dataprofileurl
stringnullable

Profile page.

dataprofileactorUri
stringnullable

ActivityPub id, when the server shows it.

dataprofiledisplayName
stringnullable

Display name.

dataprofilebioHtml
stringnullable

Bio as sanitised HTML.

dataprofilebio
stringnullable

Bio as plain text.

An avatar or header image.

dataprofileavatarurl
stringnullable

Image URL on the server or its media store.

dataprofileavatarstaticUrl
stringnullable

Still frame of an animated image.

dataprofileavatardescription
stringnullable

Alt text.

An avatar or header image.

dataprofileheaderurl
stringnullable

Image URL on the server or its media store.

dataprofileheaderstaticUrl
stringnullable

Still frame of an animated image.

dataprofileheaderdescription
stringnullable

Alt text.

dataprofilecreatedAt
stringnullable

Account creation, rounded to midnight UTC by the server.

dataprofilelastPostDate
stringnullable

Date of the latest post (a date, not a time).

The server's own counters.

dataprofilestatsfollowers
integernullable

Accounts following this account.

dataprofilestatsfollowing
integernullable

Accounts this account follows.

dataprofilestatsposts
integernullable

Posts by this account.

dataprofileisBot
boolean

True when the account is marked as a bot.

dataprofileisGroup
boolean

True when the account is a group.

dataprofileisLocked
boolean

Follow requests need approval. Public posts are still public.

dataprofileisLimited
boolean

The server's moderators limited (silenced) the account.

dataprofileisSuspended
boolean

True when the server suspended the account.

dataprofileisDiscoverable
booleannullable

The owner's opt-in to the profile directory and recommendations. null on servers that do not report it.

dataprofileisIndexable
booleannullable

The owner's opt-in to search engines indexing public posts. null when not reported.

dataprofilenoIndex
booleannullable

The owner asks search engines to skip the profile. null when not reported.

dataprofilehidesNetwork
booleannullable

The owner hides the follower and following lists. null when not reported.

The account this one moved to.

dataprofilemovedToid
stringnullable

Account id on the server that returned it.

dataprofilemovedTohandle
string

`user@host` of the account this one moved to.

dataprofilemovedTourl
stringnullable

Profile page of the new account.

dataprofilemovedTodisplayName
stringnullable

Display name of the new account.

Profile metadata fields, in the owner's order.

dataprofilefields[]name
string

Label.

dataprofilefields[]valueHtml
string

Value as sanitised HTML.

dataprofilefields[]value
string

Value as plain text.

dataprofilefields[]verifiedAt
stringnullable

When a link in the value was verified with rel=me.

Custom emojis used in the display name or bio.

dataprofileemojis[]shortcode
string

Shortcode without colons.

dataprofileemojis[]url
stringnullable

Emoji image.

dataprofileemojis[]staticUrl
stringnullable

Still frame.

Public badges such as Owner or Moderator.

dataprofileroles[]id
stringnullable

Role id on `host`.

dataprofileroles[]name
string

Role name, such as Owner or Moderator.

dataprofileroles[]color
stringnullable

Badge colour as a hex value, when set.

Featured hashtags when `include=featuredTags`, else null.

datafeaturedTags[]name
string

Hashtag name without the `#`.

datafeaturedTags[]url
stringnullable

Hashtag page on the server.

datafeaturedTags[]posts
integernullable

Posts the account published with this hashtag.

datafeaturedTags[]lastPostDate
stringnullable

Date of the latest post with this hashtag, or null.

Metadata describing the request and billing outcome.

metarequestId
string

Unique request identifier for tracing this API call.

min 1 chars

metacreditsCharged
integer

Credits charged for this request.

≥ 0

metaversion
string

Public API version that served the response.

one of: v1

Code example

curl "https://api.socialfetch.dev/v1/mastodon/profiles/Gargron%40mastodon.social" \
  -H "x-api-key: YOUR_API_KEY"

Responses

The account, or why it cannot be shown.