I recently developed an online game where players can create their own usernames, but it's led to some inappropriate submissions. I'm on the lookout for a free or affordable profanity filter API that can help me manage this issue. What are some good options, or does anyone have any experiences to share regarding these APIs?
4 Answers
Check out this API I found: [profanity.dev](https://www.profanity.dev/). I saw a demo of it in a video, and it seems like a solid option!
Just a heads-up, it's a tough problem to tackle. Sometimes a username like ‘cumberto’ might get caught and impact usability negatively. Plus, don’t underestimate users' creativity; if they feel restricted, they'll find ways around it. So while you should filter out obvious stuff, don’t expect a perfect system to work every time.
I see what you mean, but there are definitely boundaries that can still be enforced.
You have a few choices here. A straightforward approach is to maintain a list of naughty words and just flag any usernames containing them. Of course, this leads to the Scunthorpe problem where some innocent usernames can get flagged too. It's not a perfect solution, but it covers a lot of bases for most cases.
Are you aiming for a basic "contains a bad word" filter, or something more nuanced that takes phrases or context into account? Also, how about multilingual support?
Good point! I think a simple one for English should do the trick for now, but I’m open to exploring other options!

I tried inputting some wild names, and it didn't catch them! Just a heads-up!