Free trial: 3 of 3 test requests left. Get your own API key with 100 free credits. No credit card.
Search a Mastodon server for accounts, hashtags or posts.
Endpoint
/v1/mastodon/search
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.
Search text.
What to search. Omit for accounts and hashtags. `posts` works only on servers whose software allows searching posts without a login (Pleroma, Akkoma and some others); Mastodon itself does not.
Items per page, 1 to 40. Default: 20.
const response = await fetch( "https://api.socialfetch.dev/v1/mastodon/search?host=mastodon.social&query=photography", { headers: { "x-api-key": "YOUR_API_KEY" } } ); const data = await response.json(); console.log(data);