Rust Profanity Filter
Async content moderation for Rust services using reqwest and serde.
Quick start in Rust
let client = reqwest::Client::new();
let res = client
.post("https://api.theprofanityapi.com/v1/check")
.bearer_auth(std::env::var("PROFANITY_API_KEY")?)
.json(&serde_json::json!({
"text": text, "context": "chat", "mode": "balanced"
}))
.send()
.await?
.json::<serde_json::Value>()
.await?;
if res["flagged"].as_bool().unwrap_or(false) { /* ... */ } Why context-aware matters
A plain word list flags "this game is sick" or medical text full of
anatomical terms. The Profanity API runs a five-layer pipeline that
scores intent, so "die" in a gaming taunt and "die" in a real
threat are handled differently. Pick a context and the engine
adjusts strictness automatically.
Other integrations
- Node.js
- TypeScript
- Python
- PHP
- Ruby
- Go
- Java
- C# / .NET
- Kotlin
- Swift
- Dart
- Elixir
- Express.js
- Next.js
- NestJS
- Nuxt
- Fastify
- Django
- Flask
- FastAPI
- Laravel
- Symfony
- Ruby on Rails
- Spring Boot
- ASP.NET Core
- Phoenix
- React
- Vue
- SvelteKit
- Angular
- React Native
- Flutter
- WordPress
- Discord Bot
Ready to ship moderation?
Get an API key and 300 free requests a month. No credit card required.
Get started free →