Docs menu

Cosmos profile posts

Beta GET /v1/cosmos/profile/posts

GET /v1/cosmos/profile/posts

The public posts saved to a profile. Keep the cursor unchanged and stop when has_more is false.

  • 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
handlestringyesCosmos username, without a profile URL. Also accepted as username.

Every request also accepts:

  • cursor: the cursor from the previous page (Pagination).
  • 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/profile/posts" \
  -H "x-api-key: $SOCIALSCRAPE_API_KEY" \
  --data-urlencode "handle=design"
Python
import os
import requests

params = {
    "handle": "design",
}
res = requests.get(
    "https://api.socialscrape.io/v1/cosmos/profile/posts",
    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/profile/posts");
url.search = new URLSearchParams({
  "handle": "design"
}).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 profile posts",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        0,
        0
      ],
      "parameters": {
        "method": "GET",
        "url": "https://api.socialscrape.io/v1/cosmos/profile/posts",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "handle",
              "value": "design"
            }
          ]
        },
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "x-api-key",
              "value": "={{ $env.SOCIALSCRAPE_API_KEY }}"
            }
          ]
        }
      }
    }
  ],
  "connections": {}
}

Example response#

This is a sample from a recorded response, lists and long text are shortened. Status 200.

{
  "ok": true,
  "credits_charged": 1,
  "credits_remaining": 4999,
  "cached": false,
  "cached_at": null,
  "request_id": "req_537c4723994713f628aa45ad",
  "data": {
    "object": "list",
    "items": [
      {
        "object": "post",
        "platform": "cosmos",
        "id": "1307496415",
        "url": "https://www.cosmos.so/e/1307496415",
        "type": "image",
        "author": {
          "id": "14413015",
          "handle": "esther.yang",
          "name": "Esther Yang",
          "url": "https://www.cosmos.so/esther.yang",
          "avatar_url": "https://cdn.cosmos.so/default-avatars/018.png",
          "verified": false
        },
        "title": null,
        "text": null,
        "published_at": "2026-04-01T15:24:45.897845Z",
        "duration_seconds": null,
        "language": null,
        "hashtags": null,
        "mentions": null,
        "stats": {
          "views": null,
          "likes": null,
          "comments": null,
          "shares": null,
          "saves": null,
          "dislikes": null
        },
        "media": {
          "thumbnail_url": "https://cdn.cosmos.so/34647529-5d71-4c17-83c1-876e5500317c",
          "video_url": null,
          "audio_url": null,
          "image_urls": [
            "https://cdn.cosmos.so/34647529-5d71-4c17-83c1-876e5500317c"
          ],
          "width": 1440,
          "height": 1920
        },
        "song": null,
        "location": null,
        "is_pinned": null,
        "is_sponsored": null,
        "extra": {
          "content_accessibility": "ACCESSIBLE",
          "has_more_media": false,
          "is_featured": false,
          "media": [
            {
              "ai_generated": false,
              "height": 1920,
              "id": "34647529-5d71-4c17-83c1-876e5500317c",
              "nsfw_status": "SAFE",
              "type": "StaticImage",
              "url": "https://cdn.cosmos.so/34647529-5d71-4c17-83c1-876e5500317c",
              "width": 1440
            }
          ],
          "original_collection_id": 1481509689,
          "processing_state": "FINISHED"
        }
      },
      {
        "object": "post",
        "platform": "cosmos",
        "id": "231368414",
        "url": "https://www.cosmos.so/e/231368414",
        "type": "image",
        "author": {
          "id": "234172146",
          "handle": "design",
          "name": "Design",
          "url": "https://www.cosmos.so/design",
          "avatar_url": "https://cdn.cosmos.so/e39a4934-53ae-4536-95a3-18ccd4d052a0",
          "verified": false
        },
        "title": null,
        "text": "Ad for Halston colognes with bottles designed by Elsa Peretti.",
        "published_at": "2026-07-22T04:24:41.491306Z",
        "duration_seconds": null,
        "language": null,
        "hashtags": null,
        "mentions": null,
        "stats": {
          "views": null,
          "likes": null,
          "comments": null,
          "shares": null,
          "saves": null,
          "dislikes": null
        },
        "media": {
          "thumbnail_url": "https://cdn.cosmos.so/1d0d58e8-19b8-4ebf-b773-dc7da702df1e",
          "video_url": null,
          "audio_url": null,
          "image_urls": [
            "https://cdn.cosmos.so/1d0d58e8-19b8-4ebf-b773-dc7da702df1e"
          ],
          "width": 564,
          "height": 799
        },
        "song": null,
        "location": null,
        "is_pinned": null,
        "is_sponsored": null,
        "extra": {
          "caption_generated": "Ad for Halston colognes with bottles designed by Elsa Peretti.",
          "content_accessibility": "ACCESSIBLE",
          "has_more_media": false,
          "is_featured": false,
          "media": [
            {
              "ai_generated": false,
              "height": 799,
              "id": "1d0d58e8-19b8-4ebf-b773-dc7da702df1e",
              "nsfw_status": "SAFE",
              "type": "StaticImage",
              "url": "https://cdn.cosmos.so/1d0d58e8-19b8-4ebf-b773-dc7da702df1e",
              "width": 564
            }
          ],
          "original_collection_id": 894125419,
          "processing_state": "FINISHED",
          "source": {
            "is_public_domain": false,
            "url": "https://www.pinterest.com/pin/65443000829576944/"
          }
        }
      }
    ],
    "cursor": null,
    "has_more": false,
    "parent": null
  },
  "cursor": null,
  "has_more": false
}

Response#

A list of Post objects in data.items, with data.cursor and data.has_more.

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.
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.

Also served at#

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