Cosmos profile posts API
  1. Docs
  2. Cosmos
  3. Cosmos profile posts API

Cosmos profile posts API

The public posts saved to a profile.

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

1curl -G "https://api.socialscrape.dev/v1/cosmos/profile/posts" \2  -H "x-api-key: $SOCIALSCRAPE_API_KEY" \3  --data-urlencode "handle=design"

Example response#

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

200 OKSample response
1{2  "ok": true,3  "credits_charged": 1,4  "credits_remaining": 4999,5  "cached": false,6  "cached_at": null,7  "request_id": "req_537c4723994713f628aa45ad",8  "data": {9    "object": "list",10    "items": [11      {12        "object": "post",13        "platform": "cosmos",14        "id": "1307496415",15        "url": "https://www.cosmos.so/e/1307496415",16        "type": "image",17        "author": {18          "id": "14413015",19          "handle": "esther.yang",20          "name": "Esther Yang",21          "url": "https://www.cosmos.so/esther.yang",22          "avatar_url": "https://cdn.cosmos.so/default-avatars/018.png",23          "verified": false24        },25        "title": null,26        "text": null,27        "published_at": "2026-04-01T15:24:45.897845Z",28        "duration_seconds": null,29        "language": null,30        "hashtags": null,31        "mentions": null,32        "stats": {33          "views": null,34          "likes": null,35          "comments": null,36          "shares": null,37          "saves": null,38          "dislikes": null39        },40        "media": {41          "thumbnail_url": "https://cdn.cosmos.so/34647529-5d71-4c17-83c1-876e5500317c",42          "video_url": null,43          "audio_url": null,44          "image_urls": [45            "https://cdn.cosmos.so/34647529-5d71-4c17-83c1-876e5500317c"46          ],47          "width": 1440,48          "height": 192049        },50        "song": null,51        "location": null,52        "is_pinned": null,53        "is_sponsored": null,54        "extra": {55          "content_accessibility": "ACCESSIBLE",56          "has_more_media": false,57          "is_featured": false,58          "media": [59            {60              "ai_generated": false,61              "height": 1920,62              "id": "34647529-5d71-4c17-83c1-876e5500317c",63              "nsfw_status": "SAFE",64              "type": "StaticImage",65              "url": "https://cdn.cosmos.so/34647529-5d71-4c17-83c1-876e5500317c",66              "width": 144067            }68          ],69          "original_collection_id": 1481509689,70          "processing_state": "FINISHED"71        }72      },73      {74        "object": "post",75        "platform": "cosmos",76        "id": "231368414",77        "url": "https://www.cosmos.so/e/231368414",78        "type": "image",79        "author": {80          "id": "234172146",81          "handle": "design",82          "name": "Design",83          "url": "https://www.cosmos.so/design",84          "avatar_url": "https://cdn.cosmos.so/e39a4934-53ae-4536-95a3-18ccd4d052a0",85          "verified": false86        },87        "title": null,88        "text": "Ad for Halston colognes with bottles designed by Elsa Peretti.",89        "published_at": "2026-07-22T04:24:41.491306Z",90        "duration_seconds": null,91        "language": null,92        "hashtags": null,93        "mentions": null,94        "stats": {95          "views": null,96          "likes": null,97          "comments": null,98          "shares": null,99          "saves": null,100          "dislikes": null101        },102        "media": {103          "thumbnail_url": "https://cdn.cosmos.so/1d0d58e8-19b8-4ebf-b773-dc7da702df1e",104          "video_url": null,105          "audio_url": null,106          "image_urls": [107            "https://cdn.cosmos.so/1d0d58e8-19b8-4ebf-b773-dc7da702df1e"108          ],109          "width": 564,110          "height": 799111        },112        "song": null,113        "location": null,114        "is_pinned": null,115        "is_sponsored": null,116        "extra": {117          "caption_generated": "Ad for Halston colognes with bottles designed by Elsa Peretti.",118          "content_accessibility": "ACCESSIBLE",119          "has_more_media": false,120          "is_featured": false,121          "media": [122            {123              "ai_generated": false,124              "height": 799,125              "id": "1d0d58e8-19b8-4ebf-b773-dc7da702df1e",126              "nsfw_status": "SAFE",127              "type": "StaticImage",128              "url": "https://cdn.cosmos.so/1d0d58e8-19b8-4ebf-b773-dc7da702df1e",129              "width": 564130            }131          ],132          "original_collection_id": 894125419,133          "processing_state": "FINISHED",134          "source": {135            "is_public_domain": false,136            "url": "https://www.pinterest.com/pin/65443000829576944/"137          }138        }139      }140    ],141    "cursor": null,142    "has_more": false,143    "parent": null144  },145  "cursor": null,146  "has_more": false147}

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.