Skip to main content

Geo IP and VPN Lookup API

The following document outlines the details of the Geo IP and VPN Lookup API

Objective

The Geo IP and VPN Lookup API returns detailed IP address information including geolocation data, network information, connection type, and privacy indicators (VPN, proxy, TOR detection). The API provides comprehensive location details such as timezone, languages, and country-specific information, enabling applications to implement location-based services, network security measures, and content delivery controls.

InputOutput
User's IP addressDetailed information about the queried IP address. A complete list of details returned by the API is provided under the Success Response Details section.

API URL

https://ind-engine.thomas.hyperverge.co/v1/geoIpWithVPN

API Endpoint

geoIpWithVPN

Overview

The API is RESTful and uses standard HTTP verbs and status codes. The responses are in JSON format and you should upload all images and files as form-data through a POST request.

Authentication

You need a unique pair of application ID (appId) and application key (appKey) from HyperVerge to verify your identity for accessing the API.

API Request Details

Method - POST

Headers

ParameterMandatory or OptionalDescriptionAllowed Values
content-type MandatoryThis parameter defines the media type for the request payloadapplication/json
appId MandatoryThe application identifier shared by HyperVerge. You can find the details in the dashboard's credentials tab.This should be a unique value.
appKey MandatoryThe application key shared by HyperVerge. You can find the details in the dashboard's credentials tab.This should be a unique value.
transactionIdMandatoryA unique identifier for tracking a user journeyThis should be both unique and easily associated with the user's journey in your application(s)

Input

The following table provides the details of the parameter required for the API's request body:

ParameterDescriptionMandatory or OptionalAllowed ValuesDefault Value
ipThe IP Address to be checked Optional
When no IP address is provided, the API automatically fetches the public IP address of the device making the API request.
Not ApplicableThe Public IP* address of the end user's system
note

*A Public IP is assigned by your Internet Service Provider (ISP) and is visible on the internet, allowing the API to fetch location data.

In contrast, Private IPs are used within local networks, for example, at home or in an office and cannot be used to retrieve such details, as they are not visible on the public internet.

Request

The following code shows a standard cURL request for the API:


curl --location --request POST 'https://ind-engine.thomas.hyperverge.co/v1/geoIpWithVPN' \
--header 'Content-Type: application/json' \
--header 'appId: <Enter_the_HyperVerge_appId>' \
--header 'appKey: <Enter_the_HyperVerge_appKey>' \
--header 'transactionId: <Enter_the_HyperVerge_transactionID>' \
--data '{
"ip": "<Enter_the_valid_IP_Address>"
}'

Success Response

The following code snippet demonstrates a success response from the API:

{
"status": "success",
"statusCode": 200,
"result": {
"ip": "<IP_Address>",
"type": "<IP_Type>",
"continentCode": "<Continent_Code>",
"continentName": "<Continent_Name>",
"country": "<Country_Code>",
"countryName": "<Country_Name>",
"regionCode": "<Region_Code>",
"region": "<Region_Name>",
"city": "<City_Name>",
"postal": "<Postal_Code>",
"lat": "<Latitude>",
"long": "<Longitude>",
"ipRoutingType": "<IP_Routing_Type>",
"connectionType": "<Connection_Type>",
"location": {
"geonameId": <Geoname_ID>,
"capital": "<Country_Capital>",
"languages": [
{
"code": "<Language_Code>",
"name": "<Language_Name>",
"native": "<Native_Language_Name>"
}
],
"countryFlag": "<Country_Flag_URL>",
"countryFlagEmoji": "🇮🇳",
"countryFlagEmojiUnicode": "<Country_Flag_Unicode>",
"callingCode": "<Country_Calling_Code>",
"isEu": <Is_EU_Country>
},
"timeZone": "<Timezone>",
"connection": {
"asn": <ASN_Number>,
"isp": "<ISP_Name>",
"sld": "<Second_Level_Domain>",
"tld": "<Top_Level_Domain>",
"carrier": "<Carrier_Name>",
"home": <Is_Home_Connection>,
"organizationType": "<Organization_Type>",
"isicCode": "<ISIC_Code>",
"naicsCode": "<NAICS_Code>"
},
"privacy": {
"proxy": <Is_Proxy>,
"tor": <Is_Tor>,
"service": <Privacy_Service>,
"hosting": <Is_Hosting>,
"vpn": <Is_VPN>
}
},
"metaData": {
"requestId": "<Request_ID>",
"transactionId": "<Transaction_ID>"
}
}

Success Response Details

The following table outlines the details of the success response from the API:

ParameterTypeDescription
ipstringThe queried IP address
typestringThe type of IP address
continentCodestringThe code of the continent associated with the IP address
continentNamestringThe full name of the continent associated with the IP address
countrystringThe country code of the IP address location
countryNamestringThe name of the country associated with the IP address
regionCodestringThe code of the region associated with the IP address
regionstringThe name of the region associated with the IP address
citystringThe city where the IP address is geographically located
postalstringThe postal/ZIP code corresponding to the IP address location
latstringThe latitude of the IP address
longstringThe longitude of the IP address
ipRoutingTypestringThe routing method of the IP address (e.g., mobile gateway, residential, business)
connectionTypestringThe type of connection used for the IP address
locationobjectGeographical location details associated with the IP address
location.geonameIdnumberThe unique ID for the geographical location
location.capitalstringThe capital city of the country associated with the IP address
location.languagesarrayThe official languages spoken in the region associated with the IP address
location.countryFlagstringURL to the flag image of the country associated with the IP address
location.countryFlagEmojistringThe emoji representation of the country flag
location.countryFlagEmojiUnicodestringThe unicode value of the country flag emoji
location.callingCodestringCalling code for the country associated with the IP address
location.isEubooleanIndicates whether the country is part of the European Union
timeZonestringThe time zone of the IP address location
connectionobjectNetwork connection details associated with the IP address
connection.asnnumberThe Autonomous System Number (ASN) associated with the IP address
connection.ispstringThe Internet Service Provider (ISP) associated with the IP address
connection.sldstringThe second-level domain associated with the IP address
connection.tldstringThe top-level domain associated with the IP address
connection.carrierstringThe carrier name associated with the IP address
connection.homebooleanIndicates whether the connection is a home connection
connection.organizationTypestringThe type of organization associated with the IP address
connection.isicCodestringThe International Standard Industrial Classification (ISIC) code associated with the IP address
connection.naicsCodestringThe North American Industry Classification System (NAICS) code associated with the IP address
privacyobjectInformation indicating if the IP is using privacy services like VPN, proxy, or TOR
privacy.proxybooleanIndicates whether the IP is using a proxy server
privacy.torbooleanIndicates whether the IP is part of the TOR network
privacy.servicestringName of the privacy service, if applicable
privacy.hostingbooleanIndicates whether the IP is associated with hosting services
privacy.vpnbooleanIndicates whether the IP is using a VPN

Error Responses

The following are some error responses from the API:

{
"message": "Missing/Invalid credentials",
"statusCode": 401,
"status": "failure"
}

Error Response Details

A failure or error response from the module contains a failure status, with a relavant status code and error message. The following table lists all error responses:

Status CodeError MessageError Description
401Missing/Invalid credentialsThe request is either missing the mandatory appId and appKey combination or has invalid values
403Access DeniedPlease contact the HyperVerge team
404Please provide a valid IP addressThe provided Id address is invalid
500Internal Server ErrorPlease check the request headers or contact the HyperVerge team for resolution
Was this helpful?
Ask AIBeta
Hi! How can I help?
Ask me anything about HyperVerge products, APIs, and SDKs.
Try asking: