# Mastodon Profile API Documentation

Look up any public Mastodon account by username or federated handle. Returns the full account object including display name, bio, avatar, header, follower counts, and custom fields. The instance parameter selects which public Mastodon server to query. A 404 means the account does not exist on that instance and is a non-billable NOT_FOUND error.

- **Documentation:** [https://scrappa.co/docs/mastodon-api/mastodon_profile](https://scrappa.co/docs/mastodon-api/mastodon_profile)
- **API group:** Mastodon API
- **Endpoint:** `GET https://scrappa.co/api/mastodon/profile`

## Authentication

Send your Scrappa API key in the `X-API-KEY` request header. Paid endpoints also support accountless x402 payments when called without an API key.

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `instance` | string | No | Public Mastodon hostname. Defaults to mastodon.social. |
| `acct` | string | Yes | Username (e.g. Gargron) or federated handle (e.g. user@instance). |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/mastodon/profile?instance=mastodon.social&acct=Gargron"
```

## Example response

```json
{
    "success": true,
    "data": {
        "id": "1",
        "username": "Gargron",
        "acct": "Gargron",
        "display_name": "Eugen Rochko",
        "note": "<p>Executive Strategy &amp; Product Advisor</p>",
        "note_text": "Executive Strategy & Product Advisor",
        "followers_count": 383131,
        "following_count": 749,
        "statuses_count": 82500,
        "url": "https://mastodon.social/@Gargron",
        "avatar": "https://files.mastodon.social/accounts/avatars/000/000/001/original/6b2384b33799a0dd.png"
    }
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | A public parameter or range is invalid. This response is not billable. |
| 404 | Account Not Found | The requested Mastodon account was not found on this instance. This response is not billable. |
| 502 | Invalid Source Response | Mastodon returned an unexpected response. This response is not billable. |

## More Scrappa resources

- [API documentation](https://scrappa.co/docs)
- [Full LLM-readable API reference](https://scrappa.co/llms-full.txt)
- [OpenAPI specification](https://scrappa.co/docs/api.json)
- [Pricing](https://scrappa.co/pricing)
