Everything you need to integrate Analytico into your application.
The Analytico API is a RESTful interface for detecting click fraud, invalid traffic, and bot activity. All requests use JSON and require an API key.
Base URL:
https://analytico.space/apiAll API responses are JSON. Successful responses return HTTP 200. Errors return 4xx with an error field.
Every request requires an API key passed either in the JSON body or as the X-API-Key header.
# Via header (recommended) curl -H "X-API-Key: as_YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{"ip":"1.2.3.4"}' \ https://analytico.space/api/check.php # Via body curl -X POST https://analytico.space/api/check.php \ -H "Content-Type: application/json" \ -d '{"api_key":"as_YOUR_KEY","ip":"1.2.3.4"}'
Get your API key from Dashboard → API Keys.
Three steps to protect your traffic:
POST /api/check.php with the visitor's IP on every request.verdict field in the response.curl -X POST https://analytico.space/api/check.php \ -H "Content-Type: application/json" \ -d '{ "api_key": "as_YOUR_KEY", "ip": "1.2.3.4", "user_agent": "Mozilla/5.0 ...", "url": "https://yoursite.com/landing" }'
Response:
{
"verdict": "clean",
"fraud_score": 12,
"quality_score": 88,
"is_bot": false,
"is_vpn": false,
"country_code": "US",
"ip_type": "residential"
}
Analyze a single IP address and return a fraud verdict. This is the primary endpoint.
https://analytico.space/api/check.php| Field | Type | Required | Description |
|---|---|---|---|
api_key | string | Yes* | Your API key (or use X-API-Key header) |
ip | string | Yes | IPv4 or IPv6 address to check |
user_agent | string | No | Browser User-Agent string |
url | string | No | Landing page URL |
referrer | string | No | HTTP referrer |
clickid | string | No | Your click ID for postback tracking |
subid | string | No | Sub-affiliate ID |
| Field | Type | Description |
|---|---|---|
verdict | string | clean, suspicious, or blocked |
fraud_score | integer | 0–100. Higher = more fraudulent. |
quality_score | integer | 0–100. Higher = better quality traffic. |
is_bot | boolean | True if automated/bot traffic detected. |
is_vpn | boolean | True if VPN or proxy detected. |
is_tor | boolean | True if Tor exit node. |
is_datacenter | boolean | True if datacenter/hosting IP. |
country_code | string | ISO 3166-1 alpha-2 country code. |
ip_type | string | residential / mobile / datacenter / vpn / proxy / tor |
threat_types | array | List of detected threat signals. |
Check up to 100 IP addresses in a single request. Ideal for log analysis, bulk verification, or pre-screening traffic lists.
https://analytico.space/api/batch.phpcurl -X POST https://analytico.space/api/batch.php \ -H "X-API-Key: as_YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{ "ips": [ "1.2.3.4", "185.220.101.42", "8.8.8.8" ] }'
{
"results": [
{
"ip": "1.2.3.4",
"verdict": "clean",
"fraud_score": 5,
"quality_score": 95,
"is_bot": false
},
{
"ip": "185.220.101.42",
"verdict": "blocked",
"fraud_score": 97,
"quality_score": 3,
"is_bot": true
}
],
"total": 3,
"blocked": 1,
"clean": 2,
"processing_ms": 142
}
Rate limit: 100 IPs per request, up to 10 batch requests per minute on Pro. Enterprise has no batch limit.
List all active API keys for your account. Useful for programmatic key management and rotation.
https://analytico.space/api/keys.phpcurl https://analytico.space/api/keys.php \
-H "X-API-Key: as_YOUR_KEY"
{
"keys": [
{
"id": 1,
"name": "Production key",
"prefix": "as_prod_****",
"created_at": "2024-01-15T10:30:00Z",
"last_used_at": "2024-03-01T14:22:11Z",
"is_active": true
}
],
"total": 1
}
| Verdict | Fraud Score | Meaning | Recommended action |
|---|---|---|---|
| clean | 0–29 | Legitimate human traffic | Allow through |
| suspicious | 30–64 | Uncertain — may be bot, VPN, or low-quality traffic | Allow but flag, or show CAPTCHA |
| blocked | 65–100 | High-confidence fraud, bot, or invalid traffic | Block or redirect to /404 |
| HTTP Code | Error | Description |
|---|---|---|
400 | missing_ip | The ip field is required. |
400 | invalid_ip | The IP address format is invalid. |
401 | unauthorized | API key missing, invalid, or inactive. |
429 | rate_limited | Monthly check limit reached. Upgrade your plan. |
500 | internal_error | Server error. Retry after a few seconds. |
Drop-in PHP class — no Composer required.
class AnalyticoClient { private string $apiKey; private string $baseUrl = 'https://analytico.space/api'; public function __construct(string $apiKey) { $this->apiKey = $apiKey; } public function check(string $ip, array $opts = []): array { $payload = array_merge(['ip' => $ip], $opts); $ch = curl_init($this->baseUrl . '/check.php'); curl_setopt_array($ch, [ CURLOPT_POST => true, CURLOPT_POSTFIELDS => json_encode($payload), CURLOPT_RETURNTRANSFER => true, CURLOPT_HTTPHEADER => [ 'Content-Type: application/json', 'X-API-Key: ' . $this->apiKey, ], CURLOPT_TIMEOUT => 5, ]); $resp = json_decode(curl_exec($ch), true); curl_close($ch); return $resp ?? []; } public function batch(array $ips): array { $ch = curl_init($this->baseUrl . '/batch.php'); curl_setopt_array($ch, [ CURLOPT_POST => true, CURLOPT_POSTFIELDS => json_encode(['ips' => $ips]), CURLOPT_RETURNTRANSFER => true, CURLOPT_HTTPHEADER => [ 'Content-Type: application/json', 'X-API-Key: ' . $this->apiKey, ], CURLOPT_TIMEOUT => 15, ]); $resp = json_decode(curl_exec($ch), true); curl_close($ch); return $resp ?? []; } } # Usage $client = new AnalyticoClient('as_YOUR_KEY'); $result = $client->check($_SERVER['REMOTE_ADDR']); if ($result['verdict'] === 'blocked') { http_response_code(403); exit; }
Pure Python — uses only the standard library urllib. No pip install needed.
import urllib.request, json class AnalyticoClient: def __init__(self, api_key: str): self.api_key = api_key self.base_url = 'https://analytico.space/api' def _post(self, endpoint: str, payload: dict) -> dict: data = json.dumps(payload).encode('utf-8') req = urllib.request.Request( self.base_url + endpoint, data=data, headers={ 'Content-Type': 'application/json', 'X-API-Key': self.api_key, } ) with urllib.request.urlopen(req, timeout=5) as r: return json.loads(r.read()) def check(self, ip: str, **kwargs) -> dict: """Check a single IP address.""" return self._post('/check.php', {'ip': ip, **kwargs}) def batch(self, ips: list) -> dict: """Check up to 100 IPs in one request.""" return self._post('/batch.php', {'ips': ips}) # Usage client = AnalyticoClient('as_YOUR_KEY') # Single check result = client.check('1.2.3.4', user_agent='Mozilla/5.0') print(result['verdict'], result['fraud_score']) # Batch check results = client.batch(['1.2.3.4', '185.220.101.42', '8.8.8.8']) for r in results['results']: if r['verdict'] == 'blocked': print(f"Block: {r['ip']}")
Works with Node.js 18+ using the built-in fetch API. Zero dependencies.
class AnalyticoClient { constructor(apiKey) { this.apiKey = apiKey; this.baseUrl = 'https://analytico.space/api'; } async #post(endpoint, body) { const res = await fetch(this.baseUrl + endpoint, { method: 'POST', headers: { 'Content-Type': 'application/json', 'X-API-Key': this.apiKey, }, body: JSON.stringify(body), signal: AbortSignal.timeout(5000), }); if (!res.ok) throw new Error(`Analytico API error: ${res.status}`); return res.json(); } async check(ip, opts = {}) { /** Check a single IP address. */ return this.#post('/check.php', { ip, ...opts }); } async batch(ips) { /** Check up to 100 IPs in one call. */ return this.#post('/batch.php', { ips }); } } // Usage (ESM / CommonJS both work) const client = new AnalyticoClient('as_YOUR_KEY'); // Single IP const result = await client.check('1.2.3.4'); if (result.verdict === 'blocked') { res.status(403).send('Access denied'); } // Batch const { results } = await client.batch(['1.2.3.4', '5.6.7.8']); results.forEach(r => console.log(r.ip, r.verdict));
Postbacks let Analytico fire tracking URLs whenever a traffic event occurs. Ideal for affiliate networks, DSPs, and ad tracking platforms.
| Macro | Description | Example |
|---|---|---|
{ip} | Visitor IP address | 185.220.101.42 |
{verdict} | clean / suspicious / blocked | blocked |
{fraud_score} | Fraud score 0–100 | 92 |
{quality_score} | Quality score 0–100 | 8 |
{country_code} | ISO country code | NL |
{clickid} | Your click ID (from API request) | abc123 |
{subid} | Sub-affiliate ID | pub456 |
{payout} | Campaign CPC payout | 0.450 |
{request_id} | Unique check ID | req_4f8a2c |
{timestamp} | Unix timestamp | 1735689600 |
{is_vpn} | 1 if VPN, 0 otherwise | 1 |
{is_bot} | 1 if bot, 0 otherwise | 0 |
# Affiliate network https://network.com/postback?click={clickid}&status={verdict}&score={fraud_score} # DSP pixel https://track.dsp.com/conv?cid={clickid}&sub={subid}&payout={payout}&q={quality_score} # Internal analytics https://analytics.yoursite.com/event?ip={ip}&event={verdict}&ts={timestamp}