Mastodon

List Mastodon trending links

List the links trending on a Mastodon server.

GET/v1/mastodon/trends/links
1credit
x-api-keystringheader

API key (`sfk_...`)

Parameters
4
hoststringrequiredquery

The Mastodon server to ask, e.g. `mastodon.social`. A server URL is also accepted. The server you name is the one that answers.

cursorstringoptionalquery

Pass `page.nextCursor` from the previous response (a plain number is taken as an offset). The list is ordered live, so a row can appear on two pages; remove repeats by `id`, `name` or `url`.

min 1 chars · max 512 chars

offsetintegeroptionalquery

Items to skip, as an offset. Prefer `cursor` for the next page. Default: 0.

≥ 0 · ≤ 100000

limitintegeroptionalquery

Items per page, 1 to 20. Default: 20.

≥ 1 · ≤ 20

Response fields
37

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.

Trending links, most shared first.

datalinks[]url
string

The link the card points to.

datalinks[]title
string

Title of the linked page.

datalinks[]description
stringnullable

Short description of the linked page.

datalinks[]type
stringnullable

`link`, `photo`, `video` or `rich`.

datalinks[]providerName
stringnullable

Site that published the linked page.

datalinks[]providerUrl
stringnullable

The publisher's own page.

Authors of the linked page.

datalinks[]authors[]name
stringnullable

Author name.

datalinks[]authors[]url
stringnullable

Author page.

datalinks[]publishedAt
stringnullable

When the linked page was published, when known.

datalinks[]language
stringnullable

ISO language code of the linked page, when known.

Preview image, when the link has one.

datalinks[]imageurl
string

Preview image.

datalinks[]imagedescription
stringnullable

Alt text.

datalinks[]imageblurhash
stringnullable

Blurhash placeholder for the preview.

datalinks[]imagewidth
integernullable

Width in pixels, when known.

datalinks[]imageheight
integernullable

Height in pixels, when known.

Daily shares and distinct accounts, newest first.

datalinks[]history[]date
string

UTC date, `YYYY-MM-DD`.

datalinks[]history[]uses
integer

Times the hashtag was used that day.

datalinks[]history[]accounts
integer

Distinct accounts that used the hashtag that day.

Pagination state for the current page.

datapagehasMore
boolean

Whether another page is available.

datapagenextCursor
stringnullable

The way to the next page: pass it as `cursor`; null on the last page.

datapagenextOffset
integernullable

Offset to pass as `offset`; null on the last page. Prefer `nextCursor`.

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/trends/links?host=mastodon.social" \
  -H "x-api-key: YOUR_API_KEY"

Responses

Links trending on one server.