SocialCrawl

Cookbooks

Re-read a list of posts into a sheet every morning, for a chart

Paste post links into a Google Sheet, refresh views, likes and comments each morning, and chart them over time

Send up to 100 post links in one call, and get back each post's views, likes and comments. Write them into a sheet with the date, once a morning, and the sheet becomes a chart of how each post grew. The links can mix Instagram, TikTok, YouTube and other platforms.

Measured on 23/11/2026: ten public posts, four on Instagram, three on TikTok and three on YouTube, cost 14 credits in one call. All ten came back.

Start in five minutes

Set your key once. Every block on this page reads it.

Terminal
export SOCIALCRAWL_API_KEY=YOUR_API_KEY

Paste this prompt into your coding agent:

Prompt
Read https://www.socialcrawl.dev/docs/recipes/post-numbers-into-a-sheet.md and follow it to refresh the numbers of the post links in posts.txt. Use the key in SOCIALCRAWL_API_KEY. Price the call with a dry run first and show me the hold. Send at most 100 links a call, and stop and ask me before a morning's calls pass 200 credits a run.

Or price the call yourself. A dry run quotes it for 0 credits:

cURL
curl -X POST "https://www.socialcrawl.dev/v1/prism/post-stats" \
  -H "x-api-key: $SOCIALCRAWL_API_KEY" \
  -H "content-type: application/json" \
  -d '{"urls": ["https://www.tiktok.com/@nasa/video/7710449624397450509", "https://www.youtube.com/watch?v=224QFgY9PTM", "https://www.instagram.com/p/Df3Rp0bKNdr/"], "dry_run": true}'

How it works

  • prism/post-stats takes a list of post links from any mix of platforms.
  • It reads each post and returns its numbers in data.results, in the order you sent them.
  • Each link is billed at its own platform's rate, and a link that fails is refunded.
  • The call holds the worst case up front and refunds the rest when it ends.
  • Run it each morning and add a dated row per post. The rows over time are the chart.

What you need

CallWhat it givesCredits
POST /v1/prism/post-statsViews, likes, comments, shares and saves for up to 100 posts1 a post, 2 on Instagram, 5 on LinkedIn
POST /v1/prism/post-stats with "dry_run": trueThe hold for the same links0
A Google Sheet with Apps ScriptThe rows and the chartFree

Steps

cURL
curl -X POST "https://www.socialcrawl.dev/v1/prism/post-stats" \
  -H "x-api-key: $SOCIALCRAWL_API_KEY" \
  -H "content-type: application/json" \
  -d '{"urls": ["https://www.tiktok.com/@nasa/video/7710449624397450509", "https://www.youtube.com/watch?v=224QFgY9PTM", "https://www.instagram.com/p/Df3Rp0bKNdr/"]}'
Python
import json, os, urllib.request

body = {"urls": ["https://www.tiktok.com/@nasa/video/7710449624397450509", "https://www.youtube.com/watch?v=224QFgY9PTM"]}
req = urllib.request.Request(
    "https://www.socialcrawl.dev/v1/prism/post-stats",
    data=json.dumps(body).encode(),
    headers={"x-api-key": os.environ["SOCIALCRAWL_API_KEY"], "content-type": "application/json"},
)
page = json.load(urllib.request.urlopen(req, timeout=180))
for r in page["data"]["results"]:
    print(r["url"], r["status"], r["engagement"]["views"], r["engagement"]["likes"])
  • Each result has the link, its status (ok, not_found or unsupported) and its engagement.
  • data.summary.credits_charged is what the whole call cost.
Response (trimmed)
{
  "data": {
    "results": [
      { "url": "https://www.tiktok.com/@nasa/video/7710449624397450509", "status": "ok", "engagement": { "views": 53000, "likes": 2174, "comments": 289 }, "cost": 1 }
    ],
    "summary": { "total": 10, "ok": 10, "credits_charged": 14, "credits_refunded": 0 }
  }
}

Step 2: put the sheet to work

In Google Sheets, open Extensions, then Apps Script. Paste the SocialCrawl script over Code.gs, save, and reload the sheet. A SocialCrawl menu appears.

  • Choose Set API key and paste your key. It is kept in your own user properties, which other editors of the sheet cannot read.
  • Put one post link a row in column A of a tab named Posts, under a header.
  • Choose Refresh post numbers. Each post gets a dated row in the Post numbers tab.
  • Choose Refresh every morning to run it daily at about 08:00 in the script's time zone.

Step 3: chart it

Select the Post numbers tab and choose Insert, then Chart. Put the read time on the X axis and views on the Y axis, with one series per post. For a dashboard, add the sheet as a Google Sheets source in Looker Studio.

Store only what is new

  • The numbers change, so keep every reading. Each refresh adds rows and replaces none.
  • Key a reading on the post link and the read time together.
  • A post that is deleted or made private comes back as not_found and costs nothing. Leave it in the list, or remove its link.
  • Instagram reports no view count on photo posts, so views is empty there.

What it costs

Each post costs its platform's rate: 1 credit on most platforms, 2 on Instagram and 5 on LinkedIn. The roster lists every price.

What the runs measured on 23/11/2026:

RunPostsCredits
The dry run100 (it holds 14)
Four Instagram, three TikTok, three YouTube1014
The sheet's refresh, TikTok, YouTube and Instagram34

A sheet of 100 TikTok posts refreshed every morning costs about 100 credits a day.

Run this every day

The sheet's morning refresh is the schedule. A Monitor re-runs only GET requests, so it cannot hold this batch call.

When every post comes from one account, a numbers-only Monitor keeps the same numbers for you. Price it with a dry run, which creates nothing:

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", "params": {"handle": "nasa"}, "cadence": "daily", "track": {"metrics": ["items[].post.engagement.views", "items[].post.engagement.likes"]}}'
  • On 23/11/2026 this quoted 2 credits a run: the page and 1 scheduling credit.
  • It stores views and likes per video every day. Download them as a CSV from the Monitor's export.
  • The answer carries would_be_refused when your plan has no free Monitor slot.

Tips, and what not to use

  • Send links, not handles. This call reads known posts. To find an account's new posts, use Track a list of accounts.
  • Make a key for the sheet alone. You can then revoke it without touching anything else.
  • Keep a shared copy of the sheet private to people you trust. Each editor sets their own key.
  • Refresh once a day. Views on a post a week old change slowly, and each refresh is billed.

Copy it

Full program and agent brief

Next steps

On this page

시작할 준비가 됐습니까?

무료로 소셜 데이터를 받기 시작하고, 프로젝트가 커지면 그대로 확장합니다. 카드 등록은 필요 없습니다.