TikTok ad text allows no links, @ or hashtags: a Python lint

TikTok's in-feed spec says ad text shows in white, uncustomizable, with no clickable links, @ symbols, or hashtags. A short check catches them before upload.

5 min readSume
All posts

TikTok's in-feed video ad specification says ad text is displayed in white with a uniform font that cannot be customized, and that it does not support any clickable links, symbols (@), or hashtags (TikTok Ads Help, read 2026-10-05). A holiday ad set has dozens of copy variants, and one stray hashtag from a social calendar is easy to miss. A short script that lints every ad text before upload catches all three.

What the lint checks

The check has three rules, each from the page: no link, no @, no hashtag. It does not know the character budget for your ad format, which differs by placement; check that separately.

Ad text lint rules from TikTok's in-feed spec (read 2026-10-05)
RulePatternExample that failsExample that passes
No linkshttp(s):// or www.Shop www.example.comShop the set in the app
No @ symbol@Tag @brandTag the brand in comments
No hashtags##BFCM dealsBlack Friday deals

The script

import re

def lint(text):
    problems = []
    if re.search(r"https?://|www\.", text, re.I):
        problems.append("link")
    if "@" in text:
        problems.append("@ symbol")
    if "#" in text:
        problems.append("hashtag")
    return problems

ads = ["Black Friday starts now. Shop the set!", "Tag @brand #BFCM www.example.com"]
for text in ads:
    print(text, "->", lint(text) or "ok")

Where the words go instead

Move anything that does not fit the ad text into the video. A burned caption can carry the offer, the deadline, and a store name, and it is not subject to the ad text rule. On Sume, POST /v1/video-captions burns authored text with cues (each text, start, end) at $0.20 per job, and a clip with no speech needs cues, otherwise the job fails with caption_no_speech.

Run the lint on the whole deck, not per ad. Export the copy from your planning sheet to a list, loop over it, and print only the failures, so a 60-row deck gives you a short list to fix.

Here is the table logic in words: each rule is one test on the text, and a text can fail more than one. The second sample line above fails all three, and the function returns the list of reasons, so the fix is obvious from the printout.

Treat the result as a gate, not a suggestion: a CI step or a pre-upload script that exits non-zero on any flag keeps a tired Friday-evening edit from shipping a hashtag. Add your own rules next to the three from the page, such as banned claims your legal team has listed, and keep them in the same function.

A pound sign in a price line is the common false positive. If your market writes prices that way, allow it explicitly in the check and keep the hashtag rule for a sign followed by a letter.

Keep the link on the button the platform provides. The page says that ad text does not support clickable links, so the destination belongs to the ad's call-to-action field, not the copy.

Sources

Related posts

More in Use cases

All Use cases posts

Written by Sume