Skip to main content

Create KeywordAlert

Creates a new keyword alert for a specific platform.

Endpoint​

POST /api/keyword-alerts/{platform}

Path Parameters​

ParameterTypeDescription
platformstringThe platform to create the alert for

Request Body​

Required Parameters​

Column nameTypeDescription
keywordsstringThe keywords you want to monitor. Each keyword can be made of one or several words. You can specify up to 3 independent keywords that should ALL appear in the result. Separate multiple keywords with commas. Example: chatgpt, blog article, seo

Optional Parameters​

Column nameTypeDescription
excluded_keywordsstringKeywords that should not appear in the results. You can specify up to 10 excluded keywords (5 for LinkedIn). Separate multiple keywords with commas. Example: spam, promotion, advertisement
included_usersstring(Reddit, Hacker News, X (Twitter), and Youtube only) Only monitor content from these specific users. Up to 3 users maximum. Not case sensitive. Example: maxai834, thebloke, badenergy12x
excluded_usersstring(Reddit, Hacker News, X (Twitter), and Youtube only) Do not monitor content from these users. Up to 3 users maximum. Not case sensitive. Example: maxai834, thebloke, badenergy12x
included_subredditsstring(Reddit only) Only monitor these specific subreddits. Up to 10 subreddits maximum. Not case sensitive, no 'r/' prefix. Example: marketing, saas, startups
excluded_subredditsstring(Reddit only) Do not monitor these subreddits. Up to 10 subreddits maximum. Not case sensitive, no 'r/' prefix. Example: marketing, saas, startups
public_facebook_group_urlstring(Facebook only) The URL of the public Facebook group to monitor. Example: https://www.facebook.com/groups/1234567890/
included_languagesstringOnly monitor content in these languages. Use ISO language codes. Up to 3 languages maximum. Example: en, fr, es
excluded_languagesstringDo not monitor content in these languages. Use ISO language codes. Up to 3 languages maximum. Example: en, fr, es
whole_words_onlyboolean(Reddit, Hacker News, and X (Twitter) only) Only match complete words. For example, if you monitor "kwatch", it won't match "kwatch.io". Use "true" or "false".
case_sensitiveboolean(Reddit and Hacker News only) Match exact case. For example, if you monitor "kwatch", it won't match "KWatch". Use "true" or "false".
search_postsboolean(Reddit, Hacker News, and X (Twitter) only) Monitor keywords in posts. Use "true" or "false".
search_commentsboolean(Reddit, Hacker News, and X (Twitter) only) Monitor keywords in comments. Use "true" or "false".
include_nsfwboolean(Reddit only) Include NSFW content. Use "true" or "false".
api_webhook_urlstringURL to send webhook notifications to.
slack_webhook_urlstringSlack webhook URL for notifications.
enabledbooleanWhether the alert should be active. Use "true" or "false".

Response​

Returns a JSON object containing the createdalert details.

Example Request​

curl -X POST "https://api.kwatch.io/api/keyword-alerts/twitter" \
-H "Authorization: Bearer your-api-key-here" \
-H "Content-Type: application/json" \
-d '{
"keywords": "example keyword",
"excluded_keywords": "exclude this",
"search_posts": true,
"search_comments": false,
"included_users": "user1,user2",
"excluded_users": "user3",
"included_languages": "en,fr",
"excluded_languages": "es",
"api_webhook_url": "https://example.com/webhook",
"slack_webhook_url": "https://hooks.slack.com/...",
"enabled": true
}'

Example Response​

{
"id": 123,
"keywords": "example keyword",
"excluded_keywords": "exclude this",
"search_posts": true,
"search_comments": false,
"included_users": "user1,user2",
"excluded_users": "user3",
"included_languages": "en,fr",
"excluded_languages": "es",
"api_webhook_url": "https://example.com/webhook",
"slack_webhook_url": "https://hooks.slack.com/...",
"enabled": true,
"monthly_count": 42
}