100 free credits. No credit card required. Get a key

Cosmos profile API

A public Cosmos profile: name, bio, links, and how many elements and collections it has.

GET /v1/cosmos/users/{handle}1 credit per callRefunded on failure
import os, requests

res = requests.get(
    "https://api.groundsocial.dev/v1/cosmos/users/cosmos",
    headers={"Authorization": f"Bearer {os.environ['GROUNDSOCIAL_API_KEY']}"},
)
res.raise_for_status()
data = res.json()
Response
200 · 1 credit
{
"id": 108564255,
"username": "cosmos",
"fullName": "Cosmos",
"bio": "Your space for inspiration.",
"avatarUrl": "https://cdn.cosmos.so/a658f9e9-e757-4f32-8e78-7c5d78bed9a8",
"websiteUrl": "cosmos.so",
"isPremium": true,
"isVerifiedProfile": false,
"publicElementsCluster": {
"id": 1996613743,
"numberOfElements": 744
},
"socialLinks": {
"instagramUrl": "https://www.instagram.com/cosmos",
"twitterUrl": "https://x.com/thecosmos",
"tiktokUrl": null,
"spotify": null
},
"clusters_count": 33
}

Parameters

NameTypeDescription
handlepath · requiredstringUsername, with or without @, or a profile URL. Example: cosmos.
Response fields

200 with a CosmosUser, in Cosmos’s own JSON.

FieldTypeDescription
idinteger
usernamestring
fullNamestring | null
biostring | null
avatarUrlstring | null
websiteUrlstring | null
isPremiumboolean | null
isVerifiedProfileboolean | null
publicElementsClusterobject | null
socialLinksobject | null
clusters_countinteger | nullPublic collections.
Status codes
StatusMeaning
200The profile.
400Invalid input. Nothing was charged.
401Missing or invalid API key.
402Not enough credits, a spend cap was reached, or payment is required.
403The target is private, or the account is suspended.
404The user, element or collection does not exist.
429Too many requests. Wait for Retry-After seconds.
503Cosmos is temporarily unavailable. Retryable; nothing was charged.

Every error has code, message, hint and retryable. All error codes

Questions

Does it take a URL?

Yes, a cosmos.so profile URL works.

Cosmos is a trademark of Cosmos. We are not affiliated with or endorsed by Cosmos.