Free trial: 3 of 3 test requests left. Get your own API key with 100 free credits. No credit card.
List the links trending on a Mastodon server.
Endpoint
/v1/mastodon/trends/links
Query
The Mastodon server to ask, e.g. `mastodon.social`. A server URL is also accepted. The server you name is the one that answers.
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`.
Items to skip, as an offset. Prefer `cursor` for the next page. Default: 0.
Items per page, 1 to 20. Default: 20.
const response = await fetch( "https://api.socialfetch.dev/v1/mastodon/trends/links?host=mastodon.social", { headers: { "x-api-key": "YOUR_API_KEY" } } ); const data = await response.json(); console.log(data);