Welcome to the ProtectCord API. This API provides IP address intelligence, user lookups, and security information.
All requests require an API key passed as a query parameter: ?key=YOUR_API_KEY
Rate limits are enforced per API key and vary based on your subscription. Rate limit headers are included in responses.
Get comprehensive system health status including D1 database, Workers performance, IPAPI connectivity, and cache performance.
overall_status
- Overall system health: "healthy", "degraded", or "unhealthy"response_time_ms
- Total health check execution timeuptime_seconds
- Worker uptime since last restartchecks
- Individual component health statusGET https://api.protectcord.com/health
{ "overall_status": "healthy", "timestamp": "2024-01-15T10:30:00Z", "response_time_ms": 145, "version": "1.0.0", "environment": "production", "checks": { "workers": { "status": "healthy", "response_time_ms": 12, "message": "Workers operating normally" }, "database": { "status": "healthy", "response_time_ms": 45, "message": "Database operating normally", "details": { "tables_verified": 7 } }, "ipapi": { "status": "healthy", "response_time_ms": 234, "message": "IPAPI operating normally" }, "cache": { "status": "healthy", "response_time_ms": 8, "message": "Cache operating normally", "details": { "total_entries": 1250, "recent_entries": 45, "freshness_percentage": 85 } } }, "uptime_seconds": 3600 }
Generate a new API key with basic permissions (Admin only). Supports custom name and rate limiting via query parameters.
key
- Your admin API key (required)name
- Custom name for the key (optional)discorduserid
- Discord user ID to associate with the key (optional)rate_limit
- Custom rate limit per minute (optional, default: 32)api_key
- The new API key (save immediately!)rate_limit_per_minute
- Rate limit per minutediscord_user_id
- Associated Discord user ID (if provided)created_by
- Admin who created the keyGET https://api.protectcord.com/generate-key?key=ADMIN_KEY&name=EXAMPLE&discorduserid=123456789012345678&rate_limit=32
{ "success": true, "api_key": "abc123def456ghi789jkl012mno345pqr678stu901vwx234yz567890abcdef12", "name": "EXAMPLE", "rate_limit_per_minute": 32, "is_admin": false, "discord_user_id": "123456789012345678", "created_at": "2024-01-15T10:30:00Z", "created_by": "Admin", "message": "API key generated successfully. Please save this key as it won't be shown again." }
โ ๏ธ Security: Admin access required. Save your API key immediately - it cannot be retrieved later!
Get comprehensive information about an IP address.
ip_address
- IPv4 or IPv6 address to checkkey
- Your API key (required)GET https://api.protectcord.com/checkip/1.1.1.1?key=YourKey
{ "ip": "1.1.1.1", "is_bogon": false, "is_mobile": false, "is_satellite": false, "is_crawler": false, "is_datacenter": true, "is_tor": false, "is_proxy": false, "is_vpn": false, "is_abuser": false, "is_whitelisted": false, "is_blacklisted": false, "company": { "name": "Cloudflare Inc", "risk_score": "0.0000 (Very Low)", "domain": "cloudflare.com", "type": "hosting", "network": "1.1.1.0/24" }, "location": { "country": "Australia", "country_code": "AU", "city": "Sydney", "latitude": -33.8688, "longitude": 151.2093 }, "checked_by": "ProtectCord", "checked_at": "2024-01-15T10:30:00Z", "response_time_ms": 245 }
Create a new API key (Admin only).
{ "name": "My Application", "rate_limit_per_minute": 100, "is_admin": false }
{ "id": 123, "key": "generated_api_key_here", "name": "My Application", "rate_limit_per_minute": 100, "is_admin": false, "created_at": "2024-01-15T10:30:00Z" }
List all API keys (Admin only).
Delete an API key (Admin only).
Get usage statistics (Admin only).
Look up information about a Discord user.
user_id
- Discord user IDkey
- Your API key (required)GET https://api.protectcord.com/lookup/discord/123456789012345678?key=YourKey
Look up information about a Minecraft player.
username
- Minecraft usernamekey
- Your API key (required)GET https://api.protectcord.com/lookup/minecraft/Notch?key=YourKey
Look up information about a Minecraft server.
server_ip
- Minecraft server IP or domainkey
- Your API key (required)GET https://api.protectcord.com/lookup/minecraft-server/mc.hypixel.net?key=YourKey
Look up information about a FiveM player.
identifier
- FiveM player identifierkey
- Your API key (required)GET https://api.protectcord.com/lookup/fivem/steam:110000112345678?key=YourKey
Add an IP address or CIDR subnet to the whitelist (Admin only). Supports both IPv4 and IPv6.
{ "ip": "1.2.3.4", "cidr": "1.2.3.0/24", "reason": "Trusted partner network", "expires_at": "2024-12-31T23:59:59Z" }
Note: You can specify either a single IP or a CIDR range. For CIDR, the cidr
field will be used for matching.
1.2.3.4
192.168.1.0/24
2001:db8::1
2001:db8::/32
Add an IP address or CIDR subnet to the blacklist (Admin only). Supports both IPv4 and IPv6.
{ "ip": "1.2.3.4", "cidr": "1.2.3.0/24", "reason": "Malicious activity detected", "risk_level": "HIGH", "expires_at": "2024-12-31T23:59:59Z" }
Note: You can specify either a single IP or a CIDR range. For CIDR, the cidr
field will be used for matching.
Remove an IP address from the whitelist (Admin only).
Remove an IP address from the blacklist (Admin only).
Custom IP reputation overrides allow you to manually set reputation data for specific IP addresses, CIDR subnets, or entire ASNs, overriding external API results.
Target Format: Use IP (8.8.8.8
), CIDR (192.168.0.0/24
), or ASN (asn:15169
)
List all IP reputation overrides (Admin only).
key
- Your admin API key (required)limit
- Number of results to return (optional, default: 100)offset
- Offset for pagination (optional, default: 0)GET https://api.protectcord.com/admin/ip-reputation?key=ADMIN_KEY&limit=50
{ "success": true, "total": 25, "results": [ { "id": 1, "ip_address": "192.168.1.100", "is_vpn": true, "is_proxy": false, "is_tor": false, "is_datacenter": true, "is_abuser": false, "risk_level": "MEDIUM", "custom_notes": "Corporate VPN endpoint", "added_by": "admin", "created_at": "2024-01-15T10:30:00Z", "updated_at": "2024-01-15T10:30:00Z", "is_active": true } ] }
Get reputation override for a specific IP address (Admin only).
ip
- IP address to checkkey
- Your admin API key (required)GET https://api.protectcord.com/admin/ip-reputation/192.168.1.100?key=ADMIN_KEY
{ "success": true, "ip_reputation": { "id": 1, "ip_address": "192.168.1.100", "is_vpn": true, "is_proxy": false, "is_tor": false, "is_datacenter": true, "is_abuser": false, "risk_level": "MEDIUM", "custom_notes": "Corporate VPN endpoint", "added_by": "admin", "created_at": "2024-01-15T10:30:00Z", "updated_at": "2024-01-15T10:30:00Z", "is_active": true } }
Set or update reputation override for an IP address (Admin only).
ip
- IP address to set reputation forkey
- Your admin API key (required){ "is_vpn": true, "is_proxy": false, "is_tor": false, "is_datacenter": true, "is_abuser": false, "risk_level": "MEDIUM", "custom_notes": "Corporate VPN endpoint identified manually" }
UNKNOWN
- Risk level not determinedLOW
- Low risk, generally safeMEDIUM
- Medium risk, requires monitoringHIGH
- High risk, likely maliciousCRITICAL
- Critical risk, immediate action requiredPOST https://api.protectcord.com/admin/ip-reputation/192.168.1.100?key=ADMIN_KEY
{ "success": true, "message": "IP reputation updated successfully", "ip_reputation": { "id": 1, "ip_address": "192.168.1.100", "is_vpn": true, "is_proxy": false, "is_tor": false, "is_datacenter": true, "is_abuser": false, "risk_level": "MEDIUM", "custom_notes": "Corporate VPN endpoint identified manually", "added_by": "admin", "created_at": "2024-01-15T10:30:00Z", "updated_at": "2024-01-15T12:45:00Z", "is_active": true } }
Remove reputation override for an IP address (Admin only).
ip
- IP address to remove reputation override forkey
- Your admin API key (required)DELETE https://api.protectcord.com/admin/ip-reputation/192.168.1.100?key=ADMIN_KEY
{ "success": true, "message": "IP reputation override removed successfully" }
Manage Autonomous System Numbers (ASNs) for blocking or whitelisting entire network ranges.
Add an ASN to the whitelist (Admin only). All IPs from this ASN will be automatically whitelisted.
key
- Your admin API key (required){ "asn": 15169, "reason": "Google ASN - trusted services", "added_by": "Admin", "expires_at": "2024-12-31T23:59:59Z" }
POST https://api.protectcord.com/admin/asn-whitelist?key=ADMIN_KEY
{ "message": "ASN added to whitelist successfully", "asn": 15169, "reason": "Google ASN - trusted services" }
Add an ASN to the blacklist (Admin only). All IPs from this ASN will be automatically blocked.
key
- Your admin API key (required){ "asn": 12345, "reason": "Malicious VPN provider", "risk_level": "HIGH", "added_by": "Admin", "expires_at": "2024-12-31T23:59:59Z" }
POST https://api.protectcord.com/admin/asn-blacklist?key=ADMIN_KEY
{ "message": "ASN added to blacklist successfully", "asn": 12345, "reason": "Malicious VPN provider", "risk_level": "HIGH" }
Remove an ASN from the whitelist (Admin only).
asn
- ASN number to removekey
- Your admin API key (required)DELETE https://api.protectcord.com/admin/asn-whitelist/15169?key=ADMIN_KEY
{ "message": "ASN removed from whitelist successfully", "asn": 15169 }
Remove an ASN from the blacklist (Admin only).
asn
- ASN number to removekey
- Your admin API key (required)DELETE https://api.protectcord.com/admin/asn-blacklist/12345?key=ADMIN_KEY
{ "message": "ASN removed from blacklist successfully", "asn": 12345 }
Recent updates include:
Add an IP address to the blacklist (Admin only).
{ "ip": "1.2.3.4", "cidr": "1.2.3.0/24", "reason": "Malicious activity detected", "risk_level": "HIGH", "expires_at": "2024-12-31T23:59:59Z" }
Remove an IP address from the whitelist (Admin only).
Remove an IP address from the blacklist (Admin only).
The API returns standard HTTP status codes and JSON error messages:
400
- Bad Request (invalid parameters)401
- Unauthorized (invalid API key)403
- Forbidden (admin access required)429
- Too Many Requests (rate limit exceeded)500
- Internal Server ErrorWe provide a limited demo environment for testing the API functionality:
Test the API endpoints with live examples. The demo uses a rate-limited trial key (1 request/minute).
Click the button above to test the API...
Note: For IP lookups and other protected endpoints, contact an administrator to generate an API key.
For support, API access, or questions about ProtectCord, please join our Discord server ๐