The personal API

A read-only token that returns your own data, for pulling your numbers into a spreadsheet or a dashboard of your own.

Sapphire Ultra includes a personal API. It reads your account and nothing else: there is no endpoint that returns another person's data, and no token can write anything.

Keys

Create a key in Settings, then API. It is shown once, at creation, and never again, so copy it then. Keys start with surf_pat_, you can hold up to 5 at a time, and any of them can be revoked on its own without disturbing the others.

Endpoints

EndpointReturns
/api/v1/meYour profile, and your follower, following and post counts
/api/v1/me/postsYour posts with their views, likes, replies and reposts
/api/v1/me/analyticsYour totals for a period, against the period before it
/api/v1/me/audienceYour follower growth and profile views over time
/api/v1/me/earningsYour subscriptions, tips, Super Chats and brand deals

Pass the key as a bearer token. Requests default to the last 30 days, and the posts endpoint returns 25 at a time up to a maximum of 100.

Rate limit

120 requests a minute per key. Responses are marked private and no-store, because the data in them is yours rather than something a shared cache should hold.

This is the personal API. Business accounts have a separate credential with a different prefix, and the two are not interchangeable. See Business accounts.