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

Cosmos collection posts API

Public posts saved to a collection; `parent` is the collection.

GET /v1/cosmos/collection/posts

GET /v1/cosmos/collection/posts

Public posts saved to a collection; parent is the collection.

  • 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
urlURLyesPublic collection URL (cosmos.so/<user>/<collection>). Accepted hosts: cosmos.so.

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/collection/posts" \2  -H "x-api-key: $SOCIALSCRAPE_API_KEY" \3  --data-urlencode "url=https://www.cosmos.so/design/the-best-band-posters"

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_b41190bae123df6c3e0aee60",8  "data": {9    "object": "list",10    "items": [11      {12        "object": "post",13        "platform": "cosmos",14        "id": "2107587668",15        "url": "https://www.cosmos.so/e/2107587668",16        "type": "image",17        "author": {18          "id": "2074596056",19          "handle": "audreyelli",20          "name": "Audrey Ellison",21          "url": "https://www.cosmos.so/audreyelli",22          "avatar_url": "https://cdn.cosmos.so/default-avatars/011.png",23          "verified": false24        },25        "title": null,26        "text": "Japanese movie poster for A Hard Day's Night (1964) featuring The Beatles.",27        "published_at": "2026-01-24T17:23:49.338775Z",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/8d612bfd-2b7b-458c-ac99-af7c406eef97",42          "video_url": null,43          "audio_url": null,44          "image_urls": [45            "https://cdn.cosmos.so/8d612bfd-2b7b-458c-ac99-af7c406eef97"46          ],47          "width": 1080,48          "height": 167149        },50        "song": null,51        "location": null,52        "is_pinned": null,53        "is_sponsored": null,54        "extra": {55          "caption_generated": "Japanese movie poster for A Hard Day's Night (1964) featuring The Beatles.",56          "content_accessibility": "ACCESSIBLE",57          "has_more_media": false,58          "is_featured": false,59          "media": [60            {61              "ai_generated": false,62              "height": 1671,63              "id": "8d612bfd-2b7b-458c-ac99-af7c406eef97",64              "nsfw_status": "SAFE",65              "type": "StaticImage",66              "url": "https://cdn.cosmos.so/8d612bfd-2b7b-458c-ac99-af7c406eef97",67              "width": 108068            }69          ],70          "original_collection_id": 752032445,71          "processing_state": "FINISHED",72          "source": {73            "author": {74              "name": "Tom Elliott",75              "profile_url": "https://www.pinterest.com/telliott1817",76              "username": "telliott1817"77            },78            "is_public_domain": false,79            "url": "https://www.pinterest.com/pin/7177680652369084/"80          }81        }82      },83      {84        "object": "post",85        "platform": "cosmos",86        "id": "2104791706",87        "url": "https://www.cosmos.so/e/2104791706",88        "type": "image",89        "author": {90          "id": "633283034",91          "handle": "mutlux",92          "name": "mutlu",93          "url": "https://www.cosmos.so/mutlux",94          "avatar_url": "https://cdn.cosmos.so/default-avatars/012.png",95          "verified": false96        },97        "title": null,98        "text": "The Beatles band poster featuring George Harrison, Paul McCartney, John Lennon, and Ringo Starr.",99        "published_at": "2024-10-20T12:29:13.984100Z",100        "duration_seconds": null,101        "language": null,102        "hashtags": null,103        "mentions": null,104        "stats": {105          "views": null,106          "likes": null,107          "comments": null,108          "shares": null,109          "saves": null,110          "dislikes": null111        },112        "media": {113          "thumbnail_url": "https://cdn.cosmos.so/a782b9be-96a6-45a4-8c1c-7d06ae6ecbeb",114          "video_url": null,115          "audio_url": null,116          "image_urls": [117            "https://cdn.cosmos.so/a782b9be-96a6-45a4-8c1c-7d06ae6ecbeb"118          ],119          "width": 2000,120          "height": 2923121        },122        "song": null,123        "location": null,124        "is_pinned": null,125        "is_sponsored": null,126        "extra": {127          "caption_generated": "The Beatles band poster featuring George Harrison, Paul McCartney, John Lennon, and Ringo Starr.",128          "content_accessibility": "ACCESSIBLE",129          "has_more_media": false,130          "is_featured": false,131          "media": [132            {133              "ai_generated": false,134              "height": 2923,135              "id": "a782b9be-96a6-45a4-8c1c-7d06ae6ecbeb",136              "nsfw_status": "SAFE",137              "type": "StaticImage",138              "url": "https://cdn.cosmos.so/a782b9be-96a6-45a4-8c1c-7d06ae6ecbeb",139              "width": 2000140            }141          ],142          "original_collection_id": 1799490988,143          "processing_state": "FINISHED",144          "source": {145            "author": {146              "name": "Etsy",147              "profile_url": "https://www.pinterest.com/etsy",148              "username": "etsy"149            },150            "is_public_domain": false,151            "url": "https://www.etsy.com/listing/1441828075/the-beatles-re-print-vintage-concert"152          }153        }154      }155    ],156    "cursor": "eyJ2MSI6MTAuMCwidjIiOjE0NDU4Mzc5fQ==",157    "has_more": true,158    "parent": {159      "object": "collection",160      "platform": "cosmos",161      "id": "1632840802",162      "url": "https://www.cosmos.so/design/the-best-band-posters",163      "kind": "collection",164      "title": "the best band posters",165      "description": "have you seen one of these in a room before?",166      "owner": {167        "id": "234172146",168        "handle": "design",169        "name": "Design",170        "url": "https://www.cosmos.so/design",171        "avatar_url": "https://cdn.cosmos.so/e39a4934-53ae-4536-95a3-18ccd4d052a0",172        "verified": null173      },174      "item_count": 46,175      "cover_url": "https://cdn.cosmos.so/images/b3964bde-a6d7-418d-91a6-09b1b7b6b9aa?rect=0,0,736,736",176      "updated_at": "2026-10-05T20:01:53.977223Z",177      "extra": {178        "cover_ai_generated": false,179        "cover_height": 736,180        "cover_width": 736,181        "follower_count": 1205,182        "is_featured": true,183        "is_private": false,184        "slug": "the-best-band-posters",185        "subcollections": []186      }187    }188  },189  "cursor": "eyJ2MSI6MTAuMCwidjIiOjE0NDU4Mzc5fQ==",190  "has_more": true191}

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

Also served at#

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