Get SpiderFuzzer Statistics
GET
/api/v1/fuzziq/canonical/statsOverview
Get statistics about your SpiderFuzzer canonical database, including:
- Whether SpiderFuzzer is enabled for your account
- Total number of canonical records
- Schema information
- Activity timestamps
Examples
- cURL
- Python
- JavaScript
curl -X GET https://spideriq.ai/api/v1/fuzziq/canonical/stats \
-H "Authorization: Bearer <client_id>:<api_key>:<api_secret>"
import requests
headers = {"Authorization": "Bearer <your_token>"}
response = requests.get(
"https://spideriq.ai/api/v1/fuzziq/canonical/stats",
headers=headers
)
stats = response.json()
if stats["enabled"]:
print(f"SpiderFuzzer is active!")
print(f"Total records: {stats['record_count']:,}")
print(f"Schema: {stats['schema_name']}")
print(f"Created: {stats['created_at']}")
else:
print("SpiderFuzzer is not configured")
const response = await fetch(
'https://spideriq.ai/api/v1/fuzziq/canonical/stats',
{
headers: {
'Authorization': 'Bearer <your_token>'
}
}
);
const stats = await response.json();
console.log(`Total records: ${stats.record_count}`);
Response
SpiderFuzzer Enabled
{
"success": true,
"enabled": true,
"schema_exists": true,
"schema_name": "client_abc123xyz",
"record_count": 15420,
"is_active": true,
"created_at": "2025-01-05T10:30:00Z",
"updated_at": "2025-01-06T14:22:00Z"
}
SpiderFuzzer Not Configured
{
"success": true,
"enabled": false,
"schema_exists": false,
"record_count": 0
}
Response Fields
| Field | Type | Description |
|---|---|---|
success | boolean | Whether the request succeeded |
enabled | boolean | Whether SpiderFuzzer is enabled for this client |
schema_exists | boolean | Whether the client's schema exists in SpiderFuzzer database |
schema_name | string | PostgreSQL schema name (e.g., client_abc123) |
record_count | integer | Total canonical records in the database |
is_active | boolean | Whether the schema is currently active |
created_at | string | ISO 8601 timestamp of schema creation |
updated_at | string | ISO 8601 timestamp of last update |
Use Cases
1. Dashboard Integration
Display FuzzIQ stats in your application dashboard:
import requests
def get_dedup_summary():
stats = requests.get(url, headers=headers).json()
return {
"status": "active" if stats["enabled"] else "disabled",
"total_records": f"{stats['record_count']:,}",
"last_updated": stats.get("updated_at", "N/A")
}
# Example output:
# {
# "status": "active",
# "total_records": "15,420",
# "last_updated": "2025-01-06T14:22:00Z"
# }
2. Pre-flight Check Before Campaigns
Verify SpiderFuzzer is ready before starting a campaign:
def start_campaign(campaign_config):
# Check SpiderFuzzer status first
stats = requests.get(f"{base_url}/fuzziq/canonical/stats", headers=headers).json()
if not stats["enabled"]:
print("Warning: SpiderFuzzer is not enabled. Duplicates will not be filtered.")
if stats["record_count"] == 0:
print("Note: Canonical database is empty. Consider importing existing data first.")
# Proceed with campaign...
return submit_campaign(campaign_config)
3. Monitor Database Growth
Track how many records are being added over time:
import time
def monitor_growth(interval_minutes=60):
previous_count = None
while True:
stats = requests.get(url, headers=headers).json()
current_count = stats["record_count"]
if previous_count is not None:
added = current_count - previous_count
print(f"[{time.strftime('%H:%M')}] Total: {current_count:,} (+{added})")
previous_count = current_count
time.sleep(interval_minutes * 60)
# Output:
# [10:00] Total: 15,420 (+0)
# [11:00] Total: 15,847 (+427)
# [12:00] Total: 16,203 (+356)
Data Isolation
Each client gets a completely isolated PostgreSQL schema:
┌─────────────────────────────────────────┐
│ SpiderFuzzer Database │
├─────────────────────────────────────────┤
│ Schema: client_abc123 │
│ ├── canonical_records (15,420 rows) │
│ └── indexes... │
├─────────────────────────────────────────┤
│ Schema: client_def456 │
│ ├── canonical_records (8,750 rows) │
│ └── indexes... │
├─────────────────────────────────────────┤
│ Schema: client_ghi789 │
│ ├── canonical_records (42,100 rows) │
│ └── indexes... │
└─────────────────────────────────────────┘
note
Your data is never mixed with other clients. Each schema has its own tables, indexes, and data.