Complete reference for integrating IP geolocation and threat intelligence into your applications.
Get up and running with IPFly API in minutes. Make your first request with the example below.
All API requests require authentication using your API token. Include it as a query parameter in your requests. You can query your IP address without entering it. This will return information about your current IP and connection.
Request to obtain currently connected IPv4/IPv6 of your client:
Request to obtain information from specified IPv4/IPv6:
You can get your API token by signing up for a free account. The token should be kept secure and not shared publicly.
Make HTTP GET requests to our API endpoint with the required parameters.
| Parameter | Type | Required | Description |
|---|---|---|---|
token |
string | Yes | Your API authentication token |
ip |
string | No | IP address to lookup (IPv4 or IPv6) |
These fields are returned at the root level of the API response and contain core information about the IP address being queried.
| Field | Type | Description | Required |
|---|---|---|---|
ip |
string | IP address that is used to lookup geolocation information. | Required |
hostname |
string | Hostname of the IP address used to query ipfly API. | Required |
country_code2 |
string | Country code (ISO 3166-1 alpha-2) of the country. | Required |
country_code3 |
string | Country code (ISO 3166-1 alpha-3) of the country. | Required |
country_name |
string | Common name of the country. | Required |
country_capital |
string | Capital city of the country. | Required |
country_emoji |
string | Flag emoji representing the country of the IP address. | Required |
calling_code |
string | International calling code for the country. | Required |
country_tld |
string | Country code top-level domain (e.g., .us for United States). | Required |
languages |
string | Official languages spoken in the country. | Required |
Detailed geographic information about the IP address location including continent, country, and city-level data.
| Field | Type | Description | Required |
|---|---|---|---|
state_prov |
string | Name of the state/province/region. | Optional |
city |
string | Name of the city. | Optional |
zipcode |
string | ZIP/Postal code of the location. | Optional |
latitude |
string | Latitude coordinate of the location. | Required |
longitude |
string | Longitude coordinate of the location. | Required |
is_eu |
boolean | Indicates if the country belongs to the European Union. | Required |
Autonomous System Number information including network details and organization.
| Field | Type | Description | Required |
|---|---|---|---|
asn.asn |
string | Autonomous System Number associated with the IP. | Required |
asn.name |
string | Name of the organization that owns the ASN. | Required |
asn.domain |
string | Domain associated with the organization. | Required |
asn.route |
string | IP address range associated with the ASN. | Required |
asn.type |
string | Type of network (e.g., hosting, isp, business). | Required |
Information about the official currency used in the country of the IP address.
| Field | Type | Description | Required |
|---|---|---|---|
currency.code |
string | 3-letter currency code (ISO 4217). | Required |
currency.name |
string | Full name of the currency. | Required |
currency.symbol |
string | Currency symbol used in the country. | Required |
Information about the company or organization associated with the IP address.
| Field | Type | Description | Required |
|---|---|---|---|
company.name |
string | Name of the company or organization. | Required |
company.domain |
string | Domain associated with the company. | Required |
company.type |
string | Type of business or service. | Required |
Comprehensive time zone information including current time, offsets, and daylight saving details.
| Field | Type | Description | Required |
|---|---|---|---|
time_zone.name |
string | IANA time zone name (e.g., "America/New_York"). | Required |
time_zone.offset |
integer | UTC offset in hours. | Required |
time_zone.offset_with_dst |
integer | UTC offset including daylight saving time. | Required |
time_zone.current_time |
string | Current local time in ISO format. | Required |
time_zone.current_time_unix |
float | Current local time as Unix timestamp. | Required |
time_zone.current_tz_abbreviation |
string | Current time zone abbreviation. | Required |
time_zone.current_tz_full_name |
string | Current time zone full name. | Required |
time_zone.is_dst |
boolean | Indicates if daylight saving time is currently active. | Required |
Security assessment and threat intelligence data for the IP address.
| Field | Type | Description | Required |
|---|---|---|---|
security.is_tor |
boolean | Indicates if the IP is a Tor exit node. | Required |
security.is_proxy |
boolean | Indicates if the IP is a proxy server. | Required |
security.is_vpn |
boolean | Indicates if the IP is a VPN server. | Required |
security.is_relay |
boolean | Indicates if the IP is a network relay. | Required |
security.is_cloud_provider |
boolean | Indicates if the IP belongs to a cloud provider. | Required |
security.proxy_type |
string | Type of proxy if applicable. | Optional |
Integrate IPFly API into your application with these code examples.