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 per 25 results)
The domain mentions endpoint returns Reddit posts that link to a given domain, sorted by recency. Like every Reddit read, it runs as an async job: the API replies 202 Accepted with a jobId, and you fetch the result from GET /v1/reddit/jobs/{id} (free). The CLI waits for the result for you. See AI Agent Integration for the full flow.
# Create the job
curl -H "x-api-key: $REDDGROW_API_KEY" \
"https://api.reddgrow.ai/agent/domains/yoursite.com/mentions?limit=50"
# {"jobId":"job_01HXYZ...","status":"queued"}
# Poll for the result (0 credits)
curl -H "x-api-key: $REDDGROW_API_KEY" \
"https://api.reddgrow.ai/v1/reddit/jobs/job_01HXYZ..."reddgrow reddit domains mentions yoursite.com --limit 50Once the job is completed, its result holds the mentions:
{
"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 reddit domains mentions yoursite.com --limit 50 | \
jq '[.data.children[].data | select(.score >= 10)]'Or filter in Node.js, using a helper that creates the job and polls it until it finishes:
const headers = { "x-api-key": process.env.REDDGROW_API_KEY };
async function fetchMentions(domain) {
const { jobId } = await fetch(
`https://api.reddgrow.ai/agent/domains/${domain}/mentions?limit=50`,
{ headers }
).then((r) => r.json());
while (true) {
await new Promise((r) => setTimeout(r, 3000));
const job = await fetch(
`https://api.reddgrow.ai/v1/reddit/jobs/${jobId}`,
{ headers }
).then((r) => r.json());
if (job.status === "completed") return job.result;
if (job.status === "failed") throw new Error(job.error.message);
}
}const listing = await fetchMentions("yoursite.com");
const mentions = listing.data.children.map((c) => c.data);
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 reddit 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 listing = await fetchMentions("yoursite.com"); // helper from above
const mentions = listing.data.children.map((c) => c.data);
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 reddit domains mentions yoursite.com --limit 50 | \
jq -r '.data.children[].data | 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 page of 25 results, reserved when the job is created. The default limit of 25 reserves 5 credits, limit=50 reserves 10 and limit=60 reserves 15. Pages the scraper did not need are refunded, and the final charge is creditsCharged on the finished job. Polling the job is free, and a job that fails on ReddGrow's side (503) is refunded in full. Running the default 25-result fetch once per hour costs at most 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
- Lower
limitto what you need: cost scales with pages, so 25 results or fewer is the cheapest read
See Credit Optimization for caching TTL recommendations.