A Node.js web app for checking if usernames contain profanity. Perfect for user registration flows and community platforms.
This tutorial requires an APIVerve API key. Sign up free - no credit card required.
- Check usernames for inappropriate content
- Real-time validation feedback
- Visual safe/profane indicators
- Example usernames to test
- Clean, modern UI
- Built with Express.js
-
Clone this repository
git clone https://github.com/apiverve/username-checker-node-tutorial.git cd username-checker-node-tutorial -
Install dependencies
npm install
-
Add your API key
Set environment variable or edit
server.js:export API_KEY=your-api-key-here -
Start the server
npm start
-
Open in browser
Visit http://localhost:3000 and check usernames!
username-checker-node-tutorial/
├── server.js # Express server & API endpoint
├── public/
│ └── index.html # Frontend UI
├── package.json # Dependencies
├── screenshot.jpg # Preview image
├── LICENSE # MIT license
├── .gitignore # Git ignore rules
└── README.md # This file
- User enters a username
- Frontend sends GET request to
/api/check - Server calls the Username Profanity API
- API analyzes the username
- Frontend displays safe/profane result
const response = await fetch(`https://api.apiverve.com/v1/usernameprofanity?username=${username}`, {
method: 'GET',
headers: {
'x-api-key': API_KEY
}
});Endpoint: GET https://api.apiverve.com/v1/usernameprofanity
Query Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
username |
string | Yes | The username to check |
Example Response:
{
"status": "ok",
"error": null,
"data": {
"username": "cooluser123",
"isProfane": false
}
}- User Registration - Validate usernames during signup
- Gaming Platforms - Enforce appropriate gamertags
- Social Media - Screen display names
- Forums - Moderate community usernames
- Chat Apps - Filter inappropriate handles
- E-commerce - Validate seller/buyer names
- Add batch checking for multiple usernames
- Suggest alternative usernames when profane
- Add username availability checking
- Integrate with signup forms
- Store checked usernames in database
- Add admin dashboard for moderation
Explore more APIs at APIVerve:
- Profanity Filter - Filter profanity from text
- Email Validator - Validate email addresses
- Username Generator - Generate usernames
This tutorial works with the free APIVerve plan. Some APIs may have:
- Locked fields: Premium response fields return
nullon free plans - Ignored parameters: Some optional parameters require a paid plan
The API response includes a premium object when limitations apply. Upgrade anytime to unlock all features.
MIT - see LICENSE
- Get API Key - Sign up free
- APIVerve Marketplace - Browse 300+ APIs
- Username Profanity API - API details
