Overview

HackMyIP offers a collection of APIs designed for gathering network intelligence related to IP addresses. The primary services include IP Geolocation, VPN/Proxy Detection, and Threat Intelligence. These APIs provide developers with data points such as geographical location, internet service provider (ISP) details, and indicators of potential misuse or malicious activity associated with an IP address.

The IP Geolocation API allows applications to determine the physical location of an IP address, including country, region, city, and coordinates. This data can be used for various purposes, such as content localization, targeted advertising, or ensuring compliance with regional regulations. For instance, an e-commerce platform might use this to display prices in local currency or restrict access to certain products based on the user's location, as described in the Google Maps Geocoding API overview.

The VPN/Proxy Detection API is engineered to identify whether an IP address belongs to a VPN, proxy server, or Tor exit node. This capability is relevant for security applications, fraud prevention systems, and platforms that require accurate user location or wish to prevent access from anonymizing services. Businesses can integrate this into their authentication flows or transaction processing to add an additional layer of security, flagging suspicious connections that might originate from these services.

The Threat Intelligence API extends these capabilities by providing insights into potential threats associated with an IP address, such as whether it has been identified in botnets, spam networks, or other malicious activities. This enables proactive defense mechanisms, allowing applications to block or flag connections from known problematic IPs, thereby enhancing overall system security and reducing exposure to cyber threats. The service is suitable for organizations implementing a multi-layered security strategy or those needing to enrich their existing security information and event management (SIEM) systems with real-time IP threat data.

HackMyIP supports several programming languages through its SDKs, including PHP, Python, Node.js, Go, Java, C#, and Ruby, facilitating integration into diverse development environments. The API responses are typically delivered in JSON format, providing structured data that can be parsed and utilized programmatically. A free tier is available, offering up to 5,000 requests per month, which allows developers to test the API's functionality and integrate it into smaller projects without an initial financial commitment.

Key features

  • IP Geolocation API: Provides country, region, city, latitude, longitude, and ISP information for any given IPv4 or IPv6 address. This data can be used to tailor user experiences or enforce geographic restrictions on digital content and services.
  • VPN/Proxy Detection API: Identifies if an IP address is associated with a VPN, anonymous proxy, or Tor network. This is critical for fraud detection, content access control, and ensuring data integrity by filtering out potentially deceptive traffic.
  • Threat Intelligence API: Offers data on whether an IP address is known for malicious activities like botnet participation, spamming, or other cyber threats. Integrating this helps in proactive security measures by blocking or monitoring suspicious IP origins.
  • Developer SDKs: Available for PHP, Python, Ruby, Node.js, Go, Java, and C#, simplifying API consumption and reducing development time through pre-built client libraries.
  • JSON Response Format: Delivers data in a standardized JSON format, ensuring compatibility and ease of parsing across different programming languages and systems.
  • GDPR Compliance: Adheres to GDPR standards, providing a framework for handling personal data that helps applications maintain legal compliance when processing IP-related information.

Pricing

HackMyIP offers various pricing tiers based on usage volume. The free tier allows for up to 5,000 requests per month. Paid plans begin at $15 per month for increased request allowances.

Plan Name Monthly Requests Price (USD/month) Key Features
Free 5,000 Free Basic IP Geolocation, VPN/Proxy Detection, limited support
Basic 250,000 $15 All API features, standard support
Pro 1,000,000 $49 All API features, priority support
Business 5,000,000+ Contact for Quote All API features, dedicated support, custom rate limits

Pricing as of 2026-05-28. For detailed and up-to-date pricing information, please refer to the HackMyIP pricing page.

Common integrations

  • Web Application Security: Integrate with web application firewalls (WAFs) or custom security layers to block traffic from known malicious IPs or anonymizing services identified by the VPN/Proxy Detection and Threat Intelligence APIs.
  • Fraud Detection Systems: Use geolocation and proxy detection data within e-commerce platforms or financial services to flag suspicious transactions originating from unexpected locations or through VPNs, as outlined in the Stripe Radar documentation for fraud prevention.
  • Content Personalization: Integrate with content management systems (CMS) or marketing platforms to deliver localized content, advertisements, or language options based on the user's geographical IP data.
  • Analytics and Reporting: Combine IP data with web analytics tools to enhance visitor segmentation, understand geographical user distribution, and refine marketing strategies.
  • CRM Systems: Enrich customer relationship management (CRM) records with location data for better customer segmentation and targeted communication strategies.

Alternatives

  • IPinfo.io: Offers IP geolocation, ASN details, company data, and VPN detection.
  • Abstract API: Provides IP geolocation with features like timezone, currency, and security assessment.
  • IP-API.com: A free and commercial IP geolocation API with city, country, ISP, and organization data.

Getting started

To begin using HackMyIP, you typically make an HTTP GET request to the API endpoint with your API key. Here's an example using Python to query the IP Geolocation API:


import requests

API_KEY = 'YOUR_API_KEY_HERE'  # Replace with your actual API key
IP_ADDRESS = '8.8.8.8'         # Example IP address (Google DNS)

url = f'https://api.hackmyip.com/v1/geolocation?key={API_KEY}&ip={IP_ADDRESS}'

try:
    response = requests.get(url)
    response.raise_for_status()  # Raise an HTTPError for bad responses (4xx or 5xx)
    data = response.json()

    print(f"IP: {data.get('ip')}")
    print(f"Country: {data.get('country_name')}")
    print(f"City: {data.get('city')}")
    print(f"Latitude: {data.get('latitude')}")
    print(f"Longitude: {data.get('longitude')}")
    print(f"ISP: {data.get('isp')}")
    print(f"Is Proxy/VPN: {data.get('is_proxy')}")

except requests.exceptions.HTTPError as http_err:
    print(f"HTTP error occurred: {http_err}")
except requests.exceptions.ConnectionError as conn_err:
    print(f"Connection error occurred: {conn_err}")
except requests.exceptions.Timeout as timeout_err:
    print(f"Timeout error occurred: {timeout_err}")
except requests.exceptions.RequestException as req_err:
    print(f"An unexpected error occurred: {req_err}")
except ValueError as json_err:
    print(f"JSON decoding error: {json_err}")

This Python script sends a GET request to the HackMyIP Geolocation endpoint, passing the API key and the IP address. It then parses the JSON response to extract and print key geolocation and proxy detection data points. For further details on integrating the API and examples in other languages, consult the HackMyIP API documentation.