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_daysto reuse them for free. - Timeout: A request still running after about 25 seconds answers
202with a job to poll (Batch and jobs).
Parameters#
| Name | Type | Required | Description |
|---|---|---|---|
url | URL | yes | Public collection URL (cosmos.so/<user>/<collection>). Accepted hosts: cosmos.so. |
Every request also accepts:
cursor: the cursor from the previous page (Pagination).trim:truefor a smaller response withoutnullfields andextra.raw:trueto also get the platform's original object asraw.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"1import os2import requests34params = {5 "url": "https://www.cosmos.so/design/the-best-band-posters",6}7res = requests.get(8 "https://api.socialscrape.dev/v1/cosmos/collection/posts",9 headers={"x-api-key": os.environ["SOCIALSCRAPE_API_KEY"]},10 params=params,11)12body = res.json()1314if body["ok"]:15 print(body["data"])16else:17 print(body["error"]["code"], body["error"]["message"])1const url = new URL("https://api.socialscrape.dev/v1/cosmos/collection/posts");2url.search = new URLSearchParams({3 "url": "https://www.cosmos.so/design/the-best-band-posters"4}).toString();5const res = await fetch(url, {6 headers: { "x-api-key": process.env.SOCIALSCRAPE_API_KEY! },7});8const body = await res.json();910if (body.ok) {11 console.log(body.data);12} else {13 console.error(body.error.code, body.error.message);14}1{2 "nodes": [3 {4 "name": "SocialScrape Cosmos collection posts",5 "type": "n8n-nodes-base.httpRequest",6 "typeVersion": 4.2,7 "position": [8 0,9 010 ],11 "parameters": {12 "method": "GET",13 "url": "https://api.socialscrape.dev/v1/cosmos/collection/posts",14 "sendQuery": true,15 "queryParameters": {16 "parameters": [17 {18 "name": "url",19 "value": "https://www.cosmos.so/design/the-best-band-posters"20 }21 ]22 },23 "sendHeaders": true,24 "headerParameters": {25 "parameters": [26 {27 "name": "x-api-key",28 "value": "={{ $env.SOCIALSCRAPE_API_KEY }}"29 }30 ]31 }32 }33 }34 ],35 "connections": {}36}Example response#
This is a sample from a recorded response, lists and long text are shortened. Status 200.
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.
| Code | HTTP | Retry | Meaning |
|---|---|---|---|
invalid_params | 400 | no | A parameter is missing, unknown or has the wrong type. |
unsupported_url | 400 | no | The URL is not one this endpoint accepts (wrong platform or form). |
not_found | 404 | no | The 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.
Related endpoints#
- Cosmos profile (
GET /v1/cosmos/profile) - Cosmos profile posts (
GET /v1/cosmos/profile/posts) - Cosmos profile collections (
GET /v1/cosmos/profile/collections) - Cosmos post (
GET /v1/cosmos/post) - Cosmos collection (
GET /v1/cosmos/collection) - Cosmos search (
GET /v1/cosmos/search)