IP Address Verification API

Complete IP address verification API for geolocation, network analysis and security checks

The IP verification endpoint provides comprehensive information about IP addresses, including geolocation, network details, security risks, and infrastructure insights. For a complete overview of our security features, see the Getting Started guide.

Our API emphasizes accuracy in hosting detection and VPN detection, making it ideal for security, fraud prevention, and network analysis.

Authentication

Include your API key in the request header or as a query parameter:

x-api-key: your-api-key-here

or

https://veille.io/api/v1/ip/{ip}?x_api_key=your-api-key-here

Endpoint

GET https://veille.io/api/v1/ip/{ip}

Replace {ip} with the IP address you want to verify.

Key features

FeatureDescriptionBenefit
Accurate hosting detectionIdentifies thousands of hosting providers worldwideBlock automation tools and bot traffic
VPN detectionReliable identification of VPN servicesPrevent IP masking and geo-restriction bypass
Comprehensive ASN dataDetailed autonomous system information and metadataUnderstand network origin and ownership
Precise geolocationLocation data sourced from authoritative WHOIS recordsLocation-based filtering and analytics
Security intelligenceDetection of TOR nodes, proxies, and abusive IPsProtect against threats and abuse
Real-time updatesDatabase updated at least weekly with fresh dataStay current with evolving network landscape

Response format

{
    "ip": "176.157.109.254",
    "allowed": true
}

In this case, our backend has checked all configured rules and will allow access to IP 176.157.109.254.

If there had been a rule blocking access, the response would have been:

{
    "ip": "203.55.255.204",
    "allowed": false,
    "reason": "rule_triggered",
    "matched_rules": [
        {
            "rule_id": "block_abuser",
            "name": "block_abuser",
            "action": "block"
        }
    ]
}

For more comprehensive validation including email and user agent checks, see our Multi-factor Validation API.

Response Fields

FieldTypeDescriptionExample
ipstringThe IP address that was checked. This is the normalized form of the IP address submitted for verification.176.157.109.254
allowedbooleanIndicates whether the IP address passes all configured security rules. A value of true means the IP is allowed based on your rule configuration.true
reasonstringThe reason why validation failed. Only included when allowed is false. Typical value is "rule_triggered" when a security rule blocks the IP.rule_triggered
matched_rulesarrayAn array of rule objects that matched the IP address. Only included when allowed is false and reason is "rule_triggered". Each object contains rule_id, name, and action fields.[{"rule_id": "block_abuser", "name": "block_abuser", "action": "block"}]

Security rules integration

You can configure your security rules either through:

  1. The Veille dashboard interface
  2. The Security Rules API (see Security Rules documentation)

These rules determine the allowed field in the response based on your specific security requirements. You can also manage your IP blocklist through our Blocklist Management API.

Request with Specific Rules

You can test a specific rule by including a rule_id parameter in your request:

GET https://veille.io/api/v1/ip/{ip}?rule_id=proxy_block

You can combine multiple rules in a single request:

GET https://veille.io/api/v1/ip/{ip}?rule_id=geo_vpn_block,eu_with_exceptions

This will apply both rules in sequence. The IP will be evaluated against all conditions in each rule.

Rule examples

Rule IDNameActionPurposeMain Conditions
geo_vpn_blockBlock Oceania and VPN TrafficblockGeographic and VPN filteringlocation.continent = OC or vpn.service = NordVPN
tor_ip_blockBlock TOR and Specific IPsblockStop TOR users and known bad IPsis_tor = true or specific IP matches
datacenter_proxyBlock Datacenter and Proxy TrafficblockPrevent automation and scrapingis_datacenter = true or is_proxy = true
asn_allowAllow Educational and Government ASNsallowPermit legitimate institutionsASN type is "education" or "government"
mobile_satelliteBlock Mobile and Satellite AccessblockTarget specific connection typesis_mobile = true or is_satellite = true
country_conditionsAllow Specific Countries with Security ChecksallowSelective geo-accessCountry in [US, CA, GB] and not VPN/datacenter
abusive_crawlersBlock Abusive CrawlersblockPrevent harmful scrapingis_crawler = true and is_abuser = true

Detailed Rule Examples

  1. Block Specific Geographic Areas and VPN
{
    "rule_id": "geo_vpn_block",
    "name": "Block Oceania and VPN Traffic",
    "action": "block",
    "enabled": true,
    "conditions": [
        {
            "field": "location.continent",
            "operator": "equals",
            "value": "OC",
            "order": 1,
            "enabled": true
        },
        {
            "field": "vpn.service",
            "operator": "equals",
            "value": "NordVPN",
            "order": 2,
            "enabled": true
        }
    ]
}
  1. Block TOR and specific IPs
{
    "rule_id": "tor_ip_block",
    "name": "Block TOR and Specific IPs",
    "action": "block",
    "enabled": true,
    "conditions": [
        {
            "field": "is_tor",
            "operator": "equals",
            "value": true,
            "order": 1,
            "enabled": true
        },
        {
            "field": "ip_source_address",
            "operator": "equals",
            "value": "183.233.23.12",
            "order": 2,
            "enabled": true
        }
    ]
}
  1. Block datacenter and proxy traffic
{
    "rule_id": "datacenter_proxy",
    "name": "Block Datacenter and Proxy Traffic",
    "action": "block",
    "enabled": true,
    "conditions": [
        {
            "field": "is_datacenter",
            "operator": "equals",
            "value": true,
            "order": 1,
            "enabled": true
        },
        {
            "field": "is_proxy",
            "operator": "equals",
            "value": true,
            "order": 2,
            "enabled": true
        }
    ]
}
  1. Allow specific ASN types
{
    "rule_id": "asn_allow",
    "name": "Allow Educational and Government ASNs",
    "action": "allow",
    "enabled": true,
    "conditions": [
        {
            "field": "asn.type",
            "operator": "in",
            "value": ["education", "government"],
            "order": 1,
            "enabled": true
        },
        {
            "field": "asn.rir",
            "operator": "equals",
            "value": "ARIN",
            "order": 2,
            "enabled": true
        }
    ]
}
  1. Block mobile and satellite IPs
{
    "rule_id": "mobile_satellite",
    "name": "Block Mobile and Satellite Access",
    "action": "block",
    "enabled": true,
    "conditions": [
        {
            "field": "is_mobile",
            "operator": "equals",
            "value": true,
            "order": 1,
            "enabled": true
        },
        {
            "field": "is_satellite",
            "operator": "equals",
            "value": true,
            "order": 2,
            "enabled": true
        }
    ]
}
  1. Allow specific countries with conditions
{
    "rule_id": "country_conditions",
    "name": "Allow Specific Countries with Security Checks",
    "action": "allow",
    "enabled": true,
    "conditions": [
        {
            "field": "location.country",
            "operator": "in",
            "value": ["US", "CA", "GB"],
            "order": 1,
            "enabled": true
        },
        {
            "field": "is_vpn",
            "operator": "equals",
            "value": false,
            "order": 2,
            "enabled": true
        },
        {
            "field": "is_datacenter",
            "operator": "equals",
            "value": false,
            "order": 3,
            "enabled": true
        }
    ]
}
  1. Block abusive crawlers
{
    "rule_id": "abusive_crawlers",
    "name": "Block Abusive Crawlers",
    "action": "block",
    "enabled": true,
    "conditions": [
        {
            "field": "is_crawler",
            "operator": "equals",
            "value": true,
            "order": 1,
            "enabled": true
        },
        {
            "field": "is_abuser",
            "operator": "equals",
            "value": true,
            "order": 2,
            "enabled": true
        }
    ]
}

Available fields and operators

For a complete list of fields and operators available for IP verification rules, please see the Security Rules documentation.

Code examples

cURL

curl -X GET \
  'https://veille.io/api/v1/ip/176.157.109.254' \
  -H 'x-api-key: your-api-key-here'

JavaScript (Fetch)

fetch('https://veille.io/api/v1/ip/176.157.109.254', {
  headers: {
    'x-api-key': 'your-api-key-here'
  }
})
  .then(response => response.json())
  .then(data => console.log(data))
  .catch(error => console.error('Error:', error));

Python (Requests)

import requests

headers = {
    'x-api-key': 'your-api-key-here'
}

response = requests.get(
    'https://veille.io/api/v1/ip/176.157.109.254',
    headers=headers
)

print(response.json())

PHP

<?php
$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://veille.io/api/v1/ip/176.157.109.254');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'x-api-key': 'your-api-key-here'
]);

$response = curl_exec($ch);
curl_close($ch);

echo $response;
?>

Error handling

For details on error responses and status codes, please refer to the Status Codes & Error Responses documentation.