> Documentation index: https://www.socialcrawl.dev/llms.txt > Every page is also available as Markdown by adding .md. # Track accounts (/docs/recipes/track-a-list-of-accounts) Send your handles once, and a list job re-reads each account every morning and delivers only new posts Send a list of handles once, and a list job re-reads every account on one schedule. Each run keeps only the posts it has never delivered, so you never pay for a post twice. You read the new rows from the runs, or have them sent to your webhook. Measured on 23/11/2026: a list job over three Instagram accounts, `nasa`, `natgeo` and `smithsonian`, was quoted at 4 credits a run. Its first run read one page an account and returned 36 posts for 4 credits. ## Start in five minutes Set your key once. Every block on this page reads it. ```bash title="Terminal" export SOCIALCRAWL_API_KEY=YOUR_API_KEY ``` Paste this prompt into your coding agent: ```text title="Prompt" Read https://www.socialcrawl.dev/docs/recipes/track-a-list-of-accounts.md and follow it to track the Instagram accounts in handles.txt every morning. Use the key in SOCIALCRAWL_API_KEY. Price the list job with a dry run first and show me estimated_cost_per_run and max_cost_per_run. Create it only after I agree, with a max_credits_per_month I choose, and never add accounts without asking me. ``` Or price the job yourself. A dry run quotes it for 0 credits: ```bash title="cURL" curl -X POST "https://www.socialcrawl.dev/v1/monitors?dry_run=1" \ -H "x-api-key: $SOCIALCRAWL_API_KEY" \ -H "content-type: application/json" \ -d '{"recipe": "instagram/profile/posts", "subjects": ["nasa", "natgeo", "smithsonian"], "cadence": "daily"}' ``` ## How it works - A list job is one schedule over many accounts. Each account in `subjects` is read with the feed you name in `recipe`. - Each read stops at the newest post already delivered, so an account with nothing new costs one page. - An account that posted more than a page since the last run walks up to 5 pages. - Each run pays a list premium of 1 credit per 100 accounts, at least 1. - A list job does not use one of your Monitor slots. ## What you need | Call | What it gives | Credits | | --- | --- | --- | | `POST /v1/monitors?dry_run=1` | The price of a run, and of a run where every account posted a lot | 0 | | `POST /v1/monitors` with `subjects` | The list job | 0 to create | | `GET /v1/monitors/{monitor_id}/runs?include=result` | Each run's new posts | 0 | | `PATCH /v1/monitors/{monitor_id}` | Add or remove accounts | 0 | The feeds a list job takes: `instagram/profile/posts`, `instagram/profile/reels`, `tiktok/profile/videos`, `youtube/channel/videos`, `youtube/channel/shorts`, `twitter/user/tweets`, `threads/user/posts` and `facebook/profile/posts`. ## Steps ### Step 1: create the list job **cURL** ```bash title="cURL" curl -X POST "https://www.socialcrawl.dev/v1/monitors" \ -H "x-api-key: $SOCIALCRAWL_API_KEY" \ -H "content-type: application/json" \ -d '{"recipe": "instagram/profile/posts", "subjects": ["nasa", "natgeo", "smithsonian"], "cadence": "daily", "max_credits_per_month": 200}' ``` **Python** ```python title="Python" import json, os, urllib.request body = {"recipe": "instagram/profile/posts", "subjects": ["nasa", "natgeo", "smithsonian"], "cadence": "daily", "max_credits_per_month": 200} req = urllib.request.Request( "https://www.socialcrawl.dev/v1/monitors", data=json.dumps(body).encode(), headers={"x-api-key": os.environ["SOCIALCRAWL_API_KEY"], "content-type": "application/json"}, ) created = json.load(urllib.request.urlopen(req, timeout=60)) print(created["monitor"]["id"], created["monitor"]["next_run_at"]) ``` - The answer is `{ "monitor": { "id": ..., "next_run_at": ... } }`. Keep the id. - Leave `webhook_url` out to collect the rows yourself. Send it to have each run delivered. - Each subject is a handle. Set `subject_param` to list ids instead, such as `channelId` on YouTube. ### Step 2: read each run's new posts ```bash title="cURL" curl "https://www.socialcrawl.dev/v1/monitors/mon_7Qk2R9xLpV/runs?include=result&limit=1" \ -H "x-api-key: $SOCIALCRAWL_API_KEY" ``` ```json title="Response (trimmed)" { "runs": [ { "id": "6XjzP7b7PrOIk4RkXFJ6l", "status": "ok", "credits_used": 4, "result": { "rows_new": 36, "credits": { "premium": 1, "pages": 3 }, "rows": [{ "subject": "nasa", "row": { "post": { "id": "4034722052525930893", "url": "https://www.instagram.com/p/Df-NlR0PjmN/" } } }] } } ] } ``` - `result.rows` holds each new post with the account it came from, in the feed's own shape. - `result.reads` says, account by account, how many posts were new and what each read cost. - A run returns up to 5,000 new rows. Reading runs is free. ### Step 3: change the list `PATCH /v1/monitors/{monitor_id}` with `add_subjects` and `remove_subjects` changes the list for free. An account that stays keeps its place, so none of its posts is delivered twice. ## Store only what is new - The job already keeps only new posts. Key your own store on `row.post.id` as well, in case you read a run twice. - Read each run once. Keep the ids of the runs you have read. - The first run of an account is one page, its newest posts. Older posts are not walked. - A pinned post is delivered once and not again. - An account whose read says `not_found` in `result.reads` has gone or changed its handle. Remove it from the list. ## What it costs A run costs the list premium plus one page an account at the feed's price, and up to 5 pages for an account that posted a lot. The [roster](/docs/endpoint-pricing.md) lists every feed's price. What the runs measured on 23/11/2026: | Run | Accounts | Credits | | --- | --- | --- | | The dry run | 3 | 0 (quoted 4, at most 16) | | First run, 36 new posts | 3 | 4 | For 100 Instagram or TikTok accounts with nothing new, a run costs 101 credits: 100 pages and the premium. ## Run this every day The list job is the schedule. `cadence: "daily"` runs it once a day, and `max_credits_per_month` stops it before it passes your limit. Price any change with the same dry run: ```bash title="cURL" curl -X POST "https://www.socialcrawl.dev/v1/monitors?dry_run=1" \ -H "x-api-key: $SOCIALCRAWL_API_KEY" \ -H "content-type: application/json" \ -d '{"recipe": "tiktok/profile/videos", "subjects": ["nasa", "natgeo"], "cadence": "daily"}' ``` - `estimated_cost_per_run` is one page an account plus the premium. - `max_cost_per_run` is every account walking 5 pages. - Your plan caps the accounts across all your active lists. The answer carries `would_be_refused` when a list would pass it. ## Tips, and what not to use - Use one list job per feed. Instagram posts and TikTok videos are two jobs. - Do not poll each profile yourself. A list job reads every account down to the last post it delivered, and you never pay twice for a post. - Send `webhook_url` when you want the rows pushed. Each delivery is signed, so [verify it](/docs/webhooks.md#verifying-signatures). - To refresh the numbers of posts you already hold, use [Post numbers into a sheet](/docs/recipes/post-numbers-into-a-sheet.md). ## Copy it - [Get a free key](/auth/register?utm_source=docs&utm_medium=playbook&utm_campaign=track-a-list-of-accounts): New accounts start with free credits. No card needed. - [Sheets script](/blueprints/google-sheets/Code.gs): Track these accounts from column A of a sheet, priced first, and pull the new rows. - [n8n workflow](/blueprints/n8n/track-accounts.json): Creates the list job once, then adds each run - [Make blueprint](/blueprints/make/track-accounts.blueprint.json): Reads each run ## Full program and agent brief **Full program (Python)** ```python title="Python" # track_accounts.py: create a list job once, then print each run's new posts once. # Run: SOCIALCRAWL_API_KEY=... python3 track_accounts.py (Python 3.9+, nothing to install) import json import os import urllib.error import urllib.request KEY = os.environ["SOCIALCRAWL_API_KEY"] BASE = "https://www.socialcrawl.dev/v1" HANDLES = [h.strip().lstrip("@") for h in open("handles.txt") if h.strip()] STATE_FILE = "track_accounts.json" def call(method, path, body=None): data = json.dumps(body).encode() if body is not None else None req = urllib.request.Request(f"{BASE}/{path}", data=data, method=method, headers={"x-api-key": KEY, "content-type": "application/json"}) try: with urllib.request.urlopen(req, timeout=60) as res: return json.load(res) except urllib.error.HTTPError as err: raise SystemExit(json.load(err)["error"]["message"]) # a 402 says what to buy state = json.load(open(STATE_FILE)) if os.path.exists(STATE_FILE) else {"monitor_id": None, "read_runs": []} if not state["monitor_id"]: body = {"recipe": "instagram/profile/posts", "subjects": HANDLES, "cadence": "daily"} quote = call("POST", "monitors?dry_run=1", body)["data"]["estimate"] print(f"about {quote['estimated_cost_per_run']} credits a run, at most {quote['max_cost_per_run']}") if input("Create it? [y/N] ").lower() != "y": raise SystemExit() state["monitor_id"] = call("POST", "monitors", {**body, "max_credits_per_month": 200})["monitor"]["id"] runs = call("GET", f"monitors/{state['monitor_id']}/runs?include=result&limit=20")["runs"] for run in reversed(runs): if run["id"] in state["read_runs"] or run["status"] not in ("ok", "partial"): continue for r in run["result"]["rows"]: print(run["finished_at"], r["subject"], r["row"]["post"]["url"]) state["read_runs"].append(run["id"]) json.dump(state, open(STATE_FILE, "w")) ``` **Agent brief** ```text title="Agent brief" Goal: the new posts of a list of Instagram accounts, every morning, each once. Read https://www.socialcrawl.dev/docs/recipes/track-a-list-of-accounts.md first. 1. Send POST /v1/monitors?dry_run=1 with recipe instagram/profile/posts, the handles as subjects and cadence daily. 2. Show me estimated_cost_per_run and max_cost_per_run. Create the job only after I agree to a max_credits_per_month. 3. Each morning, read GET /v1/monitors/{monitor_id}/runs?include=result. Report the rows of runs I have not read. 4. Change the list only with PATCH add_subjects or remove_subjects, and only when I ask. ``` ## Next steps - [Webhooks](/docs/webhooks.md#list-jobs-one-schedule-over-many-accounts): List jobs, the delivery body and the caps. - [Follow creators](/docs/recipes/follow-creators.md): The recent posts of a few creators in one call, without a job. - [Google Sheets](/docs/integrations/google-sheets.md): Run the list job from a sheet.