Cosmos

Get Cosmos post

Get a Cosmos post by URL with its media, caption, source and saver.

GET/v1/cosmos/posts
x-api-keystringheader

API key (`sfk_...`)

Parameters
1
urlstringrequiredquery

Link to the Cosmos post (https://www.cosmos.so/e/{id}) or its numeric id.

min 1 chars · max 512 chars

Response fields
43

Endpoint-specific response payload.

datalookupStatus
string

`not_found` for a removed, private or unknown post.

one of: found, not_found

The post when `lookupStatus` is `found`; otherwise null.

datapostid
string

Cosmos post (element) id.

dataposturl
string

Post page.

datapostcreatedAt
stringnullable

When it was saved to Cosmos.

datapostcaption
stringnullable

The description Cosmos wrote for the post.

The post's media, the main one first.

datapostmedia[]type
string

`image`, `video` or `gif`.

one of: image, video, gif, unknown

datapostmedia[]url
stringnullable

The file: the image, or the video's MP4.

datapostmedia[]thumbnailUrl
stringnullable

A still for a video or gif.

datapostmedia[]width
integernullable

Width in pixels.

datapostmedia[]height
integernullable

Height in pixels.

datapostmedia[]durationSeconds
numbernullable

Length of a video in seconds.

datapostmedia[]isAiGenerated
booleannullable

True when Cosmos marks the image as AI-generated.

datapostmedia[]isSafe
booleannullable

False when Cosmos marks the media not safe for work.

The Cosmos user who saved it.

datapostsavedByid
stringnullable

Cosmos user id.

datapostsavedByhandle
string

Username, as in cosmos.so/{handle}.

datapostsavedBydisplayName
stringnullable

Full name.

datapostsavedByavatarUrl
stringnullable

Profile picture.

datapostsavedByisVerified
booleannullable

True when Cosmos verified the profile.

datapostsavedByurl
string

Profile page.

datapostcollectionId
stringnullable

The collection it was first saved to.

datapostsourceUrl
stringnullable

Where it came from, such as an Instagram or Pinterest post.

Who made it, at the source.

datapostsourceAuthorhandle
stringnullable

Username at the source.

datapostsourceAuthorname
stringnullable

Name at the source.

datapostsourceAuthorurl
stringnullable

Profile at the source.

datapostisFeatured
booleannullable

True when Cosmos features the post.

The product, when the post is a shop item; else null.

datapostproductname
stringnullable

Product name.

datapostproductbrand
stringnullable

Brand.

datapostproductdescription
stringnullable

Product description.

datapostproductprice
numbernullable

Price, the sale price when Cosmos shows one.

datapostproductcurrency
stringnullable

ISO 4217 currency of `price`, such as `USD`.

datapostproductavailability
stringnullable

Stock state, such as `in_stock` or `out_of_stock`.

Metadata describing the request and billing outcome.

metarequestId
string

Unique request identifier for tracing this API call.

min 1 chars

metacreditsCharged
integer

Credits charged for this request.

≥ 0

metaversion
string

Public API version that served the response.

one of: v1

metastale
booleanoptional

Present, and `true`, only when the source couldn't be reached and this is the last good answer for the same request instead, up to 24 hours old. Absent on every live answer.

one of: true

metafetchedAt
stringoptional

When a stale answer (`stale: true`) was originally fetched (ISO 8601, UTC). Absent on every live answer.

Code example

curl "https://api.socialfetch.dev/v1/cosmos/posts?url=https://www.cosmos.so/e/547956585" \
  -H "x-api-key: YOUR_API_KEY"

Responses

A Cosmos post.