Domain Monitoring
Track mentions of your domain on Reddit
ReddGrow can scan Reddit for every post and comment that links to your domain. This guide shows how to fetch mentions, filter by relevance, and automate the process with a scheduled job.
Fetch domain mentions (5 credits)
The domain mentions endpoint returns Reddit posts that link to a given domain, sorted by recency.
curl -H "x-api-key: $REDDGROW_API_KEY" \
"https://api.reddgrow.ai/agent/domains/yoursite.com/mentions?limit=50"reddgrow domains mentions yoursite.com --limit 50{
"domain": "yoursite.com",
"mentions": [
{
"id": "t3_abc123",
"subreddit": "webdev",
"title": "Great article on async patterns",
"url": "https://yoursite.com/async-patterns",
"score": 312,
"num_comments": 47,
"created_utc": 1710000000,
"author": "u/some_dev"
},
{
"id": "t3_def456",
"subreddit": "javascript",
"title": "yoursite.com link in comment thread",
"score": 3,
"num_comments": 2,
"created_utc": 1709900000,
"author": "u/another_user"
}
],
"total": 2
}Filter by score
Low-score mentions are often noise. Pipe the response through jq to keep only posts above a threshold:
reddgrow domains mentions yoursite.com --limit 50 | \
jq '[.mentions[] | select(.score >= 10)]'Or filter in Node.js:
const res = await fetch(
"https://api.reddgrow.ai/agent/domains/yoursite.com/mentions?limit=50",
{ headers: { "x-api-key": process.env.REDDGROW_API_KEY } }
);
const { mentions } = await res.json();
const relevant = mentions.filter((m) => m.score >= 10);Automate with a cron job
Run the check every hour and write new mentions to a file for downstream processing.
# crontab -e
0 * * * * /usr/local/bin/reddgrow domains mentions yoursite.com --limit 50 \
>> /var/log/reddgrow-mentions.jsonl 2>&1For deduplication, track the most recent created_utc you've seen and skip anything older:
import fs from "fs";
const SEEN_FILE = "/tmp/last_mention_ts.txt";
async function checkMentions() {
const lastSeen = fs.existsSync(SEEN_FILE)
? parseInt(fs.readFileSync(SEEN_FILE, "utf8"), 10)
: 0;
const res = await fetch(
"https://api.reddgrow.ai/agent/domains/yoursite.com/mentions?limit=50",
{ headers: { "x-api-key": process.env.REDDGROW_API_KEY } }
);
const { mentions } = await res.json();
const newMentions = mentions.filter((m) => m.created_utc > lastSeen);
if (newMentions.length > 0) {
const latest = Math.max(...newMentions.map((m) => m.created_utc));
fs.writeFileSync(SEEN_FILE, String(latest));
// process newMentions — send alerts, log to database, etc.
console.log(`${newMentions.length} new mentions found`);
}
}
checkMentions();Alert on high-score mentions
Combine filtering with a notification. This example posts to a Slack webhook when a mention exceeds a score threshold:
reddgrow domains mentions yoursite.com --limit 50 | \
jq -r '.mentions[] | select(.score >= 50) |
"r/\(.subreddit): \(.title) (\(.score) points)\nhttps://reddit.com/r/\(.subreddit)/comments/\(.id[3:])"' | \
while IFS= read -r line; do
curl -s -X POST "$SLACK_WEBHOOK_URL" \
-H "Content-Type: application/json" \
-d "{\"text\": \"$line\"}"
doneCost considerations
The domain mentions endpoint costs 5 credits per call regardless of limit. Running it once per hour costs 120 credits/day. To reduce spend:
- Run less frequently for low-traffic domains (every 4–6 hours)
- Cache results and only re-fetch when you need fresh data
- Use the
limitparameter to cap result size — a smaller limit does not reduce cost, but it reduces bandwidth
See Credit Optimization for caching TTL recommendations.