# Cosmos Profile API

> Setting SocialTap up for your user? Follow https://socialtap.dev/setup.md.

Cosmos

Returns a public Cosmos account from its username, profile link, brand page or ID. It has exact follower, following, element and collection counts, the bio, picture, website and linked accounts, and whether it is a verified brand or a Premium member. An account Cosmos doesn't have is a not_found error. [Overview](https://socialtap.dev/apis/cosmos/profile/index.md)

GET `/v1/cosmos/profile`

> [!NOTE]
>
> **Good to know**
>
> - metrics.post_count counts the account's public elements, the saved pictures, videos and links its page shows.
> - platform_specific.cosmos.playlist_count counts public collections only: private ones are left out.
> - type is organization for a brand Cosmos verified and unknown for every other account, since Cosmos labels no other kind.

## Example

cURL:

```shell
curl 'https://socialtap.dev/v1/cosmos/profile?handle=joris.kahl' \
  -H "x-api-key: $SOCIALTAP_API_KEY"
```

TypeScript SDK:

```typescript
// Save this as app.mjs (an ES module) and run: node app.mjs
import { SocialTap } from "socialtap";

const client = new SocialTap(); // apiKey defaults to process.env.SOCIALTAP_API_KEY

const res = await client.cosmos.profile.get({ handle: "joris.kahl" });
console.log(res.data);
console.log(res.credits.charged, res.meta.request_id);
```

Python SDK:

```python
from socialtap import SocialTap

client = SocialTap()  # api_key defaults to os.environ["SOCIALTAP_API_KEY"]

res = client.cosmos.profile.get(handle="joris.kahl")
print(res.data)
print(res.credits.charged, res.meta.request_id)
```

Go SDK:

```go
package main

import (
	"context"
	"fmt"
	"log"

	socialtap "socialtap.dev/sdk/go"
)

func main() {
	ctx := context.Background()
	client, err := socialtap.NewClient() // the API key defaults to $SOCIALTAP_API_KEY
	if err != nil {
		log.Fatal(err)
	}
	res, err := client.Cosmos.Profile.Get(ctx, socialtap.CosmosProfileParams{Handle: "joris.kahl"})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(res.Data)
	fmt.Println(res.Credits.Charged, res.Meta.RequestID)
}
```

200 OK:

```json
{
  "data": {
    "approximate_fields": [],
    "avatar_url": "https://cdn.cosmos.so/29346e3f-2124-4aa2-a1a3-cff02cd1ce56",
    "banner_url": null,
    "bio": "COSMOS aka my second brain",
    "category": null,
    "country_code": null,
    "created_at": null,
    "display_name": "Joris Kahl",
    "external_links": [
      {
        "title": null,
        "url": "https://joriskahl.de"
      },
      {
        "title": null,
        "url": "https://www.instagram.com/joris.kahl"
      },
      {
        "title": null,
        "url": "https://www.tiktok.com/@joris.kahl"
      }
    ],
    "id": "2059029120",
    "is_private": null,
    "is_verified": false,
    "location": null,
    "metrics": {
      "follower_count": 5,
      "following_count": 6,
      "post_count": 3397,
      "total_like_count": null,
      "total_view_count": null
    },
    "platform": "cosmos",
    "platform_specific": {
      "cosmos": {
        "brand_post_count": null,
        "brand_url": null,
        "followed_playlist_count": 7,
        "is_premium": true,
        "playlist_count": 129
      }
    },
    "type": "unknown",
    "unknown_fields": [],
    "url": "https://www.cosmos.so/joris.kahl",
    "username": "joris.kahl"
  },
  "meta": {
    "request_id": "req_3f9c2a7d1e8b4c6a9f0e2d4b6a8c0e1f",
    "platform": "cosmos",
    "source": "api",
    "is_cached": false,
    "credits_charged": 1,
    "latency_ms": 1000,
    "fetched_at": "2026-10-25T12:00:00Z",
    "input": {
      "kind": "profile",
      "id": "2059029120",
      "url": "https://www.cosmos.so/joris.kahl"
    },
    "credits_remaining": 9999,
    "client_request_id": null,
    "warnings": []
  }
}
```

## Query parameters

| Name | Type | Description | Example |
| --- | --- | --- | --- |
| `handle` required | `string`<br>max 2,048 chars | The Cosmos account: its username, a link to its profile or a tab of it, a brand page (cosmos.so/brand/\<name>, or brand/\<name>), or its numeric ID. A username of digits alone needs its @. | `joris.kahl` |

Every endpoint also accepts [`max_age`](https://socialtap.dev/docs/reference/index.md#common-params), [`max_credits`](https://socialtap.dev/docs/reference/index.md#common-params) and [`fields`](https://socialtap.dev/docs/reference/index.md#common-params).

## Response

`{data, meta}`: `data` is a [profile](https://socialtap.dev/resources/profile/index.md) object. Fields only Cosmos has are under `platform_specific.cosmos`. [`meta`](https://socialtap.dev/docs/reference/index.md#meta) describes the request.

| Field | Type | Description |
| --- | --- | --- |
| `data.id` | `string` | Platform-native account ID (string), exactly as the platform writes it, its prefix included. |
| `data.username` | `string` or `null` | Handle without the @; null when the account has none. |
| `data.display_name` | `string` or `null` | Display name, channel title or page name; null when empty or not exposed. |
| `data.url` | `string` (uri) | Canonical profile URL. |
| `data.type` | `string` | Coarse account kind, as the platform labels it; unknown when it does not. New values may be added; treat unknown values as unknown.<br>One of `person`, `organization`, `community`, `unknown` |
| `data.bio` | `string` or `null` | Profile bio, channel description or page about text; null when empty or not exposed. |
| `data.avatar_url` | `string` (uri) or `null` | Profile picture URL (largest available). Platform CDN URLs can expire within hours. |
| `data.banner_url` | `string` (uri) or `null` | Header or cover image URL. |
| `data.is_verified` | `boolean` or `null` | Platform verification badge; null where the platform has no badge. |
| `data.is_private` | `boolean` or `null` | True when the account's posts are not public. |
| `data.category` | `string` or `null` | Platform category label (e.g. Musician, Media & Entertainment), as shown; not normalized. Often set only for business or creator accounts. |
| `data.external_links` | `object[]` | Links in the bio or channel links; \[\] if none or not exposed. |
| `data.external_links[].url` | `string` (uri) | Link target, absolute (https:// is added where the platform stores the link without a scheme). |
| `data.external_links[].title` | `string` or `null` | Link label shown by the platform. |
| `data.location` | `string` or `null` | Self-declared location text. |
| `data.country_code` | `string` or `null` | ISO 3166-1 alpha-2 country the platform states for the account. |
| `data.created_at` | `string` (date-time) or `null` | Account creation or join date, RFC 3339 UTC (some platforms give only the day: see approximate_fields). |
| `data.metrics` | `object` | Counts at fetch time; null = not shown, 0 = zero. |
| `data.metrics.follower_count` | `integer` or `null` | Followers or subscribers. |
| `data.metrics.following_count` | `integer` or `null` | Accounts this profile follows. |
| `data.metrics.post_count` | `integer` or `null` | Cosmos: elements. Posts or videos as the platform counts them on the profile (for a private account, posts the caller cannot see). |
| `data.metrics.total_like_count` | `integer` or `null` | Likes received across all of the profile's posts (not likes given). |
| `data.metrics.total_view_count` | `integer` or `null` | Lifetime views across all of the profile's posts. |
| `data.platform_specific.cosmos` | `object` or `null` | A Cosmos account's own fields. |
| `data.platform_specific.cosmos.playlist_count` | `integer` or `null` | Public collections the account owns, as Cosmos counts them; its private ones are not counted. |
| `data.platform_specific.cosmos.followed_playlist_count` | `integer` or `null` | Collections of other accounts this account follows. |
| `data.platform_specific.cosmos.is_premium` | `boolean` or `null` | True for a paying Cosmos member (Cosmos Premium). |
| `data.platform_specific.cosmos.brand_url` | `string` (uri) or `null` | The account's brand page (cosmos.so/brand/\<name>), for a brand Cosmos verified; null for any other account. |
| `data.platform_specific.cosmos.brand_post_count` | `integer` or `null` | Elements on its brand page (the brand's products and pictures), for a brand Cosmos verified; null for any other account. metrics.post_count counts those the account saved itself. |
| `data.approximate_fields` | `string[]` | JSON paths of values rounded by the platform or parsed from display text (metrics.follower_count). A list path (external_links) means the list may be incomplete. \[\] when all exact. |
| `data.unknown_fields` | `string[]` | JSON paths of lists whose \[\] means unknown, not none (a source that cannot see them). \[\] when every list is known. |

Besides [the errors any request can return](https://socialtap.dev/docs/errors/index.md): [`not_found`](https://socialtap.dev/docs/errors/index.md#not_found) (404) and [`private_or_unavailable`](https://socialtap.dev/docs/errors/index.md#private_or_unavailable) (403) when the item can't be returned.

## Pricing

**1 credit** per successful request ($0.75–$1.97 per 1,000). Failed requests are free. [How credits work](https://socialtap.dev/docs/credits/index.md)

Endpoint ID `cosmos.profile` · operationId `cosmos.profile.get`

---

[HTML version](https://socialtap.dev/docs/reference/cosmos/profile/) · [Docs index for AI agents](https://socialtap.dev/llms.txt) · [All docs in one file](https://socialtap.dev/llms-full.txt)
