📖 Developer Reference

API Documentation v1 / v3

Integrate real-time fraud detection, VPN/Proxy blocking, and ASN intelligence with our low-latency JSON REST API.

🌐 API Endpoints

GET / POST https://www.ipcheck.bitspay.top/api/v1/check.php
Primary REST endpoint returning comprehensive JSON intelligence payload with sub-5ms caching.
GET https://www.ipcheck.bitspay.top/api/v3/check.php
Proxycheck.io v3 compatible drop-in replacement route.

🔑 Authentication

Every request should authenticate using your active API Key. We support 3 standard authentication methods:

Method Syntax / Example Description
Query Parameter ?key=YOUR_API_KEY Passed directly in the URL query string.
HTTP Header X-API-KEY: YOUR_API_KEY Custom authentication header (Recommended).
Bearer Authorization Authorization: Bearer YOUR_API_KEY Standard OAuth/Bearer header.

📥 Request Parameters

Parameter Type Default Description
ip string Client IP The IPv4 or IPv6 address to analyze. If omitted, automatically checks the caller's IP.
key string None Your unique API Key (from developer dashboard).
force boolean 0 Set to 1 to bypass 3-day DB cache and force real-time query.
format string default Set to proxycheck for exact proxycheck.io root schema format.

📤 Standard JSON Response Schema

{
  "status": "ok",
  "query": "8.8.8.8",
  "cached": true,                     // true if served from local DB cache
  "cache_age_seconds": 1240,          // Cache age in seconds
  "execution_time_ms": 2.15,          // Latency in ms (<5ms on cache)
  "data": {
    "ip": "8.8.8.8",
    "proxy": "no",                    // "yes" or "no"
    "type": "Residential / Business", // VPN, TOR, Residential, Hosting, Wireless
    "risk_score": 0,                  // 0 - 100 risk score
    "risk_level": "LOW",              // LOW, MEDIUM, HIGH, CRITICAL
    "flags": {
      "is_proxy": false,
      "is_vpn": false,
      "is_tor": false,
      "is_crawler": false,
      "is_hosting": true
    },
    "location": {
      "country": "United States",
      "country_code": "US",
      "region": "California",
      "city": "Mountain View",
      "postal": "94043",
      "latitude": 37.422,
      "longitude": -122.084,
      "timezone": "America/Los_Angeles"
    },
    "network": {
      "asn": "AS15169",
      "provider": "Google LLC",
      "organization": "Google LLC"
    },
    "currency": {
      "code": "USD",
      "name": "US Dollar"
    },
    "last_updated": "2026-10-06 11:30:00"
  }
}

⚡ HTTP Response Headers

Every API response returns real-time diagnostic and quota headers:

Header Example Description
X-Response-Time-Ms 1.85 Exact server processing latency in milliseconds.
X-Engine-Source cache Source engine used: cache, proxycheck, or ip-api.
X-RateLimit-Limit 1000 Daily query limit allocated to your active tier.
X-RateLimit-Remaining 942 Remaining requests available for today.

⚙️ Caching & Failover Pipeline Architecture

  1. 1. Local Database Cache Check (Sub-5ms): The query checks ip_cache for the given IP. If a record exists and was updated within the last 3 days, it returns immediately from cache.
  2. 2. Primary Engine (Proxycheck.io v3): If not cached or older than 3 days, it queries Proxycheck.io v3 API with heuristic risk scoring.
  3. 3. Automatic Fallback (IP-API): If Proxycheck.io fails, times out, or reaches external quotas, the query automatically fails over to IP-API, ensuring 100% continuous uptime.
  4. 4. Automated Cron Upgrade Worker: A background cron job periodically scans database records tagged with source = 'ip-api' and refreshes them using Proxycheck.io v3.