Docs menu

Cosmos collection

Beta GET /v1/cosmos/collection

GET /v1/cosmos/collection

A public collection: owner, description, cover, counts and its public subcollections (in extra).

  • Cost: 1 credit
  • Status: Beta. Built and tested against recorded responses; the shape may still gain fields.
  • Cache: Results are kept up to 30 days; send max_age_days to reuse them for free.
  • Timeout: A request still running after about 25 seconds answers 202 with a job to poll (Batch and jobs).

Parameters#

NameTypeRequiredDescription
urlURLyesPublic collection URL (cosmos.so/<user>/<collection>). Accepted hosts: cosmos.so.

Every request also accepts:

  • trim: true for a smaller response without null fields and extra.
  • raw: true to also get the platform's original object as raw.
  • max_age_days: accept a cached result up to this many days old, for 0 credits (Caching).

Example request#

Set your key in the environment first (see Authentication).

curl
curl -G "https://api.socialscrape.io/v1/cosmos/collection" \
  -H "x-api-key: $SOCIALSCRAPE_API_KEY" \
  --data-urlencode "url=https://www.cosmos.so/design/the-best-band-posters"
Python
import os
import requests

params = {
    "url": "https://www.cosmos.so/design/the-best-band-posters",
}
res = requests.get(
    "https://api.socialscrape.io/v1/cosmos/collection",
    headers={"x-api-key": os.environ["SOCIALSCRAPE_API_KEY"]},
    params=params,
)
body = res.json()

if body["ok"]:
    print(body["data"])
else:
    print(body["error"]["code"], body["error"]["message"])
TypeScript
const url = new URL("https://api.socialscrape.io/v1/cosmos/collection");
url.search = new URLSearchParams({
  "url": "https://www.cosmos.so/design/the-best-band-posters"
}).toString();
const res = await fetch(url, {
  headers: { "x-api-key": process.env.SOCIALSCRAPE_API_KEY! },
});
const body = await res.json();

if (body.ok) {
  console.log(body.data);
} else {
  console.error(body.error.code, body.error.message);
}
n8n
{
  "nodes": [
    {
      "name": "SocialScrape Cosmos collection",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        0,
        0
      ],
      "parameters": {
        "method": "GET",
        "url": "https://api.socialscrape.io/v1/cosmos/collection",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "url",
              "value": "https://www.cosmos.so/design/the-best-band-posters"
            }
          ]
        },
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "x-api-key",
              "value": "={{ $env.SOCIALSCRAPE_API_KEY }}"
            }
          ]
        }
      }
    }
  ],
  "connections": {}
}

Example response#

This is a sample from a recorded response. Status 200.

{
  "ok": true,
  "credits_charged": 1,
  "credits_remaining": 4999,
  "cached": false,
  "cached_at": null,
  "request_id": "req_75f1f87bdfc0e561196ad599",
  "data": {
    "object": "collection",
    "platform": "cosmos",
    "id": "1632840802",
    "url": "https://www.cosmos.so/design/the-best-band-posters",
    "kind": "collection",
    "title": "the best band posters",
    "description": "have you seen one of these in a room before?",
    "owner": {
      "id": "234172146",
      "handle": "design",
      "name": "Design",
      "url": "https://www.cosmos.so/design",
      "avatar_url": "https://cdn.cosmos.so/e39a4934-53ae-4536-95a3-18ccd4d052a0",
      "verified": null
    },
    "item_count": 46,
    "cover_url": "https://cdn.cosmos.so/images/b3964bde-a6d7-418d-91a6-09b1b7b6b9aa?rect=0,0,736,736",
    "updated_at": "2026-10-05T20:01:53.977223Z",
    "extra": {
      "cover_ai_generated": false,
      "cover_height": 736,
      "cover_width": 736,
      "follower_count": 1205,
      "is_featured": true,
      "is_private": false,
      "slug": "the-best-band-posters",
      "subcollections": []
    }
  },
  "cursor": null,
  "has_more": null
}

Response#

A Collection object in data.

See Data models for every field. The envelope around data is described in Responses.

Errors#

Failures are free: credits_charged is 0. Branch on error.code, never on the message.

CodeHTTPRetryMeaning
invalid_params400noA parameter is missing, unknown or has the wrong type.
unsupported_url400noThe URL is not one this endpoint accepts (wrong platform or form).
not_found404noThe platform says this profile, post or item does not exist.

Every request can also fail with the account and platform errors listed on the Errors page.

Example error:

{
  "ok": false,
  "error": {
    "code": "not_found",
    "message": "The platform says this profile, post or item does not exist.",
    "retryable": false
  },
  "credits_charged": 0,
  "request_id": "req_b0943aa2575e1fc37cebb76a"
}

Also served at#

These paths answer the same request, so code written for other APIs keeps working: /v1/cosmos/cluster. See Switching from ScrapeCreators.