Profile validation microservice called profile-checker that checks whether usernames exist on social media platforms. The service validates profiles by performing HTTP requests to platform-specific endpoints and confirms existence through response validation.
- Python 3.9 or higher
- Create Python virtual environment.
python -m venv .venv - Activate virtual environment.
source .venv/bin/activate - Install dependencies.
pip install -r requirements.txt - Create a
.envfile withLOG_LEVELandLOG_FILEas needed. - Start server.
fastapi dev main.py
config.pyinitializes logging and reads environment variables..envsupports:LOG_LEVEL— log verbosity (DEBUG,INFO,WARNING,ERROR,CRITICAL)LOG_FILE— path to the log output file
- Site verification templates are stored in
sites.yaml.
- GET
/scan/{username}- Validates whether the given username exists on supported platforms.
- Returns
200 OKwith results containing found profiles. - Performs HEAD requests to platform validation endpoints and follows up with GET requests to confirm profile existence.
[
{
"title": "X",
"profile_uri": "https://x.com/osint-services",
"validation_uri": "https://api.x.com/i/users/username_available.json?username=osint-services",
"is_valid_profile": true
}
]- Profile validation checks page responses and validation endpoints to confirm actual profile existence and reduce false positives.
- The service currently supports X (Twitter) profile validation.
- Logging is configured in
config.pyand writes to both console and the file specified byLOG_FILE. - Supported site templates are defined in
sites.yaml, making it easy to add or update platform endpoints without changing application logic. LOG_LEVELandLOG_FILEcan be configured via.env.- The project root already includes
__init__.py, so the package can be imported if needed, but script execution does not require additional__init__.pyfiles. - CORS is enabled for localhost:3000 frontend connections.