The CT Scan API integration gives developers programmatic access to CT App Center’s threat intelligence engine…
CT Scan API Integration: Common Use Cases
The CT Scan API gives developers programmatic access to CT App Center’s threat intelligence engine — the same engine that cross-references 40+ global databases to return a Trust Score for any URL, domain or IP address in under 2 seconds.
This guide walks you through everything you need to integrate the CT Scan API into your application, from authentication to production-ready code examples.
Prerequisites
The CT Scan API integration supports three scan types — url, domain and ip.
Before you begin, make sure you have:
- A CT App Center account (Pro or Business plan)
- Your API key from the dashboard under Settings → API Access
- Basic familiarity with REST APIs and HTTP requests
Authentication
All API requests must include your API key in the request header:
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
Never expose your API key in client-side code. Always make API calls from your backend server.
The CT Scan API integration is designed to be simple, fast and production-ready.
Base URL
https://api.ctappcenter.com/v1
Your First API Call
The simplest call is a URL scan. Send a POST request to the /scan endpoint with the target URL:
POST https://api.ctappcenter.com/v1/scan
Request body:
json
{
"target": "https://example.com",
"type": "url"
}
Response:
json
{
"target": "https://example.com",
"type": "url",
"trust_score": 94,
"risk_level": "safe",
"ssl_valid": true,
"domain_age_days": 9125,
"blacklisted": false,
"threats_detected": [],
"scan_duration_ms": 847,
"scanned_at": "2025-03-15T10:23:41Z"
}
Trust Score Interpretation
The Trust Score ranges from 0 to 100:
| Score | Risk Level | Recommended Action |
|---|---|---|
| 80–100 | Safe | Allow |
| 40–79 | Caution | Warn user |
| 0–39 | Dangerous | Block |
Code Examples
JavaScript (Node.js)
javascript
const axios = require('axios');
async function scanURL(target) {
const response = await axios.post(
'https://api.ctappcenter.com/v1/scan',
{ target, type: 'url' },
{
headers: {
'Authorization': `Bearer ${process.env.CT_API_KEY}`,
'Content-Type': 'application/json'
}
}
);
return response.data;
}
scanURL('https://example.com').then(result => {
console.log(`Trust Score: ${result.trust_score}`);
console.log(`Risk Level: ${result.risk_level}`);
});
Python
python
import requests
import os
def scan_url(target):
headers = {
'Authorization': f'Bearer {os.environ["CT_API_KEY"]}',
'Content-Type': 'application/json'
}
payload = {'target': target, 'type': 'url'}
response = requests.post(
'https://api.ctappcenter.com/v1/scan',
json=payload,
headers=headers
)
return response.json()
result = scan_url('https://example.com')
print(f"Trust Score: {result['trust_score']}")
print(f"Risk Level: {result['risk_level']}")
PHP
php
<?php
function scanURL($target) {
$apiKey = getenv('CT_API_KEY');
$payload = json_encode([
'target' => $target,
'type' => 'url'
]);
$ch = curl_init('https://api.ctappcenter.com/v1/scan');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer ' . $apiKey,
'Content-Type: application/json'
]);
$response = curl_exec($ch);
curl_close($ch);
return json_decode($response, true);
}
$result = scanURL('https://example.com');
echo "Trust Score: " . $result['trust_score'];
echo "Risk Level: " . $result['risk_level'];
```
## Available Scan Types
The API supports three scan types:
```
url → Full URL scan including path and parameters
domain → Domain-level scan including WHOIS and DNS
ip → IP address reputation and geolocation check
```
Change the `type` field in your request body accordingly.
## Rate Limits
| Plan | Requests/day | Requests/minute |
|------|-------------|-----------------|
| Free | 10 | 1 |
| Pro | 1,000 | 10 |
| Business | Unlimited | 60 |
Rate limit headers are included in every response:
```
X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 847
X-RateLimit-Reset: 1710500400
```
## Error Handling
The API uses standard HTTP status codes:
```
200 → Success
400 → Invalid request (check your payload)
401 → Invalid or missing API key
422 → Unprocessable target URL
429 → Rate limit exceeded
500 → Server error (retry after 30 seconds)
Always implement retry logic with exponential backoff for 429 and 500 errors.
The API follows REST standards as defined by [RFC 7231](https://tools.ietf.org/html/rfc7231).
Webhooks (Business Plan)
Business plan users can configure webhooks to receive real-time notifications when a scan detects a threat:
{
“event”: “threat_detected”,
“target”: “https://malicious-site.example”,
“trust_score”: 12,
“risk_level”: “dangerous”,
“detected_at”: “2025-03-15T10:23:41Z”
}
Configure your webhook URL in the dashboard under Settings → Webhooks.
## Next Steps
- Read the full [API Reference](/docs) for all available endpoints
- Explore [CT Guard](/apps/ct-guard) for real-time browser protection
- Join the [waitlist for CT Extension](/apps/ct-extension)
- browser-native scanning coming soon
Learn more about CT Scan and its features on the [CT Scan app page] (/apps/ct-scan)
Ready to get started? [Create your free account] and access your API key in minutes.
## Best Practices for Production
When integrating the CT Scan API in a production environment, always cache scan results to avoid unnecessary API calls. We recommend caching results for 24 hours for domains with a Trust Score above 80. For scores below 40, re-scan every 6 hours to catch newly detected threats. Always log API responses for audit purposes, especially if you are using the API for security-critical decisions such as blocking transactions or restricting access.