Cosmos collection posts API
Public posts saved to a collection; parent is the collection.
- Cost
- 1 credit
- Cached repeats
- 0 creditssend max_age_days, results kept 30 days
- Failed requests
- 0 credits
- Status
- Betashape may still gain fields
You send url.
Request
Send your key in the x-api-key header.
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,
timeout=60,
)
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": {}
}Parameters
| Name | Type | Required | Description |
|---|---|---|---|
url | url | yes | Public collection URL (cosmos.so/<user>/<collection>). |
cursor | string | Opaque cursor from the previous page; pass it back unchanged. Also accepted as continuationToken, continuation_token, next_max_id, max_id, max_cursor, min_time, after, page_token, pageToken, paginationToken, next_page_id, page. |
Every request also accepts trim, raw and max_age_days.
Response
Sample from a recorded response, shortened. Values are public data, not yours.
{
"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
}
},
{
"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
}
}
],
"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
}
}
},
"cursor": "eyJ2MSI6MTAuMCwidjIiOjE0NDU4Mzc5fQ==",
"has_more": true
}Fields
A page of results. Each entry in items is a Post. cursor and has_more page through the rest.
A field the platform does not give is null, never made up. Extra platform details are in extra.
| Field | Type | Always | Notes |
|---|---|---|---|
object | "post" | ||
platform | Platform | yes | |
id | string | yes | |
url | string or null | ||
type | "video" or "short" or "reel" or "image" or "carousel" or "story" or "live" or "clip" or "text" or "link" or "tweet" or "pin" or "community_post" or "episode" or "unknown" | ||
author | Author or null | ||
title | string or null | ||
text | string or null | ||
published_at | string (ISO 8601 date-time) or null | ||
duration_seconds | number or null | ||
language | string or null | ||
hashtags | string[] or null | ||
mentions | string[] or null | ||
stats | Stats |
Show the other 6 fields
Full field list in the reference for this endpoint and the data models. Errors are listed under Errors.
Questions
Which errors can it return?
invalid_params (do not retry), unsupported_url (do not retry), not_found (do not retry). Account and platform errors from the errors list can also happen. A failure always costs 0 credits.
How do I get more than one page?
Send the same request with cursor set to the cursor you received, until has_more is false. Each page costs its own price. See pagination.
Is there an SDK call for it?
The preview Python client has client.cosmos.collection_posts(...) and the TypeScript client client.cosmos.collectionPosts(). Both return the same envelope as the HTTP API. The packages are not published yet; plain HTTP works today in any language.
Can an AI agent call it?
Yes. The MCP server reaches every built endpoint, with the same prices.