IP Lookup
Use this API to retrieve comprehensive information about a given IP address. It provides details such as location, ISP, and potential risk factors, enabling you to analyze and verify IP data for enhanced security, fraud prevention, and user profiling.
curl --request GET \
--url https://greipapi.com/lookup/ip \
--header 'Authorization: Bearer <token>'
{
"data": {
"ip": "165.227.149.217",
"ipType": "IPv4",
"IPNumber": 2783155673,
"bogon": false,
"continentName": "Europe",
"continentCode": "EU",
"countryCode": "DE",
"continentGeoNameID": 6255148,
"countryName": "Germany",
"countryGeoNameID": 2921044,
"regionName": "Hessen",
"cityName": "Frankfurt am Main",
"zipCode": "65931",
"latitude": "50.115520",
"longitude": "8.684170",
"location": {
"capital": "Berlin",
"population": 83783942,
"language": { "name": "German", "code": "de", "native": "Deutsch" },
"flag": {
"emoji": "🇩🇪",
"unicode": "U+1F1E9 U+1F1EA",
"png": {
"1000px": "https://www.gredev.io/img/flags/png1000px/de.png",
"250px": "https://www.gredev.io/img/flags/png250px/de.png",
"100px": "https://www.gredev.io/img/flags/png100px/de.png"
},
"svg": "https://www.gredev.io/img/flags/svg/de.svg"
},
"phoneCode": "49",
"countryIsEU": true,
"countryNeighbours": "CH,PL,NL,DK,BE,CZ,LU,FR,AT",
"tld": ".de"
},
"currency": {
"currencyName": "Euro",
"currencyCode": "EUR",
"currencySymbol": "€"
},
"asn": {
"asn": "AS14061",
"name": "DIGITALOCEAN-ASN",
"org": "DigitalOcean, LLC",
"phone": "+1-347-875-6044",
"email": "noc@digitalocean.com",
"domain": "digitalocean.com",
"created": "2012-05-14",
"type": "hosting"
},
"timezone": {
"name": "Europe/Berlin",
"abbreviation": "CET",
"offset": 3600,
"currentTime": "03:33:13",
"currentTimestamp": 1709519593,
"isDST": false,
"sunInfo": {
"sunset": "18:14:11",
"sunrise": "06:59:29",
"transit": "12:36:50",
"civilTwilightBegin": "06:28:47",
"civilTwilightEnd": "18:44:53",
"nauticalTwilightBegin": "05:51:20",
"nauticalTwilightEnd": "19:22:21",
"astronomicalTwilightBegin": "05:13:27",
"astronomicalTwilightEnd": "20:00:13",
"dayLength": "11:14:42"
}
},
"security": {
"isProxy": true,
"proxyType": "VPN",
"isTor": false,
"isBot": false,
"isRelay": false,
"isHosting": true,
"blacklisted": false
},
"custom_rules_applied": {
"total": 0,
"rules": []
}
},
"status": "success",
"executionTime": 4
}
Query Parameters
The ip command is used to specify the IP address you want to lookup.
Expected values: an IP address (IPv4 or IPv6)
Sample value: 1.1.1.1
The params command can be used to specify the required modules you want to get in the response.
Expected values: security
, currency
, timezone
, and/or location
.
Sample value: security,timezone,currency
For more information please refer to Customize response modules.
The format command is used to get a response in a specific format.
Expected values: JSON
, XML
, CSV
, or Newline
For more information please refer to Response Format.
The lang command is used to get a response in a specific language.
Expected values: EN
, AR
, DE
, FR
, ES
, JA
, ZH
, or RU
For more information please refer to Localization.
The mode command is used to in the development stage to simulate the integration process before releasing it to the production environment.
Expected values: live
, or test
.
For more information please refer to Development Environment.
The userID command can be used to identify requests sent by specific users to monitor in the Events Page.
Expected values: email address, phone number, user id, name, etc.
For more information please refer to User Identifier.
The callback command can help you make the response as a JSONP format.
Expected values: any name that can be used as a function name in Javascript, e.g: myFunctionName
.
For more information please refer to JSONP Callback.
{
"data": {
"ip": "165.227.149.217",
"ipType": "IPv4",
"IPNumber": 2783155673,
"bogon": false,
"continentName": "Europe",
"continentCode": "EU",
"countryCode": "DE",
"continentGeoNameID": 6255148,
"countryName": "Germany",
"countryGeoNameID": 2921044,
"regionName": "Hessen",
"cityName": "Frankfurt am Main",
"zipCode": "65931",
"latitude": "50.115520",
"longitude": "8.684170",
"location": {
"capital": "Berlin",
"population": 83783942,
"language": { "name": "German", "code": "de", "native": "Deutsch" },
"flag": {
"emoji": "🇩🇪",
"unicode": "U+1F1E9 U+1F1EA",
"png": {
"1000px": "https://www.gredev.io/img/flags/png1000px/de.png",
"250px": "https://www.gredev.io/img/flags/png250px/de.png",
"100px": "https://www.gredev.io/img/flags/png100px/de.png"
},
"svg": "https://www.gredev.io/img/flags/svg/de.svg"
},
"phoneCode": "49",
"countryIsEU": true,
"countryNeighbours": "CH,PL,NL,DK,BE,CZ,LU,FR,AT",
"tld": ".de"
},
"currency": {
"currencyName": "Euro",
"currencyCode": "EUR",
"currencySymbol": "€"
},
"asn": {
"asn": "AS14061",
"name": "DIGITALOCEAN-ASN",
"org": "DigitalOcean, LLC",
"phone": "+1-347-875-6044",
"email": "noc@digitalocean.com",
"domain": "digitalocean.com",
"created": "2012-05-14",
"type": "hosting"
},
"timezone": {
"name": "Europe/Berlin",
"abbreviation": "CET",
"offset": 3600,
"currentTime": "03:33:13",
"currentTimestamp": 1709519593,
"isDST": false,
"sunInfo": {
"sunset": "18:14:11",
"sunrise": "06:59:29",
"transit": "12:36:50",
"civilTwilightBegin": "06:28:47",
"civilTwilightEnd": "18:44:53",
"nauticalTwilightBegin": "05:51:20",
"nauticalTwilightEnd": "19:22:21",
"astronomicalTwilightBegin": "05:13:27",
"astronomicalTwilightEnd": "20:00:13",
"dayLength": "11:14:42"
}
},
"security": {
"isProxy": true,
"proxyType": "VPN",
"isTor": false,
"isBot": false,
"isRelay": false,
"isHosting": true,
"blacklisted": false
},
"custom_rules_applied": {
"total": 0,
"rules": []
}
},
"status": "success",
"executionTime": 4
}
Response properties
IP address you’re looking up.
Type of IP address (IPv4
, or IPv6
).
Numeric representation of the IP address.
Indicates if the IP address is a bogon.
Name of the continent where the IP address is.
Code representation of the continent.
Code representation of the country in ISO-3166
format.
GeoName ID of the continent.
Name of the country.
GeoName ID of the country.
Name of the region.
Name of the city.
ZIP code of the location where the IP address belong.
Latitude coordinate of the location.
Longitude coordinate of the location.
Capital city of the country.
Population of the country.
International dialing code for the country.
Indicates if the country is in the EU.
List of neighboring countries’ codes.
Top-level domain of the country.
Autonomous System Number.
Name of the ASN.
Organization associated with the ASN.
Phone contact for the ASN.
Email contact for the ASN.
Domain associated with the ASN.
Date of ASN creation.
Type of organization (“isp”, “hosting”, “business”, “education”, or “government”).
Timezone name.
Timezone abbreviation.
Timezone offset from UTC.
Current time in the timezone.
Current timestamp in the timezone.
Indicates if Daylight Saving Time is active.
Sunset time.
Sunrise time.
Solar transit time.
Civil twilight begin time.
Civil twilight end time.
Nautical twilight begin time.
Nautical twilight end time.
Astronomical twilight begin time.
Astronomical twilight end time.
Length of the day.
Indicates if the IP address is a proxy service.
Type of proxy used.
Indicates if accessed through Tor network.
Indicates if the user is a bot.
Indicates if it’s a Apple’s Private Relay connection.
Indicates if the IP address belong to a hosting provider.
Indicates if the IP address is blacklisted due to applying custom rules or were found in one of your blacklists.
The custom rules applied to this request, learn more.
The total number of custom rules applied to this request.
The custom rules applied to this request, learn more.
Response status (success/error).
Time taken to process the data (in milliseconds).
Was this page helpful?
curl --request GET \
--url https://greipapi.com/lookup/ip \
--header 'Authorization: Bearer <token>'
{
"data": {
"ip": "165.227.149.217",
"ipType": "IPv4",
"IPNumber": 2783155673,
"bogon": false,
"continentName": "Europe",
"continentCode": "EU",
"countryCode": "DE",
"continentGeoNameID": 6255148,
"countryName": "Germany",
"countryGeoNameID": 2921044,
"regionName": "Hessen",
"cityName": "Frankfurt am Main",
"zipCode": "65931",
"latitude": "50.115520",
"longitude": "8.684170",
"location": {
"capital": "Berlin",
"population": 83783942,
"language": { "name": "German", "code": "de", "native": "Deutsch" },
"flag": {
"emoji": "🇩🇪",
"unicode": "U+1F1E9 U+1F1EA",
"png": {
"1000px": "https://www.gredev.io/img/flags/png1000px/de.png",
"250px": "https://www.gredev.io/img/flags/png250px/de.png",
"100px": "https://www.gredev.io/img/flags/png100px/de.png"
},
"svg": "https://www.gredev.io/img/flags/svg/de.svg"
},
"phoneCode": "49",
"countryIsEU": true,
"countryNeighbours": "CH,PL,NL,DK,BE,CZ,LU,FR,AT",
"tld": ".de"
},
"currency": {
"currencyName": "Euro",
"currencyCode": "EUR",
"currencySymbol": "€"
},
"asn": {
"asn": "AS14061",
"name": "DIGITALOCEAN-ASN",
"org": "DigitalOcean, LLC",
"phone": "+1-347-875-6044",
"email": "noc@digitalocean.com",
"domain": "digitalocean.com",
"created": "2012-05-14",
"type": "hosting"
},
"timezone": {
"name": "Europe/Berlin",
"abbreviation": "CET",
"offset": 3600,
"currentTime": "03:33:13",
"currentTimestamp": 1709519593,
"isDST": false,
"sunInfo": {
"sunset": "18:14:11",
"sunrise": "06:59:29",
"transit": "12:36:50",
"civilTwilightBegin": "06:28:47",
"civilTwilightEnd": "18:44:53",
"nauticalTwilightBegin": "05:51:20",
"nauticalTwilightEnd": "19:22:21",
"astronomicalTwilightBegin": "05:13:27",
"astronomicalTwilightEnd": "20:00:13",
"dayLength": "11:14:42"
}
},
"security": {
"isProxy": true,
"proxyType": "VPN",
"isTor": false,
"isBot": false,
"isRelay": false,
"isHosting": true,
"blacklisted": false
},
"custom_rules_applied": {
"total": 0,
"rules": []
}
},
"status": "success",
"executionTime": 4
}