> Documentation index: https://www.socialcrawl.dev/llms.txt > Every page is also available as Markdown by adding .md. # Keyword watch (/docs/recipes/keyword-watch) Search your terms on four platforms on a schedule. Repeats that find nothing new are free Send your terms to four searches, and get back only the posts you have not seen. Each search carries a `seen` name you choose. A repeat drops every post you already received under that name, and a page with nothing new costs nothing. Measured on 23/11/2026: the first search for "solar eclipse" cost 1 credit on each of Reddit, X, TikTok and YouTube. Repeats that found nothing new cost 0 credits on all four. ## 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/keyword-watch.md and follow it to watch "solar eclipse" and "aurora forecast" on Reddit, X, TikTok and YouTube. Use the key in SOCIALCRAWL_API_KEY. Send seen=sky-watch on every search. Price the listener with a dry run first and show me credits_per_month. Never create it without a max_credits_per_month cap I have agreed to. ``` Or run the first search yourself: ```bash title="cURL" curl -G "https://www.socialcrawl.dev/v1/reddit/search" \ -H "x-api-key: $SOCIALCRAWL_API_KEY" \ --data-urlencode "query=solar eclipse" \ --data-urlencode "sort=new" \ --data-urlencode "seen=sky-watch" ``` ## How it works - `seen` is a name you choose, up to 64 letters, digits, dots, dashes or underscores. - Every post you receive under that name is remembered for 24 hours from the last call that used it. - A later search with the same name leaves those posts off the page. - The page price falls with the share of repeats. A page of nothing but repeats is free. - One name can cover all four platforms and every term of one watch. ## What you need | Call | What it gives | Credits | | --- | --- | --- | | `GET /v1/reddit/search` | Reddit posts for a term, newest first with `sort=new` | 1 a page | | `GET /v1/twitter/search/tweets` | Posts on X for a term | 1 a page | | `GET /v1/tiktok/search` | TikTok videos for a term | 1 a page | | `GET /v1/youtube/search` | YouTube videos for a term | 1 a page | | `POST /v1/listening/streams?dry_run=1` | The monthly price of the same watch as a listener | 0 | ## Steps ### Step 1: search each platform with `seen` **cURL** ```bash title="cURL" curl -G "https://www.socialcrawl.dev/v1/tiktok/search" \ -H "x-api-key: $SOCIALCRAWL_API_KEY" \ --data-urlencode "query=solar eclipse" \ --data-urlencode "seen=sky-watch" ``` **Python** ```python title="Python" import json, os, urllib.request url = "https://www.socialcrawl.dev/v1/tiktok/search?query=solar+eclipse&seen=sky-watch" req = urllib.request.Request(url, headers={"x-api-key": os.environ["SOCIALCRAWL_API_KEY"]}) page = json.load(urllib.request.urlopen(req, timeout=120)) print(len(page["data"]["items"]), page["credits_used"], page["data"]["walk"]["repeats"]) ``` - Send the same request to the other three paths in the table. Only the path changes. - On Reddit, add `sort=new`, so the newest posts come first. - `data.walk.repeats` counts the posts left off because you had them already. ### Step 2: repeat on a schedule Run the same four searches again from cron or any scheduler, with the same `seen` name. ```json title="Response (trimmed)" { "data": { "items": [], "walk": { "pages": 1, "rows_fetched": 40, "rows_returned": 0, "repeats": 40, "credits": { "pages": 1, "refunded": 1 } } }, "credits_used": 0 } ``` - A page with no new post comes back empty, and the credit for it is refunded. - A page with some new posts is billed in proportion to them, rounded up. On 23/11/2026 a TikTok repeat held 12 new videos out of 40 and cost 1 credit. ### Step 3: keep the new posts Store each post you receive by its `post.id`. The `seen` memory lasts 24 hours, so your own store is what stops a repeat after a quiet day. ## Store only what is new - Key each row on `post.id`. The four platforms use different id formats, so key on the platform and the id together. - Use one `seen` name per watch. A second watch with its own terms should get its own name. - Search at least once a day. After 24 hours without a call, the name forgets what you received. - Keep `sort=new` on Reddit. Without it, older posts can come back once the memory ends. ## What it costs Each page costs what a page of that search costs, less the share of repeats on it. The [roster](/docs/endpoint-pricing.md) lists every price. What the runs measured on 23/11/2026: | Run | Platform | Credits | | --- | --- | --- | | First search, "solar eclipse" | Reddit, X, TikTok, YouTube | 1 each | | A repeat with nothing new | Reddit, X, TikTok, YouTube | 0 each | | A repeat with 12 new videos of 40 | TikTok | 1 | | The listener dry run | All four | 0 | ## Run this every day A listener runs the same watch for you on a schedule. It delivers each new post once, as a mention, and never spends past its monthly cap. Price it with a dry run, which creates nothing: ```bash title="cURL" curl -X POST "https://www.socialcrawl.dev/v1/listening/streams?dry_run=1" \ -H "x-api-key: $SOCIALCRAWL_API_KEY" \ -H "content-type: application/json" \ -d '{"keywords": ["solar eclipse", "aurora forecast"], "platforms": ["reddit", "twitter", "tiktok", "youtube"], "schedule": {"every": "6h", "name": "Sky watch"}}' ``` - On 23/11/2026 this dry run quoted 960 credits a month: 8 searches a check, 4 checks a day. - It recommended a cap of 2,728 credits a month, for the months when checks read three pages. - Send the same body without `dry_run=1`, with `schedule.max_credits_per_month` set to your cap, to create it. - On Reddit, X and YouTube a check that finds nothing new is refunded. TikTok returns top results, so its page is billed on every check. ## Tips, and what not to use - Use `seen`, not `since`, to keep a quiet check free. A page emptied by `since` is still billed, because the page was fetched. - Quote phrases on Reddit. Words in a query match any of them, so a phrase in double quotes is narrower. - Keep the watch's terms in one place. The same name and the same terms on every run keep the repeats free. - Read [Listening](/docs/engines/listening.md) before you create a listener with boolean rules or named accounts. ## Copy it - [Get a free key](/auth/register?utm_source=docs&utm_medium=playbook&utm_campaign=keyword-watch): New accounts start with free credits. No card needed. - [n8n workflow](/blueprints/n8n/keyword-search.json): Searches your terms every morning with seen and appends new posts to a sheet. - [Make blueprint](/blueprints/make/keyword-search.blueprint.json): The same search as a Make scenario. Import it with Import Blueprint. ## Full program and agent brief **Full program (Python)** ```python title="Python" # keyword_watch.py: search terms on four platforms and keep only new posts. # Run: SOCIALCRAWL_API_KEY=... python3 keyword_watch.py (Python 3.9+, nothing to install) import json import os import time import urllib.error import urllib.parse import urllib.request KEY = os.environ["SOCIALCRAWL_API_KEY"] BASE = "https://www.socialcrawl.dev/v1" TERMS = ["solar eclipse", "aurora forecast"] SEEN = "sky-watch" # one name for the whole watch PATHS = { "reddit": ("reddit/search", {"sort": "new"}), "twitter": ("twitter/search/tweets", {}), "tiktok": ("tiktok/search", {}), "youtube": ("youtube/search", {}), } STORE = "keyword_watch.json" def get(path, query): url = f"{BASE}/{path}?" + urllib.parse.urlencode(query) for attempt in range(6): req = urllib.request.Request(url, headers={"x-api-key": KEY}) try: with urllib.request.urlopen(req, timeout=120) as res: return json.load(res) except urllib.error.HTTPError as err: if err.code == 402: raise SystemExit(json.load(err)["error"]["message"]) # never retry a 402 if err.code not in (429, 503) or attempt == 5: raise time.sleep(int(err.headers.get("Retry-After", "2"))) kept = json.load(open(STORE)) if os.path.exists(STORE) else {} spent = 0 for platform, (path, extra) in PATHS.items(): for term in TERMS: page = get(path, {"query": term, "seen": SEEN, **extra}) spent += page["credits_used"] for row in page["data"]["items"]: key = f"{platform}:{row['post']['id']}" if key not in kept: kept[key] = {"term": term, "url": row["post"]["url"], "at": row["post"]["published_at"]} print(platform, term, row["post"]["url"]) json.dump(kept, open(STORE, "w")) print(f"{len(kept)} posts kept, {spent} credits this run") ``` **Agent brief** ```text title="Agent brief" Goal: a keyword watch on Reddit, X, TikTok and YouTube that pays nothing for a quiet check. Read https://www.socialcrawl.dev/docs/recipes/keyword-watch.md first. 1. For each term, call reddit/search (sort=new), twitter/search/tweets, tiktok/search and youtube/search with seen=sky-watch. 2. Store each post by platform and post.id. Report only posts I have not stored. 3. Run it at least once a day with the same seen name. 4. To hand it over, send POST /v1/listening/streams?dry_run=1 and show me credits_per_month and recommended_max_credits_per_month. 5. Never create the listener without a max_credits_per_month I have agreed to. ``` ## Next steps - [Listening](/docs/engines/listening.md): Price a listener for free, then let it deliver each new mention once. - [Watch a topic](/docs/recipes/watch-a-topic.md): Discover across many platforms, with what people say under each post. - [n8n](/docs/integrations/n8n.md): Run the same watch from an n8n workflow.