Log inStart Free Trial
easyCoexistence Official APIs

Auto-hide spam comments on TikTok with AI

To hide TikTok spam comments automatically with AI, have a model read each new comment, judge it against your description of spam, and hide the flagged ones through TikTok's API for Business. TikTok reports new comments within five minutes. easyCoexistence runs it as an automation: on each new comment, an ai_decide step asks your model, on your own key, and hide_comment hides what it flags.

5 min

Time within which TikTok's comment.update webhook reports a new comment on an owned photo post or public video.

HIDE or UNHIDE

The two actions of TikTok's /business/comment/hide/; an unhide can fail when moderation or filters keep a comment hidden.

4 filters

TikTok's own comment filters: unwanted comments, keywords, Creator Care Mode and approval of each comment; filtered comments wait for your approval.

2 to 6

Paths an easyCoexistence AI picks the path step holds, each described in a sentence, plus Otherwise when none fits.

40 a minute

Calls TikTok allows per connected account on each Accounts API endpoint, the hide and reply endpoints included.

What does TikTok already filter on its own?

More than many owners switch on. In the TikTok app, under Settings and privacy, Privacy, Comments, an account can turn on Filter unwanted comments for spam and offensive comments, filter comments that contain keywords it adds, use Creator Care Mode to hide inappropriate, offensive or previously reported comments, or make each comment wait for approval, a setting TikTok says is not available to everyone yet. Filtered comments stay hidden until you approve or delete them under Review filtered comments. If a word list catches your spam, these filters are the simpler choice, and they need no AI key.

What does an AI check add?

Judgment by meaning. A keyword list misses spam phrased a new way, written in another language or spelled to slip past filters, and it can hide a genuine comment that happens to contain a listed word. A model reads the whole comment against your own description, such as "sells followers, pushes another account or app, or announces a giveaway we did not run", and picks a path. It runs on your Anthropic, OpenAI or OpenRouter key, so you choose the model and pay the provider directly, one short call per new comment, and each run records the path it took.

How does the automation decide what to hide?

With an AI picks the path step, inside one automation that starts on new comments. TikTok reports the comment, the step sends its text and your path descriptions to your model, and the model names the path that fits, or none. Each path holds its own steps, so a Spam path hides the comment, an Abuse path hides it and emails you, and Otherwise leaves it up:

1New commentA top-level comment on a public video or photo post
2comment.updateTikTok reports it within five minutes
3AI picks the pathYour model reads it against your path descriptions
4Hide the commentOn the Spam or Abuse path; Otherwise leaves it up

How do you set it up from Claude or ChatGPT?

Describe your spam in plain words and ask for the automation. Through the easyCoexistence connector, the assistant finds the TikTok account with list_social_accounts and calls create_automation with trigger comment_received and match any, or match keyword to check only comments with certain words, plus post_id to watch one video. The ai_decide step names your provider, a model ID and 2 to 6 paths, each with a sentence on when to take it, and hide_comment and notify_owner go inside the paths. Your AI key stays in the dashboard, since no tool takes or returns one. test_automation then runs a sample comment through it and hides nothing:

A spam check through MCP, then a test
create_automation {
  "connection_id": "<TIKTOK_ACCOUNT_ID>",
  "name": "Hide spam on TikTok",
  "trigger": { "type": "comment_received", "match": "any" },
  "steps": [
    {
      "type": "ai_decide",
      "provider": "anthropic",
      "model": "<MODEL_ID>",
      "instructions": "Comments on a bakery's TikTok videos. Questions, praise, jokes and complaints about our products are fine.",
      "paths": [
        {
          "name": "Spam",
          "description": "Sells followers or likes, pushes another account, link or app, or announces a giveaway we did not run",
          "steps": [{ "type": "hide_comment" }]
        },
        {
          "name": "Abuse",
          "description": "Insults, harassment or hate aimed at us or at other commenters",
          "steps": [
            { "type": "hide_comment" },
            { "type": "notify_owner", "text": "Hid an abusive comment from {{name}}: {{message}}" }
          ]
        }
      ],
      "otherwise": []
    }
  ]
}

test_automation { "automation_id": "<AUTOMATION_ID>", "text": "Get 10k followers fast, see my profile" }

Can one automation hide spam and answer questions?

Yes, and it should be one, because only one automation runs on each comment. Add a Question path, described as someone asking about prices, sizes or delivery, and put a Reply publicly with AI step on it, with your facts in its instructions. The reply goes under the comment in public, in up to 150 characters, while comments on the Spam and Abuse paths are hidden and never answered. A Notify me step on the Abuse path emails you as it happens, at most 20 emails an hour per automation.

Where does automatic hiding stop short?

Some limits come from TikTok's API, and others from how easyCoexistence chooses one automation per comment:

  • Timing: a comment can show for a few minutes before it is hidden, since TikTok reports it within five; TikTok's own filters hold comments for approval instead.
  • Replies: automations act on new top-level comments, not on replies to other comments, and they skip the account's own comments.
  • Order: a keyword comment rule that replies to a comment takes it, so no automation runs; when several automations match, one set on that video goes first, then keyword ones, then the oldest.
  • Unhiding: hide_comment with hide set to false shows a comment again, unless TikTok's moderation or filters keep it hidden.

How do you review what it hid?

In the automation's Runs tab, or with list_automation_runs from a chat, where each run shows the path the model chose and what each step did, for 30 days. Hidden comments stay on the video with the status HIDDEN, and list_social_comments returns them among the video's newest 30, so your AI can go through the day's hidden comments and put a wrongly hidden one back in view.

How to set it up

  1. Save your AI keyIn the Automations tab, click AI keys, add an Anthropic, OpenAI or OpenRouter key and click Test and save.
  2. Start a TikTok automationClick New automation, choose Manual, open the TikTok tab and click Open on Start from scratch. It starts on new comments with a Reply to the comment step.
  3. Add the AI decisionReplace that step with AI picks the path, pick the provider and model, and describe a Spam path and an Abuse path in a sentence each.
  4. Hide on those pathsAdd Hide the comment under Spam and under Abuse, add Notify me under Abuse if you want an email, and leave Otherwise empty.
  5. Test, then switch it onClick Test and write comments as a follower would; nothing is posted or hidden. Then switch it On and click Save.

Common mistakes

  • Keeping a comment rule with no keywords. Rules run before automations, and a comment a rule replies to never reaches the spam check.
  • Running a separate AI reply automation on the same videos. Only one automation runs per comment, so put the spam paths and a reply path in one flow.
  • Describing spam in one word. The model routes by your path descriptions, so name what you see, such as follower sales, links to other apps or fake giveaways.
  • Never checking the first week of runs. Read the Runs tab and show wrongly hidden comments again with hide_comment and hide set to false.

Accounts whose spam a short word list catches: TikTok's own Filter keywords in comments setting holds those comments for your approval, with no AI key.

Doing this with EasyCoexistence

easyCoexistence connects a TikTok account through TikTok's official API for Business and runs automations on new comments: your own AI judges each one against your description, hides spam and abuse, and can answer real questions in public in the same flow. Set it up from Claude, ChatGPT or the dashboard. US$ 9 to US$ 0.75 per connection per month, falling as you add connections, with the first 3 days free.

easyCoexistence is a multichannel API and MCP server that connects AI agents such as Claude and ChatGPT to WhatsApp, Instagram, TikTok, Facebook, Google Business Profile and more. On WhatsApp it uses Coexistence: the business keeps using its number in the WhatsApp Business app while the AI works through Meta's official API.

Connect TikTok to ChatGPT and Claude

Frequently asked questions

Does hiding a TikTok comment delete it?

No. A hidden comment stays on the video with the status HIDDEN and can be shown again. Through the API an account deletes only comments it wrote; other people's comments can be deleted in the TikTok app.

Can it watch one video only?

Yes. Pass the video's item_id from list_social_posts as post_id, or choose One post under Post in the editor, and the automation checks only that video's new comments.

Which AI model should judge the comments?

Any model your Anthropic, OpenAI or OpenRouter key can call, named by its ID. Each decision is a short classification, so a small, fast model is usually enough.

Does it work on TikTok photo posts?

Yes. TikTok's comment webhook reports comments on photo posts as well as on public videos, so the automation checks both.

Keep reading

Connect your first channel in two minutes.

No platform reviews to wait for. Connect WhatsApp, Instagram, TikTok or another channel, then ask your AI to post, reply or report, and watch it work.

  • 3 days free
  • Cancel any time
  • Official APIs only
  • Monitored 24/7

Verified on