Fidro + Python Integration
Add fraud detection to your Python application. Follow this guide to add email validation and IP intelligence in minutes.
Overview
To integrate Fidro with Python, use the requests library to send a POST request to the Fidro API with the user's email and IP address. Fidro combines email validation, disposable email detection, IP geolocation, and fraud scoring into a single API call that returns a JSON response. No SDK is needed — Python's requests library is all you need to get started.
Fidro is a fraud detection API that combines email validation, IP intelligence, geolocation analysis, and Stripe chargeback prevention in a single API call. It returns a risk score with a clear recommendation — allow, review, or block — so you can stop fraud without building your own scoring logic.
1. Install Dependencies
pip install requests
You will also need a Fidro API key. Sign up for free to get one.
2. Email Validation
Send a POST request to Fidro's /v1/validate endpoint with the user's email address and optional IP. Fidro validates the email, checks for disposable domains, analyzes the IP for VPN/proxy/Tor usage, and returns a risk score with a clear recommendation — allow, review, or block.
import os
import requests
FIDRO_API_KEY = os.environ["FIDRO_API_KEY"]
def validate_email(email: str, ip: str) -> dict:
response = requests.post(
"https://api.fidro.io/v1/validate",
headers={
"Authorization": f"Bearer {FIDRO_API_KEY}",
"Content-Type": "application/json",
},
json={"email": email, "ip": ip},
)
response.raise_for_status()
result = response.json()
print(f"Risk score: {result['data']['risk_score']}")
print(f"Recommendation: {result['data']['recommendation']}")
return result
# Usage
result = validate_email("test@example.com", "8.8.8.8")
print(result)
3. IP Lookup
Send a POST request to Fidro's /v1/ip-lookup endpoint with an IP address. Fidro returns geolocation data (country, city, ISP), VPN and proxy detection, Tor exit node identification, and threat intelligence — all in a single API call.
import os
import requests
FIDRO_API_KEY = os.environ["FIDRO_API_KEY"]
def lookup_ip(ip: str) -> dict:
response = requests.post(
"https://api.fidro.io/v1/ip-lookup",
headers={
"Authorization": f"Bearer {FIDRO_API_KEY}",
"Content-Type": "application/json",
},
json={"ip": ip},
)
response.raise_for_status()
result = response.json()
print(f"Country: {result['data']['country']}")
print(f"Is VPN: {result['data']['is_vpn']}")
return result
# Usage
result = lookup_ip("8.8.8.8")
print(result)
Next steps
Explore the full API reference, try the free email checker, or see how Fidro compares to other solutions.
Frequently Asked Questions
How do I add fraud detection to Python?
Does Fidro have a Python SDK?
Is Fidro free to use with Python?
Start catching bad signups in the next 5 minutes
Create your account, grab your API key, and send your first request. Free plan with 200 validations/month. No credit card. Cancel anytime.
Get Started Free