IP Geolocation API

GET

https://api.apifreaks.com/v1.0/geolocation/lookup

format
Format of the Response
ipString
IPv4, IPv6, or hostname whose geolocation lookup is required
langString
response language.
fieldsArray
Comma separated list of fields to be included in the response. with an additional optional field "geo" to represent geolocation fields.
excludesArray
Comma separated list of fields except ip to be excluded in the response
includeArray
Comma-separated list of values to include additional IP lookup information in the response.

Sample Responses

404
423
400
LANGUAGE
Python
PHP
Java
Node
Ruby
$ pip install requests
RESPONSE

Click Test it to start the request and see the response here!


API Response

FieldTypeRequirementDescription
domainStringOptional
Domain name that is used to lookup geolocation information. It is not returned if an IP address is used to query IP Geolocation API.
ipStringMandatory
IP address that is used to lookup geolocation information.
hostnameStringMandatory
Hostname of the IP address used to query IP Geolocation API.
continent_codeStringMandatory
2-letter code of the continent.
continent_nameStringMandatory
Name of the continent.
country_code2StringMandatory
Country code (ISO 3166-1 alpha-2) of the country.
country_code3StringMandatory
Country code (ISO 3166-1 alpha-3) of the country.
country_nameStringMandatory
Name of the country.
country_capitalStringMandatory
Name of the country's capital.
state_provStringOptional
Name of the state/province/region.
districtStringOptional
Name of the district or county.
cityStringOptional
Name of the city.
zip_codeStringOptional
ZIP code of the place.
latitudeFloatMandatory
Latitude of the place.
longitudeFloatMandatory
Longitude of the place.
is_euBooleanMandatory
Is the country belongs to European Union?
calling_codeStringMandatory
Calling code of the country.
country_tldStringMandatory
Top-level domain of the country.
languagesStringMandatory
Comma-separated list of the languages' codes, spoken in the country.
country_flagStringMandatory
URL to get the country flag.
geoname_idNumberMandatory
Geoname ID of the place from geonames.org
ispStringMandatory
Name of the ISP holding the IP address.
connection_typeStringOptional
Type of the connection, consuming the IP address.
organizationStringOptional
Name of AS organization holding the IP address.
asnStringOptional
Autonomous system number of the autonomous system, to which IP address belongs to.
currency.codeStringMandatory
Currency code (ISO 4217).
currency.nameStringMandatory
Currency name (ISO 4217).
currency.symbolStringMandatory
Currency symbol.
time_zone.nameStringMandatory
Name (ISO 8601) of the timezone.
time_zone.offsetNumberMandatory
Timezone offset from UTC.
timezone.current_timeStringMandatory
Current time in 'yyyy-MM-dd HH:mm:ss.SSS+ZZZ' format.
timezone.current_time_unixFloatMandatory
Current time in seconds since 1970.
timezone.is_dstBooleanMandatory
Is the timezone in daylight savings?
timezone.dst_savingsNumberMandatory
Total daylight savings.
security.threat_scoreNumberMandatory
IP address's threat score. It ranges from 0 (lowest threat) to 100 (highest threat).
security.is_torBooleanMandatory
Indicates if the IP address is being consumed on a Tor endpoint.
security.is_proxyBooleanMandatory
Indicates if the IP address belongs to a proxy network.
security.proxy_typeStringOptional
Type of the proxy network if the IP address belongs to a proxy network.
security.is_anonymousBooleanMandatory
Indicates if the IP address is being used anonymously.
security.is_known_attackerBooleanMandatory
Indicates if the IP address is enlisted as an attacking IP address.
security.is_cloud_providerBooleanMandatory
Indicates if the IP address belongs to a cloud provider (computing infrastructure providers).
user_agent.userAgentStringStringMandatory
User-Agent string passed along with the query in the User-Agent header.
user_agent.nameStringMandatory
User-Agent Name.
user_agent.typeStringMandatory
User-Agent Class.
user_agent.versionStringMandatory
User-Agent Version.
user_agent.versionMajorStringMandatory
User-Agent Version Major.
user_agent.device.nameStringMandatory
Device Name.
user_agent.device.typeStringMandatory
Device Type.
user_agent.device.brandStringMandatory
Device Brand.
user_agent.device.CPUStringMandatory
Device CPU Model.
user_agent.engine.nameStringMandatory
Layout Engine Name.
user_agent.engine.typeStringMandatory
Layout Engine Class.
user_agent.engine.versionStringMandatory
Layout Engine Version.
user_agent.engine.versionMajorStringMandatory
Layout Engine Version Major.
user_agent.operatingSystem.nameStringMandatory
Operating System Name.
user_agent.operatingSystem.typeStringMandatory
Operating System Class.
user_agent.operatingSystem.versionStringMandatory
Operating System Version.
user_agent.operatingSystem.versionMajorStringMandatory
Operating System Version Major.