Filters
The filter spec, field by field, with the matching rules stated exactly, so you can predict what a monitor will and will not match.
A monitor is a filter_spec. Every field is optional, except that a monitor must be anchored by either subreddit or a keyword q.
{
"subreddit": ["SaaS", "startups"],
"kind": "both",
"q": "pricing",
"include_any": ["api", "sdk"],
"include_all": ["reddit", "data"],
"exclude_terms": ["hiring", "job"],
"search_in": ["title", "body"],
"domain": ["example.com"],
"author": "some_user",
"min_score": 5,
"nsfw": false
}Fields
| Field | Type | Meaning |
|---|---|---|
subreddit | string[] | Names without r/. Required unless you set a keyword q for sitewide monitoring: a monitor must be anchored by one or the other. |
exclude_subreddits | string[] | Subreddits to suppress. Sitewide monitors only (see below). |
kind | post | comment | both | Defaults to post. comment and both need Growth or above. |
q | string | Substring match, case-insensitive. |
include_any | string[] | Matches if any term is present. |
include_all | string[] | Matches only if every term is present. |
exclude_terms | string[] | Drops the item if any term is present. Applied last. |
search_in | string[] | Which fields the text terms look at. Any of title, body, url, permalink. All four resolve on comments as well as posts. |
domain | string[] | Matches links to these domains. |
author | string | Exact author match. |
min_score | integer | Drops items scoring below this. |
nsfw | boolean | false drops items flagged NSFW. Posts only. Rejected on kind: "comment" or "both" (see below). |
Matching rules, stated exactly
These are the details that decide whether you get an alert, so they are spelled out rather than left to intuition:
- Text matching is case-insensitive substring: not word-boundary.
apimatchestherapist. If that matters, use a longer term or addexclude_terms. search_inscopes every text field (q,include_any,include_all,exclude_terms). Omit it and the default scope is used; set it and only those fields are searched. A term that only appears in a URL will not match ifsearch_inis["title"].exclude_termswins. An item matching bothinclude_anyandexclude_termsis dropped.exclude_subredditsis for sitewide monitors, and is rejected on a scoped one. A sitewide monitor watches all of Reddit for your keyword, so the one thing it cannot otherwise say is "everywhere except there". That is what this field is for, and it is where the noise on a keyword monitor actually comes from. A monitor that already lists its subreddits has no use for it, so passing both is rejected at creation with a field-level error rather than accepted and quietly ignored. Remove the unwanted name fromsubredditinstead. Names are matched the same way as insubreddit:r/Politics,/r/politicsandpoliticsare one entry, up to 50 of them.exclude_subredditsis a delivery filter, not a cost or coverage setting. Excluding a subreddit changes what reaches you, never what we poll, so it does not slow your monitor down, does not free up any quota, and cannot cause you to miss a match anywhere else. Exclusion is absolute and independent ofexclude_terms: an item is dropped if either one fires, and neither substitutes for the other.domainmatches the host exactly or as a dot-suffix.example.commatchesexample.comandblog.example.com, and does not matchnotexample.com. Shortened links are not resolved: at.colink to your site matchest.co, not your domain.min_scoreis evaluated at detection time. A post found seconds after it was created has a score near zero, so amin_scoreabove about 2 combined with a fast plan will silently drop nearly everything. Fast detection and score thresholds pull against each other by nature.- On a comment,
titlemeans the THREAD's title. A Reddit comment has no title of its own, so asearch_inof["title"]on a comment matches against the title of the post the comment sits under. That also applies when you omitsearch_in, becausetitleis part of the default scope. It widens what you get: a busy thread whose title carries your term can deliver every comment under it, bounded by your per-monitor delivery ceiling. Scope to["body"]if you only want comments that say the term themselves. nsfw: falseis rejected on a monitor that watches comments. Reddit flags NSFW on a post, never on an individual comment, so there is no field to filter a comment on. Rather than accept the setting and silently never apply it,kind: "comment"andkind: "both"rejectnsfw: falseat creation. Keep NSFW filtering by running akind: "post"monitor, and filter comment text withexclude_terms.permalinkandurldiffer on a comment.permalinkis the comment's own path;urlis that path as a full reddit.com URL, and on a link post it is the outbound destination instead. Scope topermalinkto match on the thread path.
Worked example
Watch two subreddits for people asking about Reddit data, ignoring job posts, and only where the text appears in the title or body:
{
"subreddit": ["SaaS", "startups"],
"kind": "both",
"include_any": ["reddit api", "scrape reddit", "reddit data"],
"exclude_terms": ["hiring", "job", "salary"],
"search_in": ["title", "body"]
}Watch all of Reddit for your brand name, minus the two subreddits that generate the noise:
{
"q": "acme",
"exclude_subreddits": ["politics", "AskReddit"],
"search_in": ["title", "body"]
}Validation
Invalid specs are rejected at creation with a field-level error rather than silently accepted and never matching. A monitor that matches nothing because of a typo is indistinguishable from a quiet week, which is why this fails loudly instead.
Independent third-party API for developers and researchers. Not affiliated with, endorsed by, or sponsored by Reddit, Inc.
