Cosmos collection posts
Beta GET /v1/cosmos/collection/posts
GET /v1/cosmos/collection/posts
Public posts saved to a collection; parent is the collection.
- 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_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).
curl -G "https://api.socialscrape.io/v1/cosmos/collection/posts" \
-H "x-api-key: $SOCIALSCRAPE_API_KEY" \
--data-urlencode "url=https://www.cosmos.so/design/the-best-band-posters"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/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"])const url = new URL("https://api.socialscrape.io/v1/cosmos/collection/posts");
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);
}{
"nodes": [
{
"name": "SocialScrape Cosmos collection posts",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
0,
0
],
"parameters": {
"method": "GET",
"url": "https://api.socialscrape.io/v1/cosmos/collection/posts",
"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, lists and long text are shortened. Status 200.
{
"ok": true,
"credits_charged": 1,
"credits_remaining": 4999,
"cached": false,
"cached_at": null,
"request_id": "req_b41190bae123df6c3e0aee60",
"data": {
"object": "list",
"items": [
{
"object": "post",
"platform": "cosmos",
"id": "2107587668",
"url": "https://www.cosmos.so/e/2107587668",
"type": "image",
"author": {
"id": "2074596056",
"handle": "audreyelli",
"name": "Audrey Ellison",
"url": "https://www.cosmos.so/audreyelli",
"avatar_url": "https://cdn.cosmos.so/default-avatars/011.png",
"verified": false
},
"title": null,
"text": "Japanese movie poster for A Hard Day's Night (1964) featuring The Beatles.",
"published_at": "2026-01-24T17:23:49.338775Z",
"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/8d612bfd-2b7b-458c-ac99-af7c406eef97",
"video_url": null,
"audio_url": null,
"image_urls": [
"https://cdn.cosmos.so/8d612bfd-2b7b-458c-ac99-af7c406eef97"
],
"width": 1080,
"height": 1671
},
"song": null,
"location": null,
"is_pinned": null,
"is_sponsored": null,
"extra": {
"caption_generated": "Japanese movie poster for A Hard Day's Night (1964) featuring The Beatles.",
"content_accessibility": "ACCESSIBLE",
"has_more_media": false,
"is_featured": false,
"media": [
{
"ai_generated": false,
"height": 1671,
"id": "8d612bfd-2b7b-458c-ac99-af7c406eef97",
"nsfw_status": "SAFE",
"type": "StaticImage",
"url": "https://cdn.cosmos.so/8d612bfd-2b7b-458c-ac99-af7c406eef97",
"width": 1080
}
],
"original_collection_id": 752032445,
"processing_state": "FINISHED",
"source": {
"author": {
"name": "Tom Elliott",
"profile_url": "https://www.pinterest.com/telliott1817",
"username": "telliott1817"
},
"is_public_domain": false,
"url": "https://www.pinterest.com/pin/7177680652369084/"
}
}
},
{
"object": "post",
"platform": "cosmos",
"id": "2104791706",
"url": "https://www.cosmos.so/e/2104791706",
"type": "image",
"author": {
"id": "633283034",
"handle": "mutlux",
"name": "mutlu",
"url": "https://www.cosmos.so/mutlux",
"avatar_url": "https://cdn.cosmos.so/default-avatars/012.png",
"verified": false
},
"title": null,
"text": "The Beatles band poster featuring George Harrison, Paul McCartney, John Lennon, and Ringo Starr.",
"published_at": "2024-10-20T12:29:13.984100Z",
"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/a782b9be-96a6-45a4-8c1c-7d06ae6ecbeb",
"video_url": null,
"audio_url": null,
"image_urls": [
"https://cdn.cosmos.so/a782b9be-96a6-45a4-8c1c-7d06ae6ecbeb"
],
"width": 2000,
"height": 2923
},
"song": null,
"location": null,
"is_pinned": null,
"is_sponsored": null,
"extra": {
"caption_generated": "The Beatles band poster featuring George Harrison, Paul McCartney, John Lennon, and Ringo Starr.",
"content_accessibility": "ACCESSIBLE",
"has_more_media": false,
"is_featured": false,
"media": [
{
"ai_generated": false,
"height": 2923,
"id": "a782b9be-96a6-45a4-8c1c-7d06ae6ecbeb",
"nsfw_status": "SAFE",
"type": "StaticImage",
"url": "https://cdn.cosmos.so/a782b9be-96a6-45a4-8c1c-7d06ae6ecbeb",
"width": 2000
}
],
"original_collection_id": 1799490988,
"processing_state": "FINISHED",
"source": {
"author": {
"name": "Etsy",
"profile_url": "https://www.pinterest.com/etsy",
"username": "etsy"
},
"is_public_domain": false,
"url": "https://www.etsy.com/listing/1441828075/the-beatles-re-print-vintage-concert"
}
}
}
],
"cursor": "eyJ2MSI6MTAuMCwidjIiOjE0NDU4Mzc5fQ==",
"has_more": true,
"parent": {
"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": "eyJ2MSI6MTAuMCwidjIiOjE0NDU4Mzc5fQ==",
"has_more": true
}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)