This Fetch Geolocation Information by IP API provides fast and reliable insights from any IP address, delivering detailed location and network information in a single request. By simply passing an IP address, the API returns structured JSON data including country, region, city, geographic coordinates (latitude and longitude), and continent details, making it ideal for location-based services and analytics.
Beyond basic geolocation, the API also offers enriched metadata such as postal codes, calling codes, capital city, and neighboring countries. It includes timezone data with UTC offset, daylight saving time status, and timezone identifiers, which is especially useful for scheduling systems, global applications, and time-sensitive services.
One of the key advantages of this API is its network intelligence capabilities. It provides connection-level information such as ASN (Autonomous System Number), ISP (Internet Service Provider), organization name, and associated domain. This makes it highly valuable for cybersecurity, fraud detection, traffic analysis, and user profiling.
The API also identifies whether the IP belongs to the European Union, helping businesses comply with regional regulations such as GDPR. Additionally, it returns country flags in multiple formats, including image URLs and emoji representations, which can be easily integrated into user interfaces.
Enter an IP address and quickly and accurately find the corresponding country.
Country detection - Endpoint Features
| Object | Description |
|---|---|
country |
[Required] |
{"country":"United States"}
curl --location --request GET 'https://zylalabs.com/api/12384/fetch+geolocation+information+by+ip+api/23399/country+detection&country=Required' --header 'Authorization: Bearer YOUR_API_KEY'
Enter an IP address and get comprehensive information, including country, city, coordinates, ISP, ASN, time zone, and detailed metadata
{"ip":"8.8.8.8","success":true,"type":"IPv4","continent":"North America","continent_code":"NA","country":"United States","country_code":"US","region":"California","region_code":"CA","city":"Mountain View","latitude":37.3860517,"longitude":-122.0838511,"is_eu":false,"postal":"94039","calling_code":"1","capital":"Washington D.C.","borders":"CA,MX","flag":{"log":"1","emoji":"\ud83c\uddfa\ud83c\uddf8","emoji_unicode":"U+1F1FA U+1F1F8"},"connection":{"asn":15169,"org":"Google LLC","isp":"Google LLC","domain":"google.com"},"timezone":{"id":"America/Los_Angeles","abbr":"PDT","is_dst":true,"offset":-25200,"utc":"-07:00"}}
curl --location --request GET 'https://zylalabs.com/api/12384/fetch+geolocation+information+by+ip+api/23404/ip+details&ip=Required' --header 'Authorization: Bearer YOUR_API_KEY'
| Header | Description |
|---|---|
Authorization
|
[Required] Should be Bearer access_key. See "Your API Access Key" above when you are subscribed. |
No long-term commitment. Upgrade, downgrade, or cancel anytime. Free Trial includes up to 50 requests.
The "GET Country detection" endpoint returns the country associated with the provided IP address. The "GET IP Details" endpoint returns comprehensive data, including country, city, geographic coordinates, ISP, ASN, timezone, and enriched metadata like postal codes and calling codes.
Key fields in the "GET IP Details" response include "ip," "country," "region," "city," "latitude," "longitude," "isp," "asn," "timezone," and "flag." Each field provides specific insights about the IP address's location and network details.
The response data is structured in JSON format, with key-value pairs for easy parsing. For example, the "connection" field contains nested data about the ISP and ASN, while "timezone" includes details like UTC offset and daylight saving status.
The "GET Country detection" endpoint provides the country name, while the "GET IP Details" endpoint offers detailed information, including city, coordinates, ISP, ASN, timezone, postal code, and whether the IP is from the EU.
Data accuracy is maintained through regular updates and quality checks from multiple reliable sources, ensuring that the geolocation information is current and precise for various IP addresses.
Typical use cases include location-based services, user profiling, fraud detection, traffic analysis, and compliance with regulations like GDPR. Businesses can enhance user experiences and optimize services based on geolocation insights.
Users can customize requests by specifying the desired IP address in the endpoint URL. The API processes this input to return tailored geolocation and network information relevant to that specific IP.
Standard data patterns include consistent field names across responses, such as "country" and "city," and structured metadata like "timezone" and "connection." Users can expect reliable and organized data for various IP addresses.
To obtain your API key, you first need to sign in to your account and subscribe to the API you want to use. Once subscribed, go to your Profile, open the Subscription section, and select the specific API. Your API key will be available there and can be used to authenticate your requests.
You can’t switch APIs during the free trial. If you subscribe to a different API, your trial will end and the new subscription will start as a paid plan.
If you don’t cancel before the 7th day, your free trial will end automatically and your subscription will switch to a paid plan under the same plan you originally subscribed to, meaning you will be charged and gain access to the API calls included in that plan.
The free trial ends when you reach 50 API requests or after 7 days, whichever comes first.
No, the free trial is available only once, so we recommend using it on the API that interests you the most. Most of our APIs offer a free trial, but some may not include this option.
Yes, we offer a 7-day free trial that allows you to make up to 50 API calls at no cost, so you can test our APIs without any commitment.
Zyla API Hub is like a big store for APIs, where you can find thousands of them all in one place. We also offer dedicated support and real-time monitoring of all APIs. Once you sign up, you can pick and choose which APIs you want to use. Just remember, each API needs its own subscription. But if you subscribe to multiple ones, you'll use the same key for all of them, making things easier for you.
Service Level:
100%
Response Time:
2,379ms
Service Level:
100%
Response Time:
819ms
Service Level:
100%
Response Time:
2,283ms
Service Level:
100%
Response Time:
28ms
Service Level:
100%
Response Time:
0ms
Service Level:
100%
Response Time:
0ms
Service Level:
100%
Response Time:
861ms
Service Level:
100%
Response Time:
449ms
Service Level:
100%
Response Time:
931ms
Service Level:
100%
Response Time:
2,552ms
Service Level:
100%
Response Time:
404ms
Service Level:
100%
Response Time:
718ms
Service Level:
100%
Response Time:
331ms
Service Level:
100%
Response Time:
191ms
Service Level:
100%
Response Time:
309ms
Service Level:
100%
Response Time:
264ms
Service Level:
100%
Response Time:
768ms
Service Level:
100%
Response Time:
418ms
Service Level:
100%
Response Time:
1,043ms
Service Level:
100%
Response Time:
62ms