1. Use cases
  2. Community monitoring

Community monitoring

Read groups, channels and communities and watch for new posts.

The job

Support and product teams follow where their users talk. List the newest posts in each space and keep what mentions you.

Endpoints

Failed requests and cached repeats cost 0 credits. Send max_age_days to accept a recent cached copy. See credits and caching.

EndpointReturnsCost
Facebook group posts1 credit
Telegram channel posts1 credit
Create a monitorFree

Recipe

  1. List the spaces you follow.
  2. Read their newest posts.
  3. Add a monitor to get new ones at a webhook.
1import os2import requests34API = "https://api.socialscrape.dev"5HEADERS = {"x-api-key": os.environ["SOCIALSCRAPE_API_KEY"]}678def get(path, **params):9    res = requests.get(API + path, headers=HEADERS, params=params, timeout=60)10    res.raise_for_status()11    return res.json()["data"]1213# Telegram channel posts14posts = get("/v1/telegram/channel/posts", handle="telegram")1516for p in posts["items"][:5]:17    print(p["published_at"], p["text"][:80])

Calls use api.socialscrape.dev and return the shapes in the reference.

Good to know

Private groups and invite-only channels are out of reach by design.

Related