Cosmos API. Scrape live data from any public Cosmos link.
Get public posts, profiles and collections by link, handle or search, with posts in the same fields as on 23 other platforms. We handle the proxies, blocks and platform changes.
GET socialtap.dev/v1/cosmos/post
Live data from 38 platforms.
What Cosmos data can you get?
Cosmos profiles with their exact follower, following, element and collection counts, bio, links and brand page. Send a username, a profile link, a brand page or an account's ID. Elements (posts): the pictures, videos, products, links and notes people save, with every file, the source and its creator, the save count and who saved it. Collections, sub-collections too, with their owner, collaborators and exact element and follower counts, from a link or ID.
Posts
-
Post
Cosmos Post API
Saved element with every file, source and saves
1 credit$0.75–$1.97 per 1,000 requestsGET /v1/cosmos/post -
Post
Cosmos Posts API
Every saved image, video and link of an account
1 credit / page$0.75–$1.97 per 1,000 pagesGET /v1/cosmos/posts -
Post
Cosmos Collection Posts API
Elements in a collection with files and sources
1 credit / page$0.75–$1.97 per 1,000 pagesGET /v1/cosmos/collection_posts
Search
Call the Cosmos API from your code.
Copy the request for your language, or hand it to your agent.
// Node 18+: save this as app.mjs (an ES module) and run: node app.mjs
const params = new URLSearchParams({
url: "https://www.cosmos.so/e/547956585",
});
const res = await fetch(`https://socialtap.dev/v1/cosmos/post?${params}`, {
headers: { "x-api-key": process.env.SOCIALTAP_API_KEY ?? "" },
});
const body = await res.json();
if (!res.ok) throw new Error(`${body.error.code}: ${body.error.message}`);
const { data, meta } = body;
console.log(data, meta.credits_charged);from socialtap import SocialTap
client = SocialTap() # api_key defaults to os.environ["SOCIALTAP_API_KEY"]
res = client.cosmos.post.get(url="https://www.cosmos.so/e/547956585")
print(res.data)
print(res.credits.charged, res.meta.request_id)require "json"
require "net/http"
uri = URI("https://socialtap.dev/v1/cosmos/post")
uri.query = URI.encode_www_form('url' => 'https://www.cosmos.so/e/547956585')
req = Net::HTTP::Get.new(uri)
req["x-api-key"] = ENV.fetch("SOCIALTAP_API_KEY")
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }
body = JSON.parse(res.body)
raise "#{body["error"]["code"]}: #{body["error"]["message"]}" unless res.is_a?(Net::HTTPSuccess)
pp body["data"]
puts body["meta"]["credits_charged"]<?php
$query = http_build_query([
'url' => 'https://www.cosmos.so/e/547956585',
]);
$ch = curl_init('https://socialtap.dev/v1/cosmos/post?' . $query);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['x-api-key: ' . getenv('SOCIALTAP_API_KEY')],
]);
$body = json_decode(curl_exec($ch), true);
if (curl_getinfo($ch, CURLINFO_RESPONSE_CODE) >= 400) {
throw new RuntimeException($body['error']['code'] . ': ' . $body['error']['message']);
}
print_r($body['data']);
echo $body['meta']['credits_charged'], PHP_EOL;package main
import (
"context"
"fmt"
"log"
socialtap "socialtap.dev/sdk/go"
)
func main() {
ctx := context.Background()
client, err := socialtap.NewClient() // the API key defaults to $SOCIALTAP_API_KEY
if err != nil {
log.Fatal(err)
}
res, err := client.Cosmos.Post.Get(ctx, socialtap.CosmosPostParams{URL: "https://www.cosmos.so/e/547956585"})
if err != nil {
log.Fatal(err)
}
fmt.Println(res.Data)
fmt.Println(res.Credits.Charged, res.Meta.RequestID)
}curl -G 'https://socialtap.dev/v1/cosmos/post' \
--data-urlencode 'url=https://www.cosmos.so/e/547956585' \
-H "x-api-key: $SOCIALTAP_API_KEY"GET https://socialtap.dev/v1/cosmos/postDocs // Node 18+: save this as app.mjs (an ES module) and run: node app.mjs
const params = new URLSearchParams({
handle: "joris.kahl",
});
const res = await fetch(`https://socialtap.dev/v1/cosmos/profile?${params}`, {
headers: { "x-api-key": process.env.SOCIALTAP_API_KEY ?? "" },
});
const body = await res.json();
if (!res.ok) throw new Error(`${body.error.code}: ${body.error.message}`);
const { data, meta } = body;
console.log(data, meta.credits_charged);from socialtap import SocialTap
client = SocialTap() # api_key defaults to os.environ["SOCIALTAP_API_KEY"]
res = client.cosmos.profile.get(handle="joris.kahl")
print(res.data)
print(res.credits.charged, res.meta.request_id)require "json"
require "net/http"
uri = URI("https://socialtap.dev/v1/cosmos/profile")
uri.query = URI.encode_www_form('handle' => 'joris.kahl')
req = Net::HTTP::Get.new(uri)
req["x-api-key"] = ENV.fetch("SOCIALTAP_API_KEY")
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }
body = JSON.parse(res.body)
raise "#{body["error"]["code"]}: #{body["error"]["message"]}" unless res.is_a?(Net::HTTPSuccess)
pp body["data"]
puts body["meta"]["credits_charged"]<?php
$query = http_build_query([
'handle' => 'joris.kahl',
]);
$ch = curl_init('https://socialtap.dev/v1/cosmos/profile?' . $query);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['x-api-key: ' . getenv('SOCIALTAP_API_KEY')],
]);
$body = json_decode(curl_exec($ch), true);
if (curl_getinfo($ch, CURLINFO_RESPONSE_CODE) >= 400) {
throw new RuntimeException($body['error']['code'] . ': ' . $body['error']['message']);
}
print_r($body['data']);
echo $body['meta']['credits_charged'], PHP_EOL;package main
import (
"context"
"fmt"
"log"
socialtap "socialtap.dev/sdk/go"
)
func main() {
ctx := context.Background()
client, err := socialtap.NewClient() // the API key defaults to $SOCIALTAP_API_KEY
if err != nil {
log.Fatal(err)
}
res, err := client.Cosmos.Profile.Get(ctx, socialtap.CosmosProfileParams{Handle: "joris.kahl"})
if err != nil {
log.Fatal(err)
}
fmt.Println(res.Data)
fmt.Println(res.Credits.Charged, res.Meta.RequestID)
}curl 'https://socialtap.dev/v1/cosmos/profile?handle=joris.kahl' \
-H "x-api-key: $SOCIALTAP_API_KEY"GET https://socialtap.dev/v1/cosmos/profileDocs // Node 18+: save this as app.mjs (an ES module) and run: node app.mjs
const params = new URLSearchParams({
url: "https://www.cosmos.so/cosmos/the-blue-zones",
});
const res = await fetch(`https://socialtap.dev/v1/cosmos/collection?${params}`, {
headers: { "x-api-key": process.env.SOCIALTAP_API_KEY ?? "" },
});
const body = await res.json();
if (!res.ok) throw new Error(`${body.error.code}: ${body.error.message}`);
const { data, meta } = body;
console.log(data, meta.credits_charged);from socialtap import SocialTap
client = SocialTap() # api_key defaults to os.environ["SOCIALTAP_API_KEY"]
res = client.cosmos.collection.get(url="https://www.cosmos.so/cosmos/the-blue-zones")
print(res.data)
print(res.credits.charged, res.meta.request_id)require "json"
require "net/http"
uri = URI("https://socialtap.dev/v1/cosmos/collection")
uri.query = URI.encode_www_form('url' => 'https://www.cosmos.so/cosmos/the-blue-zones')
req = Net::HTTP::Get.new(uri)
req["x-api-key"] = ENV.fetch("SOCIALTAP_API_KEY")
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }
body = JSON.parse(res.body)
raise "#{body["error"]["code"]}: #{body["error"]["message"]}" unless res.is_a?(Net::HTTPSuccess)
pp body["data"]
puts body["meta"]["credits_charged"]<?php
$query = http_build_query([
'url' => 'https://www.cosmos.so/cosmos/the-blue-zones',
]);
$ch = curl_init('https://socialtap.dev/v1/cosmos/collection?' . $query);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['x-api-key: ' . getenv('SOCIALTAP_API_KEY')],
]);
$body = json_decode(curl_exec($ch), true);
if (curl_getinfo($ch, CURLINFO_RESPONSE_CODE) >= 400) {
throw new RuntimeException($body['error']['code'] . ': ' . $body['error']['message']);
}
print_r($body['data']);
echo $body['meta']['credits_charged'], PHP_EOL;package main
import (
"context"
"fmt"
"log"
socialtap "socialtap.dev/sdk/go"
)
func main() {
ctx := context.Background()
client, err := socialtap.NewClient() // the API key defaults to $SOCIALTAP_API_KEY
if err != nil {
log.Fatal(err)
}
res, err := client.Cosmos.Collection.Get(ctx, socialtap.CosmosCollectionParams{URL: "https://www.cosmos.so/cosmos/the-blue-zones"})
if err != nil {
log.Fatal(err)
}
fmt.Println(res.Data)
fmt.Println(res.Credits.Charged, res.Meta.RequestID)
}curl -G 'https://socialtap.dev/v1/cosmos/collection' \
--data-urlencode 'url=https://www.cosmos.so/cosmos/the-blue-zones' \
-H "x-api-key: $SOCIALTAP_API_KEY"GET https://socialtap.dev/v1/cosmos/collectionDocs // Node 18+: save this as app.mjs (an ES module) and run: node app.mjs
const params = new URLSearchParams({
handle: "joris.kahl",
});
const res = await fetch(`https://socialtap.dev/v1/cosmos/posts?${params}`, {
headers: { "x-api-key": process.env.SOCIALTAP_API_KEY ?? "" },
});
const body = await res.json();
if (!res.ok) throw new Error(`${body.error.code}: ${body.error.message}`);
const { data, page, meta } = body;
console.log(data, meta.credits_charged);from socialtap import SocialTap
client = SocialTap() # api_key defaults to os.environ["SOCIALTAP_API_KEY"]
res = client.cosmos.posts.list(handle="joris.kahl")
print(res.data)
print(res.credits.charged, res.meta.request_id)require "json"
require "net/http"
uri = URI("https://socialtap.dev/v1/cosmos/posts")
uri.query = URI.encode_www_form('handle' => 'joris.kahl')
req = Net::HTTP::Get.new(uri)
req["x-api-key"] = ENV.fetch("SOCIALTAP_API_KEY")
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }
body = JSON.parse(res.body)
raise "#{body["error"]["code"]}: #{body["error"]["message"]}" unless res.is_a?(Net::HTTPSuccess)
pp body["data"]
puts body["meta"]["credits_charged"]<?php
$query = http_build_query([
'handle' => 'joris.kahl',
]);
$ch = curl_init('https://socialtap.dev/v1/cosmos/posts?' . $query);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['x-api-key: ' . getenv('SOCIALTAP_API_KEY')],
]);
$body = json_decode(curl_exec($ch), true);
if (curl_getinfo($ch, CURLINFO_RESPONSE_CODE) >= 400) {
throw new RuntimeException($body['error']['code'] . ': ' . $body['error']['message']);
}
print_r($body['data']);
echo $body['meta']['credits_charged'], PHP_EOL;package main
import (
"context"
"fmt"
"log"
socialtap "socialtap.dev/sdk/go"
)
func main() {
ctx := context.Background()
client, err := socialtap.NewClient() // the API key defaults to $SOCIALTAP_API_KEY
if err != nil {
log.Fatal(err)
}
res, err := client.Cosmos.Posts.List(ctx, socialtap.CosmosPostsParams{Handle: "joris.kahl"})
if err != nil {
log.Fatal(err)
}
fmt.Println(res.Data)
fmt.Println(res.Credits.Charged, res.Meta.RequestID)
}curl 'https://socialtap.dev/v1/cosmos/posts?handle=joris.kahl' \
-H "x-api-key: $SOCIALTAP_API_KEY"GET https://socialtap.dev/v1/cosmos/postsDocs // Node 18+: save this as app.mjs (an ES module) and run: node app.mjs
const params = new URLSearchParams({
url: "https://www.cosmos.so/joris.kahl/teh-nerd-stuff",
});
const res = await fetch(`https://socialtap.dev/v1/cosmos/collection_posts?${params}`, {
headers: { "x-api-key": process.env.SOCIALTAP_API_KEY ?? "" },
});
const body = await res.json();
if (!res.ok) throw new Error(`${body.error.code}: ${body.error.message}`);
const { data, page, meta } = body;
console.log(data, meta.credits_charged);from socialtap import SocialTap
client = SocialTap() # api_key defaults to os.environ["SOCIALTAP_API_KEY"]
res = client.cosmos.collection_posts.list(url="https://www.cosmos.so/joris.kahl/teh-nerd-stuff")
print(res.data)
print(res.credits.charged, res.meta.request_id)require "json"
require "net/http"
uri = URI("https://socialtap.dev/v1/cosmos/collection_posts")
uri.query = URI.encode_www_form('url' => 'https://www.cosmos.so/joris.kahl/teh-nerd-stuff')
req = Net::HTTP::Get.new(uri)
req["x-api-key"] = ENV.fetch("SOCIALTAP_API_KEY")
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }
body = JSON.parse(res.body)
raise "#{body["error"]["code"]}: #{body["error"]["message"]}" unless res.is_a?(Net::HTTPSuccess)
pp body["data"]
puts body["meta"]["credits_charged"]<?php
$query = http_build_query([
'url' => 'https://www.cosmos.so/joris.kahl/teh-nerd-stuff',
]);
$ch = curl_init('https://socialtap.dev/v1/cosmos/collection_posts?' . $query);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['x-api-key: ' . getenv('SOCIALTAP_API_KEY')],
]);
$body = json_decode(curl_exec($ch), true);
if (curl_getinfo($ch, CURLINFO_RESPONSE_CODE) >= 400) {
throw new RuntimeException($body['error']['code'] . ': ' . $body['error']['message']);
}
print_r($body['data']);
echo $body['meta']['credits_charged'], PHP_EOL;package main
import (
"context"
"fmt"
"log"
socialtap "socialtap.dev/sdk/go"
)
func main() {
ctx := context.Background()
client, err := socialtap.NewClient() // the API key defaults to $SOCIALTAP_API_KEY
if err != nil {
log.Fatal(err)
}
res, err := client.Cosmos.CollectionPosts.List(ctx, socialtap.CosmosCollectionPostsParams{URL: "https://www.cosmos.so/joris.kahl/teh-nerd-stuff"})
if err != nil {
log.Fatal(err)
}
fmt.Println(res.Data)
fmt.Println(res.Credits.Charged, res.Meta.RequestID)
}curl -G 'https://socialtap.dev/v1/cosmos/collection_posts' \
--data-urlencode 'url=https://www.cosmos.so/joris.kahl/teh-nerd-stuff' \
-H "x-api-key: $SOCIALTAP_API_KEY"GET https://socialtap.dev/v1/cosmos/collection_postsDocs // Node 18+: save this as app.mjs (an ES module) and run: node app.mjs
const params = new URLSearchParams({
query: "architecture",
});
const res = await fetch(`https://socialtap.dev/v1/cosmos/search_posts?${params}`, {
headers: { "x-api-key": process.env.SOCIALTAP_API_KEY ?? "" },
});
const body = await res.json();
if (!res.ok) throw new Error(`${body.error.code}: ${body.error.message}`);
const { data, page, meta } = body;
console.log(data, meta.credits_charged);from socialtap import SocialTap
client = SocialTap() # api_key defaults to os.environ["SOCIALTAP_API_KEY"]
res = client.cosmos.search_posts.list(query="architecture")
print(res.data)
print(res.credits.charged, res.meta.request_id)require "json"
require "net/http"
uri = URI("https://socialtap.dev/v1/cosmos/search_posts")
uri.query = URI.encode_www_form('query' => 'architecture')
req = Net::HTTP::Get.new(uri)
req["x-api-key"] = ENV.fetch("SOCIALTAP_API_KEY")
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }
body = JSON.parse(res.body)
raise "#{body["error"]["code"]}: #{body["error"]["message"]}" unless res.is_a?(Net::HTTPSuccess)
pp body["data"]
puts body["meta"]["credits_charged"]<?php
$query = http_build_query([
'query' => 'architecture',
]);
$ch = curl_init('https://socialtap.dev/v1/cosmos/search_posts?' . $query);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['x-api-key: ' . getenv('SOCIALTAP_API_KEY')],
]);
$body = json_decode(curl_exec($ch), true);
if (curl_getinfo($ch, CURLINFO_RESPONSE_CODE) >= 400) {
throw new RuntimeException($body['error']['code'] . ': ' . $body['error']['message']);
}
print_r($body['data']);
echo $body['meta']['credits_charged'], PHP_EOL;package main
import (
"context"
"fmt"
"log"
socialtap "socialtap.dev/sdk/go"
)
func main() {
ctx := context.Background()
client, err := socialtap.NewClient() // the API key defaults to $SOCIALTAP_API_KEY
if err != nil {
log.Fatal(err)
}
res, err := client.Cosmos.SearchPosts.List(ctx, socialtap.CosmosSearchPostsParams{Query: "architecture"})
if err != nil {
log.Fatal(err)
}
fmt.Println(res.Data)
fmt.Println(res.Credits.Charged, res.Meta.RequestID)
}curl 'https://socialtap.dev/v1/cosmos/search_posts?query=architecture' \
-H "x-api-key: $SOCIALTAP_API_KEY"GET https://socialtap.dev/v1/cosmos/search_postsDocs Other platforms, same key.
Posts and profiles come back in the same fields wherever they're from.
- 31 endpoints
TikTok
Posts, profiles, comments, hashtags and 7 more
- 29 endpoints
Instagram
Posts, profiles, comments, hashtags and 9 more
- 14 endpoints
Facebook
Posts, comments, profiles, transcripts and 2 more
- 21 endpoints
YouTube
Posts, playlists, profiles, comments and 3 more
- 13 endpoints
Reddit
Posts, comments, profiles, subreddits and 2 more
- 6 endpoints
Threads
Posts, profiles and comments
- 20 endpoints
GitHub
Profiles, repositories, issues, comments and 4 more
- 19 endpoints
LinkedIn
Posts, profiles, jobs, comments and 3 more
- 17 endpoints
X
Posts, profiles, comments, transcripts and 5 more
- 12 endpoints
Spotify
Tracks, artists, playlists, albums and 1 more
- 11 endpoints
Hacker News
Stories, comments, users and jobs
- 10 endpoints
Amazon
Products, profiles, posts, playlists and 2 more
- 10 endpoints
Apple Music
Tracks, albums, artists and playlists
- 10 endpoints
Fandom
Posts, wiki pages, comments, wikis and 1 more
- 10 endpoints
Pinterest
Pins, boards, profiles, topics and 2 more
- 7 endpoints
Rumble
Posts, profiles, comments, transcripts and 1 more
- 5 endpoints
Bluesky
Posts, profiles and comments
- 5 endpoints
Twitch
Videos, profiles, transcripts and livestreams
- 4 endpoints
Telegram
Posts and channels
- 4 endpoints
TikTok Shop
Products and reviews
- 3 endpoints
Kwai
Posts and profiles
- 3 endpoints
Snapchat
Spotlights, profiles and comments
- 3 endpoints
SoundCloud
Tracks and artists
- 3 endpoints
Truth Social
Posts and profiles
- 2 endpoints
Kick
Posts and transcripts
- 1 endpoint
Komi
Pages
- 1 endpoint
Lnk.Bio
Profiles
- 1 endpoint
Linkme
Profiles
- 1 endpoint
Linktree
Profiles
- 1 endpoint
Pillar
Pages
- 1 endpoint
Yelp
Web results
- 3 endpoints
TikTok Ad Library
Ads
- 6 endpoints
Facebook Ad Library
Ads, advertisers and transcripts
- 4 endpoints
Facebook Events
Events
- 3 endpoints
Facebook Marketplace
Listings and places
- 6 endpoints
Google Ads Transparency Center
Ads and advertisers
- 2 endpoints
LinkedIn Ad Library
Ads
Does the Cosmos Post API take a shop product's link?
Can I look an account up by its brand page?
Does the Cosmos Collection API return the elements in the collection?
What do I send?
Is the data live?
What does null mean in a response?
Are the fields the same on every platform?
What happens when a platform changes its pages?
Do you read private or logged-in content?
Can my AI agent use it?
Try it on a Cosmos link you have.
Get a key and send your first request in a minute. The same key works on every platform.
- No credit card
- Failed requests are free
- Works on all 310 endpoints