The job
Support and product teams follow where their users talk. List the newest posts in each public space and keep what mentions you.
Endpoints
| Endpoint | Returns | Cost |
|---|---|---|
GET /v1/facebook/group/posts | Facebook public group posts | 1 credit |
GET /v1/telegram/channel/posts | Telegram public channel posts | 1 credit |
GET /v1/twitter/community/tweets | X community posts | 1 credit |
POST /v1/monitors | Create a monitor | Free |
Failed requests and cached repeats cost 0 credits. Send max_age_days to accept a recent cached copy. See credits and caching.
Recipe
- List the public spaces you follow.
- Read their newest posts.
- Add a monitor to get new ones at a webhook.
Preview
The API is in early access. Calls use
api.socialscrape.io and return the shapes in the reference.Python
import os
import requests
API = "https://api.socialscrape.io"
HEADERS = {"x-api-key": os.environ["SOCIALSCRAPE_API_KEY"]}
def get(path, **params):
res = requests.get(API + path, headers=HEADERS, params=params, timeout=60)
res.raise_for_status()
return res.json()["data"]
# Telegram public channel posts
posts = get("/v1/telegram/channel/posts", handle="telegram")
for p in posts["items"][:5]:
print(p["published_at"], p["text"][:80])TypeScript
const API = "https://api.socialscrape.io";
const headers = { "x-api-key": process.env.SOCIALSCRAPE_API_KEY! };
async function get(path: string, params: Record<string, string | number | boolean>) {
const query = new URLSearchParams(Object.entries(params).map(([k, v]) => [k, String(v)]));
const res = await fetch(`${API}${path}?${query}`, { headers });
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
return (await res.json()).data;
}
// Telegram public channel posts
const posts = await get("/v1/telegram/channel/posts", { handle: "telegram" });
for (const p of posts.items.slice(0, 5)) console.log(p.published_at, String(p.text).slice(0, 80));Good to know
Only public spaces are readable. Private groups and invite-only channels are out of reach by design.