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
Feature | Description | Benefit |
---|---|---|
Accurate hosting detection | Identifies thousands of hosting providers worldwide | Block automation tools and bot traffic |
VPN detection | Reliable identification of VPN services | Prevent IP masking and geo-restriction bypass |
Comprehensive ASN data | Detailed autonomous system information and metadata | Understand network origin and ownership |
Precise geolocation | Location data sourced from authoritative WHOIS records | Location-based filtering and analytics |
Security intelligence | Detection of TOR nodes, proxies, and abusive IPs | Protect against threats and abuse |
Real-time updates | Database updated at least weekly with fresh data | Stay 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
Field | Type | Description | Example |
---|---|---|---|
ip | string | The IP address that was checked. This is the normalized form of the IP address submitted for verification. | 176.157.109.254 |
allowed | boolean | Indicates whether the IP address passes all configured security rules. A value of true means the IP is allowed based on your rule configuration. | true |
reason | string | The 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_rules | array | An 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:
- The Veille dashboard interface
- 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 ID | Name | Action | Purpose | Main Conditions |
---|---|---|---|---|
geo_vpn_block | Block Oceania and VPN Traffic | block | Geographic and VPN filtering | location.continent = OC or vpn.service = NordVPN |
tor_ip_block | Block TOR and Specific IPs | block | Stop TOR users and known bad IPs | is_tor = true or specific IP matches |
datacenter_proxy | Block Datacenter and Proxy Traffic | block | Prevent automation and scraping | is_datacenter = true or is_proxy = true |
asn_allow | Allow Educational and Government ASNs | allow | Permit legitimate institutions | ASN type is "education" or "government" |
mobile_satellite | Block Mobile and Satellite Access | block | Target specific connection types | is_mobile = true or is_satellite = true |
country_conditions | Allow Specific Countries with Security Checks | allow | Selective geo-access | Country in [US, CA, GB] and not VPN/datacenter |
abusive_crawlers | Block Abusive Crawlers | block | Prevent harmful scraping | is_crawler = true and is_abuser = true |
Detailed Rule Examples
- 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 } ] }
- 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 } ] }
- 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 } ] }
- 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 } ] }
- 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 } ] }
- 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 } ] }
- 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.