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

Cosmos user collections API

The top public collections on a Cosmos profile, with element and follower counts.

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

res = requests.get(
    "https://api.groundsocial.dev/v1/cosmos/users/cosmos/clusters",
    headers={"Authorization": f"Bearer {os.environ['GROUNDSOCIAL_API_KEY']}"},
)
res.raise_for_status()
data = res.json()
Response
200 · 1 credit
{
"data": [
{
"id": 577804873,
"name": "Gift Selects",
"slug": "gift-selects",
"description": null,
"numberOfElements": 26,
"followersCount": 0,
"coverImageUrl": "https://cdn.cosmos.so/01a18adc-f949-74e7-be29-fce82900d362?rect=0,1024,2560,2560",
"owner": {
"username": "cosmos",
"id": 108564255,
"fullName": "Cosmos"
},
"isPrivate": false,
"parentClusterId": null,
"url": "https://www.cosmos.so/cosmos/gift-selects"
},
{
"id": 1799209375,
"name": "Genesis",
"slug": "genesis",
"description": null,
"numberOfElements": 201,
"followersCount": 3908486,
"coverImageUrl": "https://cdn.cosmos.so/a369df88-f606-4716-81e3-4c86881712f5?rect=119,70,334,334",
"owner": {
"username": "cosmos",
"id": 108564255,
"fullName": "Cosmos"
},
"isPrivate": false,
"parentClusterId": null,
"url": "https://www.cosmos.so/cosmos/genesis"
},
"… 1 more"
],
"meta": {
"result_count": 3,
"count": 33
}
}

Parameters

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

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

FieldTypeDescription
dataCosmosCluster[]
metaobject
Status codes
StatusMeaning
200The collections.
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

Is it every collection?

Logged out, Cosmos shows the top ones; meta.count says how many there are.

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