Developer REST API Reference

Build automated compliance and corporate due diligence into your software.

The Diliguard Developer API (v2) provides programmatic HTTP access to OSINT, AML, and corporate verification screening. Twenty-three endpoints with API key authentication, credit-based billing, per-organization rate limits, and full audit logs.

Version: 2.0.0  |  Base URL: https://api.diliguard.com  |  Authentication: X-API-Key

1. Overview

The Diliguard Developer API (v2) gives engineering teams programmatic access to our intelligence engine. It features:

  • API key authentication: Every request requires a valid X-API-Key header.
  • Credit-based accounting: Each scan or workflow consumes fixed credits from your subscription.
  • Per-organization rate limits: Requests-per-minute caps enforced automatically on a 60-second rolling window.
  • Audit trail logging: Every transaction is logged with unique request IDs for compliance records.

API Categories Summary

CategoryEndpointsCredits per Request
Account Management30 (Free)
Single Intelligence Scans181 Credit
Composite Workflows75 to 15 Credits

Public Health Check (No Auth Required)

GET https://api.diliguard.com/health
{
  "status": "ok"
}

2. Quickstart

Execute your first request in three steps:

Step 1: Create an API Key

Generate an API key from the Diliguard Portal or create a sub-token programmatically:

curl -X POST https://api.diliguard.com/api/v2/account/keys \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_INITIAL_API_KEY" \
  -d '{"name": "Production Integration"}'

Step 2: Make a Scan Request

curl -X POST https://api.diliguard.com/api/v2/scan-sanctions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: dg_live_abc123def456" \
  -d '{"target_name": "Volkswagen AG"}'

Step 3: Read the Response Envelope

{
  "success": true,
  "data": {
    "status": "clear",
    "risk_score": 0,
    "sanctions_matches": [],
    "lists_checked": ["OFAC_SDN", "UN_SANCTIONS", "EU_SANCTIONS", "HMT_SANCTIONS"]
  },
  "credits": {
    "used": 1,
    "limit": 500,
    "remaining": 499
  },
  "request_id": "req_a1b2c3d4e5f6"
}

3. Authentication

Every request to /api/v2/* must include the X-API-Key header. The API key connects your request to your organization, subscription tier, credit quota, and rate limits.

Authentication Error Dictionary

StageHTTP StatusError CodeDescription
Invalid Key401INVALID_API_KEYAPI key is missing, inactive, or malformed.
Token Owner Missing401INVALID_API_KEYKey owner account is inactive.
Organization Missing403INVALID_API_KEYOrganization record not found.
No Active Plan403NO_SUBSCRIPTIONNo active subscription found for organization.
Credit Cap Hit429CREDIT_LIMIT_EXCEEDEDMonthly credit quota reached. Resets on period end.
Rate Limit Hit429RATE_LIMIT_EXCEEDEDOrganization exceeded requests per minute limit.

4. Credit System & Cost Schedule

Credits are allocated monthly based on your subscription tier. Each scan deducts credits upon successful execution. Failed backend calls do not deduct credits.

EndpointCostCategoryDescription
POST /scan-sanctions1 CreditCorporate/AMLMatch against OFAC, UN, EU, UK HMT watchlists.
POST /scan-pep1 CreditCorporate/AMLPolitically Exposed Persons verification.
POST /scan-corporate-intel1 CreditCorporate/AMLGLEIF LEI, registration, and status lookup.
POST /scan-ubo1 CreditCorporate/AMLBeneficial ownership graph across 16 jurisdictions.
POST /scan-regulatory1 CreditCorporate/AMLEnforcement actions and regulatory penalties.
POST /scan-offshore1 CreditCorporate/AMLScreening across global offshore leak records.
POST /scan-crypto1 CreditFinancialMulti-chain wallet address balance and cluster analysis.
POST /scan-crypto-activity1 CreditFinancialTransaction history and interaction timing.
POST /scan-crypto-illicit1 CreditFinancialDirect exposure to mixers, hacks, and sanctioned pools.
POST /scan-iban1 CreditFinancialIBAN formatting, checksum, and routing bank verification.
POST /scan-vat1 CreditFinancialLive European VAT verification via VIES.
POST /scan-media1 CreditDigital OSINTAdverse media and negative news indexing.
POST /scan-domain1 CreditDigital OSINTWHOIS, DNS records, MX routing, and reputation.
POST /scan-phone1 CreditDigital OSINTCarrier, line type, country code, and fraud score.
POST /scan-username1 CreditDigital OSINTCross-platform social media and account footprint.
POST /scan-ip1 CreditDigital OSINTGeolocation, proxy, VPN, Tor, and datacenter check.
POST /scan-darkweb1 CreditDigital OSINTCompromised credential and breach database check.
POST /workflow-corporate5 CreditsWorkflowCombined KYB, UBO, sanctions, and media check.
POST /workflow-person5 CreditsWorkflowComprehensive individual background and PEP sweep.
POST /workflow-crypto5 CreditsWorkflowEnd-to-end blockchain asset and counterparty trace.
POST /workflow-vendor-risk10 CreditsWorkflowMulti-entity supply chain risk and regulatory sweep.
POST /workflow-ultimate-fraud15 CreditsWorkflowHolistic corporate, executive, and digital forensics.
POST /registry-entity-research5 CreditsWorkflowDeep multi-registry corroboration and document audit.
GET /account/*0 CreditsAccountUsage, history, and key management endpoints.

5. Rate Limits & Response Format

Rate limits are enforced on a rolling 60-second window. Every response includes real-time quota status in the HTTP headers:

X-RateLimit-Limit: 60
X-RateLimit-Remaining: 57

Standard Response Envelope

{
  "success": true,
  "data": {
    /* Endpoint specific data object */
  },
  "credits": {
    "used": 12,
    "limit": 500,
    "remaining": 488
  },
  "request_id": "req_8f1a2b3c4d5e"
}

Standard Error Envelope

{
  "success": false,
  "error": {
    "code": "RATE_LIMIT_EXCEEDED",
    "message": "Requests per minute limit reached (60/60). Wait 12 seconds."
  }
}

6. Account Management Endpoints

Account endpoints are free (0 credits) and allow you to inspect usage, review scan logs, and manage tokens.

GET /api/v2/account/usage

Returns subscription plan limits and credits consumed in the current billing period.

curl -X GET https://api.diliguard.com/api/v2/account/usage \
  -H "X-API-Key: dg_live_abc123def456"
{
  "org_name": "Acme Holdings",
  "plan_name": "Professional",
  "credits_used": 47,
  "credits_limit": 500,
  "period_end": "2026-11-01T00:00:00.000Z"
}

GET /api/v2/account/history

Returns paginated history of past scans. Supports query filters: page, per_page, scan_type, status, source.

curl -X GET "https://api.diliguard.com/api/v2/account/history?page=1&per_page=10" \
  -H "X-API-Key: dg_live_abc123def456"

POST /api/v2/account/keys

Generates a new API key for your organization.

curl -X POST https://api.diliguard.com/api/v2/account/keys \
  -H "Content-Type: application/json" \
  -H "X-API-Key: dg_live_abc123def456" \
  -d '{"name": "CI/CD Deployment Key"}'
{
  "key_id": "key_9x8y7z",
  "name": "CI/CD Deployment Key",
  "token": "dg_live_newtoken123456789...",
  "created_at": "2026-10-05T12:00:00.000Z"
}

7. Corporate & AML Scans

Verify companies, screen beneficial owners, and inspect international sanctions registers.

POST /api/v2/scan-ubo

Unwrap ultimate beneficial ownership and shareholding structures across 16 global jurisdictions concurrently.

ParameterTypeRequiredDescription
company_namestringYesOfficial legal entity name to unwrap.
jurisdictionstringNoTarget country code (e.g. ‘GB’, ‘DE’, ‘FR’, ‘NL’) or ‘GLOBAL’.
curl -X POST https://api.diliguard.com/api/v2/scan-ubo \
  -H "Content-Type: application/json" \
  -H "X-API-Key: dg_live_abc123def456" \
  -d '{"company_name": "Deutsche Bank AG", "jurisdiction": "DE"}'
{
  "success": true,
  "data": {
    "status": "clear",
    "jurisdiction": "DE",
    "total_hits": 1,
    "companies": [
      {
        "company_name": "Deutsche Bank AG",
        "registration_number": "HRB 30000",
        "registered_address": "Taunusanlage 12, Frankfurt am Main",
        "status": "active",
        "beneficial_owners": [
          {
            "name": "Institutional Float",
            "ownership_percentage": 100.0,
            "nature_of_control": "publicly_traded"
          }
        ]
      }
    ]
  },
  "credits": { "used": 1, "limit": 500, "remaining": 499 },
  "request_id": "req_ubo_77123"
}

POST /api/v2/scan-sanctions

Check individual or entity names against OFAC SDN, UN Consolidated, EU Financial Sanctions, and UK HMT.

ParameterTypeRequiredDescription
target_namestringYesFull person or company name to screen.
curl -X POST https://api.diliguard.com/api/v2/scan-sanctions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: dg_live_abc123def456" \
  -d '{"target_name": "Siemens AG"}'

8. Financial & Crypto Forensics

Analyze blockchain transaction flows, identify illicit mixer exposure, and validate bank accounts.

POST /api/v2/scan-crypto-illicit

Screen cryptocurrency wallet addresses for direct exposure to sanctioned entities, darknet markets, or crypto mixers.

ParameterTypeRequiredDescription
wallet_addressstringYesCryptocurrency public address (BTC, ETH, SOL, etc.).
blockchainstringNoSpecific network code (default: auto-detected).
curl -X POST https://api.diliguard.com/api/v2/scan-crypto-illicit \
  -H "Content-Type: application/json" \
  -H "X-API-Key: dg_live_abc123def456" \
  -d '{"wallet_address": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"}'

POST /api/v2/scan-iban

Validate International Bank Account Numbers for structural validity, checksum integrity, and routing bank status.

curl -X POST https://api.diliguard.com/api/v2/scan-iban \
  -H "Content-Type: application/json" \
  -H "X-API-Key: dg_live_abc123def456" \
  -d '{"iban": "DE89370400440532013000"}'

9. Digital OSINT & Composite Workflows

Investigate domains, IPs, and phone numbers, or execute multi-stage due diligence workflows with one call.

POST /api/v2/workflow-corporate (5 Credits)

Executes full corporate due diligence: registry verification, LEI validation, sanctions screening, regulatory check, adverse media, and UBO unwrapping.

curl -X POST https://api.diliguard.com/api/v2/workflow-corporate \
  -H "Content-Type: application/json" \
  -H "X-API-Key: dg_live_abc123def456" \
  -d '{"company_name": "Airbus SE", "country": "FR"}'

POST /api/v2/workflow-ultimate-fraud (15 Credits)

Holistic forensic investigation combining corporate registry checks, executive person trace, digital domain footprint, and transaction risk scoring.

curl -X POST https://api.diliguard.com/api/v2/workflow-ultimate-fraud \
  -H "Content-Type: application/json" \
  -H "X-API-Key: dg_live_abc123def456" \
  -d '{
    "company_name": "Apex Global Logistics Ltd",
    "person_name": "Marcus Vance",
    "domain": "apex-global-logistics.com",
    "wallet_address": "0x71C...8976"
  }'

10. Error Reference & Client Libraries

The API returns standard HTTP status codes. Detailed error reasons are included in the JSON body:

HTTP StatusError CodeMeaning
400 Bad RequestINVALID_PARAMSRequest body is malformed or missing required fields.
401 UnauthorizedINVALID_API_KEYAPI key missing, inactive, or invalid.
403 ForbiddenNO_SUBSCRIPTIONAccount does not have an active subscription.
422 UnprocessableVALIDATION_FAILEDInput parameter failed format validation.
429 Too Many RequestsRATE_LIMIT_EXCEEDEDRequest exceeded per-minute quota threshold.
429 Too Many RequestsCREDIT_LIMIT_EXCEEDEDMonthly credit balance exhausted.
502 Bad GatewayBACKEND_ERRORUnderlying intelligence engine returned an error.
504 Gateway TimeoutTIMEOUTQuery exceeded maximum execution window (120 seconds).

Python SDK Snippet

import requests

class DiliguardClient:
    def __init__(self, api_key: str, base_url: str = "https://api.diliguard.com"):
        self.api_key = api_key
        self.base_url = base_url
        self.session = requests.Session()
        self.session.headers.update({
            "Content-Type": "application/json",
            "X-API-Key": self.api_key
        })

    def scan_sanctions(self, target_name: str) -> dict:
        url = f"{self.base_url}/api/v2/scan-sanctions"
        res = self.session.post(url, json={"target_name": target_name})
        res.raise_for_status()
        return res.json()

    def scan_ubo(self, company_name: str, jurisdiction: str = "GLOBAL") -> dict:
        url = f"{self.base_url}/api/v2/scan-ubo"
        res = self.session.post(url, json={"company_name": company_name, "jurisdiction": jurisdiction})
        res.raise_for_status()
        return res.json()

# Usage
client = DiliguardClient("dg_live_abc123def456")
result = client.scan_ubo("Siemens AG")
print(result)

Ready to integrate Diliguard intelligence?

Create your developer account, generate an API key, and test your first verification query in seconds.