Cosmos post API
A public Cosmos post: media URLs, captions, source links and the save count.
- 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/post" \
-H "x-api-key: $SOCIALSCRAPE_API_KEY" \
--data-urlencode 'url=https://www.cosmos.so/e/2107587668'import os
import requests
params = {
"url": "https://www.cosmos.so/e/2107587668",
}
res = requests.get(
"https://api.socialscrape.io/v1/cosmos/post",
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/post");
url.search = new URLSearchParams({
url: "https://www.cosmos.so/e/2107587668",
}).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 post",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
0,
0
],
"parameters": {
"method": "GET",
"url": "https://api.socialscrape.io/v1/cosmos/post",
"sendQuery": true,
"queryParameters": {
"parameters": [
{
"name": "url",
"value": "https://www.cosmos.so/e/2107587668"
}
]
},
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "x-api-key",
"value": "={{ $env.SOCIALSCRAPE_API_KEY }}"
}
]
}
}
}
],
"connections": {}
}Parameters
| Name | Type | Required | Description |
|---|---|---|---|
url | url | yes | Public post URL (cosmos.so/e/<id>). |
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_3cfee68cc929a9e6319d5af7",
"data": {
"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": 147,
"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
}
},
"cursor": null,
"has_more": null
}Fields
One Post in data.
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.
Is there an SDK call for it?
The preview Python client has client.cosmos.post(...) and the TypeScript client client.cosmos.post(). 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.