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:
Request to obtain information from hostname or domain name:
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 |
domain |
string | Domain name that is used to lookup geolocation information. It is not returned if an IP address is used to query ipfly API. | Optional |
hostname |
string | Hostname of the IP address used to query ipfly API. | Required |
geoname_id |
string | Unique identifier from GeoNames geographical database. | 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., .au for Australia). | Required |
languages |
string | Official languages spoken in the country. | Required |
isp |
string | Internet Service Provider associated with the IP address. | Required |
connection_type |
string | Type of internet connection (e.g., broadband, cellular). | Optional |
organization |
string | Organization that owns the IP address range. | Required |
asn |
string | Autonomous System Number associated with the IP. | Required |
Detailed geographic information about the IP address location including continent, country, and city-level data.
Field | Type | Description | Required |
---|---|---|---|
continent_code |
string | 2-letter code of the continent (e.g., OC for Oceania). | Required |
continent_name |
string | Full name of the continent. | 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_name_official |
string | Official name (ISO 3166) of the country. | Required |
country_capital |
string | Capital city of the country. | Required |
state_prov |
string | Name of the state/province/region. | Optional |
state_code |
string | Code of the state/province/region. | Optional |
district |
string | Name of the district or county. | 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 |
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 |
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., "Australia/Brisbane"). | 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.standard_tz_abbreviation |
string | Standard time zone abbreviation (without DST). | Required |
time_zone.standard_tz_full_name |
string | Standard time zone full name (without DST). | Required |
time_zone.is_dst |
boolean | Indicates if daylight saving time is currently active. | Required |
time_zone.dst_savings |
integer | Daylight saving time offset in hours. | Required |
time_zone.dst_exists |
boolean | Indicates if the location observes daylight saving time. | Required |
time_zone.dst_tz_abbreviation |
string | Daylight saving time zone abbreviation. | Optional |
time_zone.dst_tz_full_name |
string | Daylight saving time zone full name. | Optional |
time_zone.dst_start |
string | Date and time when daylight saving time starts. | Optional |
time_zone.dst_end |
string | Date and time when daylight saving time ends. | Optional |
Security assessment and threat intelligence data for the IP address.
Field | Type | Description | Required |
---|---|---|---|
security.threat_score |
integer | Overall threat score from 0 (low risk) to 100 (high risk). | 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.proxy_type |
string | Type of proxy if applicable (e.g., VPN, web proxy). | Optional |
security.is_anonymous |
boolean | Indicates if the IP provides anonymity services. | Required |
security.is_known_attacker |
boolean | Indicates if the IP is associated with known attacks. | Required |
security.is_spam |
boolean | Indicates if the IP is associated with spam activities. | Required |
security.is_bot |
boolean | Indicates if the IP is associated with bot activities. | Required |
security.is_cloud_provider |
boolean | Indicates if the IP belongs to a cloud provider. | Required |
Integrate IPFly API into your application with these code examples.