ip-api.com

App · Utilities · 11 actions

Find out where an IP address is and who runs it, from ip-api.com's free geolocation service. Locate one address, a domain name, a list of addresses, or the address this workflow itself calls out from. Check whether a visitor is in a country you serve, whether they are behind a VPN or calling from a data center, what time it is where they are, and how far away they are. Screen up to 100 addresses at once for VPNs, data centers and countries you don't serve, or count which countries and providers they come from. No account or API key required.

Actions

ActionWhat it does
Check an IP address for proxy, VPN or hostingReport what kind of connection an address is on: a proxy, VPN or Tor exit node, a data center, or a mobile network.
Check an IP address's countryAnswer whether an address is in one of the countries you name - the check behind sending someone to the right regional site, gating a feature by market, or flagging a sign-up from outside the countries you sell in.
Check whether an IP address can be locatedAnswer whether an address can be located at all, and say why not when it cannot: a typo, a private address from inside a local network, or a reserved one such as a loopback.
Get an IP address's network operatorGet who runs an address: the internet provider, the organization it is registered to, and its autonomous system, split into the number and the name so either can be matched on.
Get an IP address's time zoneGet the time zone an address sits in and the time there right now, so a message goes out in someone's working hours rather than the middle of their night.
Look up an IP addressGeolocate an IP address or a domain name: the country, region and city it is in, its coordinates and time zone, the provider that runs it, and whether it is a proxy, a data center or a mobile network.
Look up several IP addressesGeolocate a list of addresses in one step - a column of sign-up addresses, the addresses in a log - and get a row for each with where it is and who runs it.
Look up this workflow's IP addressLook up the address this workflow's requests go out from, and where it is.
Measure the distance to an IP addressMeasure how far an address is from a point you name, in kilometers and miles - which office, store or region a visitor is nearest.
Screen several IP addressesCheck a list of up to 100 IP addresses in one request, such as the day's sign-ups or the addresses in a log, and flag each one that is a proxy, VPN or Tor exit node, sits in a data center, is outside the countries you allow, or is in a country you block.
Summarize several IP addressesLook up a list of up to 100 IP addresses in one request and count them: how many are in each country, which internet providers they come from, and how many are proxies, data centers or mobile networks.

Check an IP address for proxy, VPN or hosting

Report what kind of connection an address is on: a proxy, VPN or Tor exit node, a data center, or a mobile network. Flags the first two together, which is the usual signal that a sign-up or a form submission is not coming from where it claims to be. Being on a phone network is reported but never flagged.

Inputs

IP address or domainip_addresstextRequired
The IPv4 address, IPv6 address or domain name to look up. A domain is resolved by ip-api and the address it resolves to is what gets located. A whole URL is accepted too: only its host is used.

Outputs

as_nametext
The AS's short registry name, e.g. 'VIDEOTRON'. Empty for address blocks not announced in BGP.
countrytext
The country's name, e.g. 'Canada', in the language that was asked for.
country_codetext
The country's ISO 3166-1 alpha-2 code, e.g. 'CA'. The same in every language, so this is what to branch on.
flaggedtrue/false
True when the address is a proxy or VPN, or sits in a data center.
flagslist
Which of those applied: 'proxy', 'hosting', or both.
hostingtrue/false
True for an address in a data center or hosting provider, which is what a server or a bot usually calls from. Null when ip-api reported nothing.
iptext
The IP address ip-api located. The same as what was asked for, unless a domain name was: then it is the address that domain resolves to.
isptext
The internet provider serving the address.
location_labeltext
The place in one line, e.g. 'Montreal, Quebec, Canada', ready to put in a message.
mobiletrue/false
True for a cellular connection. Null when ip-api reported nothing, which is not the same as false.
organizationtext
The organization the address is registered to, which is often the business behind it rather than the provider.
proxytrue/false
True for a proxy, a VPN or a Tor exit node. Null when ip-api reported nothing, which is not the same as false.
querytext
What this step looked up, exactly as it was given: an address, a domain name, or empty for this server's own address.
summarytext
The same finding in a sentence.
Example output
{
  "as_name": "VIDEOTRON",
  "country": "Canada",
  "country_code": "CA",
  "flagged": false,
  "flags": [],
  "hosting": false,
  "ip": "24.48.0.1",
  "isp": "Le Groupe Videotron Ltee",
  "location_label": "Montreal, Quebec, Canada",
  "mobile": false,
  "organization": "Videotron Ltee",
  "proxy": false,
  "query": "24.48.0.1",
  "summary": "This address looks like an ordinary consumer connection."
}

Check an IP address's country

Answer whether an address is in one of the countries you name - the check behind sending someone to the right regional site, gating a feature by market, or flagging a sign-up from outside the countries you sell in. Answers with a plain true or false to branch on, plus where the address actually is.

Inputs

IP address or domainip_addresstextRequired
The IPv4 address, IPv6 address or domain name to look up. A domain is resolved by ip-api and the address it resolves to is what gets located. A whole URL is accepted too: only its host is used.
CountriescountrieslistRequired
The countries to test the address against. Pick from the list, or pass country names or two-letter codes from an earlier step: either is matched.One or more of: AF (Afghanistan), AL (Albania), DZ (Algeria), AD (Andorra), AO (Angola), AI (Anguilla), AQ (Antarctica), AG (Antigua & Barbuda), AR (Argentina), AM (Armenia), and 239 more.

Outputs

citytext
The city, e.g. 'Montreal'.
continenttext
The continent's name, e.g. 'North America'.
continent_codetext
The continent's two-letter code, e.g. 'NA'.
countrieslist
The countries that were tested against.
countrytext
The country's name, e.g. 'Canada', in the language that was asked for.
country_codetext
The country's ISO 3166-1 alpha-2 code, e.g. 'CA'. The same in every language, so this is what to branch on.
iptext
The IP address ip-api located. The same as what was asked for, unless a domain name was: then it is the address that domain resolves to.
location_labeltext
The place in one line, e.g. 'Montreal, Quebec, Canada', ready to put in a message.
matchedtrue/false
True when the address is in one of the countries named.
matched_countrytext
Which of them it matched, written the way it was given. Empty when none matched.
querytext
What this step looked up, exactly as it was given: an address, a domain name, or empty for this server's own address.
regiontext
The region or state's name, e.g. 'Quebec'.
Example output
{
  "city": "Montreal",
  "continent": "North America",
  "continent_code": "NA",
  "countries": [
    "CA",
    "US"
  ],
  "country": "Canada",
  "country_code": "CA",
  "ip": "24.48.0.1",
  "location_label": "Montreal, Quebec, Canada",
  "matched": true,
  "matched_country": "CA",
  "query": "24.48.0.1",
  "region": "Quebec"
}

Check whether an IP address can be located

Answer whether an address can be located at all, and say why not when it cannot: a typo, a private address from inside a local network, or a reserved one such as a loopback. It answers no rather than failing, so it is what to branch on before spending a step on an address someone typed in.

Inputs

IP address or domainip_addresstextRequired
The IPv4 address, IPv6 address or domain name to look up. A domain is resolved by ip-api and the address it resolves to is what gets located. A whole URL is accepted too: only its host is used.

Outputs

citytext
The city, e.g. 'Montreal'.
countrytext
The country's name, e.g. 'Canada', in the language that was asked for.
country_codetext
The country's ISO 3166-1 alpha-2 code, e.g. 'CA'. The same in every language, so this is what to branch on.
explanationtext
The same reason written out, ready to show someone who typed the address in. Empty when it was located.
iptext
The IP address ip-api located. The same as what was asked for, unless a domain name was: then it is the address that domain resolves to.
kindtext
What was asked about: 'ipv4', 'ipv6' or 'domain'.
locatedtrue/false
Whether ip-api could locate the address at all.
location_labeltext
The place in one line, e.g. 'Montreal, Quebec, Canada', ready to put in a message.
querytext
What this step looked up, exactly as it was given: an address, a domain name, or empty for this server's own address.
reasontext
Why it could not be located, in ip-api's own words: 'invalid query', 'private range' or 'reserved range'. Empty when it was located.
Example output
{
  "city": "",
  "country": "",
  "country_code": "",
  "explanation": "That is a private address (10.x.x.x, 172.16-31.x.x, 192.168.x.x or fc00::/7). It only exists inside a local network, so it has no public location. Public traffic arrives from the network's own public address instead.",
  "ip": "",
  "kind": "ipv4",
  "located": false,
  "location_label": "",
  "query": "192.168.1.1",
  "reason": "private range"
}

Get an IP address's network operator

Get who runs an address: the internet provider, the organization it is registered to, and its autonomous system, split into the number and the name so either can be matched on. Ask for reverse DNS as well to see the host name it points back to, which is how a crawler proves it is who it says.

Inputs

IP address or domainip_addresstextRequired
The IPv4 address, IPv6 address or domain name to look up. A domain is resolved by ip-api and the address it resolves to is what gets located. A whole URL is accepted too: only its host is used.
Look up reverse DNSinclude_reverse_dnstrue/false
Also return the host name the address points back to, e.g. 'wi-in-f94.1e100.net'. Off by default because ip-api warns that this lookup can make the request take noticeably longer.Default: false.

Outputs

as_nametext
The AS's short registry name, e.g. 'VIDEOTRON'. Empty for address blocks not announced in BGP.
as_numbernumber
Just the AS number, as a number, e.g. 5769. Null when there is none.
as_organizationtext
Just the organization half of the same field.
autonomous_systemtext
The autonomous system as ip-api writes it, e.g. 'AS5769 Videotron Ltee'. Empty for address blocks not announced in BGP.
countrytext
The country's name, e.g. 'Canada', in the language that was asked for.
country_codetext
The country's ISO 3166-1 alpha-2 code, e.g. 'CA'. The same in every language, so this is what to branch on.
hostingtrue/false
True for an address in a data center or hosting provider, which is what a server or a bot usually calls from. Null when ip-api reported nothing.
iptext
The IP address ip-api located. The same as what was asked for, unless a domain name was: then it is the address that domain resolves to.
isptext
The internet provider serving the address.
location_labeltext
The place in one line, e.g. 'Montreal, Quebec, Canada', ready to put in a message.
mobiletrue/false
True for a cellular connection. Null when ip-api reported nothing, which is not the same as false.
organizationtext
The organization the address is registered to, which is often the business behind it rather than the provider.
proxytrue/false
True for a proxy, a VPN or a Tor exit node. Null when ip-api reported nothing, which is not the same as false.
querytext
What this step looked up, exactly as it was given: an address, a domain name, or empty for this server's own address.
reverse_dnstext
The host name the address points back to. Empty unless the step asked for it, since that lookup is slower.
Example output
{
  "as_name": "VIDEOTRON",
  "as_number": 5769,
  "as_organization": "Videotron Ltee",
  "autonomous_system": "AS5769 Videotron Ltee",
  "country": "Canada",
  "country_code": "CA",
  "hosting": false,
  "ip": "24.48.0.1",
  "isp": "Le Groupe Videotron Ltee",
  "location_label": "Montreal, Quebec, Canada",
  "mobile": false,
  "organization": "Videotron Ltee",
  "proxy": false,
  "query": "24.48.0.1",
  "reverse_dns": "modemcable001.0-48-24.mc.videotron.ca"
}

Get an IP address's time zone

Get the time zone an address sits in and the time there right now, so a message goes out in someone's working hours rather than the middle of their night. The offset already has daylight saving applied. The country's currency comes with it.

Inputs

IP address or domainip_addresstextRequired
The IPv4 address, IPv6 address or domain name to look up. A domain is resolved by ip-api and the address it resolves to is what gets located. A whole URL is accepted too: only its host is used.

Outputs

citytext
The city, e.g. 'Montreal'.
countrytext
The country's name, e.g. 'Canada', in the language that was asked for.
country_codetext
The country's ISO 3166-1 alpha-2 code, e.g. 'CA'. The same in every language, so this is what to branch on.
currencytext
The country's currency code, e.g. 'CAD'.
iptext
The IP address ip-api located. The same as what was asked for, unless a domain name was: then it is the address that domain resolves to.
local_timetext
The time it is at that address right now, e.g. '2026-08-24T15:22:04-04:00'.
location_labeltext
The place in one line, e.g. 'Montreal, Quebec, Canada', ready to put in a message.
querytext
What this step looked up, exactly as it was given: an address, a domain name, or empty for this server's own address.
timezonetext
The IANA time zone, e.g. 'America/Toronto'.
utc_offsettext
The same offset written the usual way, e.g. '-04:00'.
utc_offset_secondsnumber
How far the time zone is from UTC in seconds right now, daylight saving already applied, e.g. -14400.
utc_timetext
The same moment in UTC, for comparison.
Example output
{
  "city": "Montreal",
  "country": "Canada",
  "country_code": "CA",
  "currency": "CAD",
  "ip": "24.48.0.1",
  "local_time": "2026-08-24T15:22:04-04:00",
  "location_label": "Montreal, Quebec, Canada",
  "query": "24.48.0.1",
  "timezone": "America/Toronto",
  "utc_offset": "-04:00",
  "utc_offset_seconds": -14400,
  "utc_time": "2026-08-24T19:22:04Z"
}

Look up an IP address

Geolocate an IP address or a domain name: the country, region and city it is in, its coordinates and time zone, the provider that runs it, and whether it is a proxy, a data center or a mobile network. Give it a domain and ip-api resolves it first, then locates the address behind it. No API key required.

Inputs

IP address or domainip_addresstextRequired
The IPv4 address, IPv6 address or domain name to look up. A domain is resolved by ip-api and the address it resolves to is what gets located. A whole URL is accepted too: only its host is used.
Languagelanguagetext
The language to return the city, region, country and continent names in. English by default. Codes such as the two-letter country code are the same in every language.One of: en (English), de (German (Deutsch)), es (Spanish (Espanol)), pt-BR (Portuguese, Brazil (Portugues)), fr (French (Francais)), ja (Japanese), zh-CN (Chinese, simplified), ru (Russian). Default: en.
Look up reverse DNSinclude_reverse_dnstrue/false
Also return the host name the address points back to, e.g. 'wi-in-f94.1e100.net'. Off by default because ip-api warns that this lookup can make the request take noticeably longer.Default: false.

Outputs

as_nametext
The AS's short registry name, e.g. 'VIDEOTRON'. Empty for address blocks not announced in BGP.
as_numbernumber
Just the AS number, as a number, e.g. 5769. Null when there is none.
as_organizationtext
Just the organization half of the same field.
autonomous_systemtext
The autonomous system as ip-api writes it, e.g. 'AS5769 Videotron Ltee'. Empty for address blocks not announced in BGP.
citytext
The city, e.g. 'Montreal'.
continenttext
The continent's name, e.g. 'North America'.
continent_codetext
The continent's two-letter code, e.g. 'NA'.
countrytext
The country's name, e.g. 'Canada', in the language that was asked for.
country_codetext
The country's ISO 3166-1 alpha-2 code, e.g. 'CA'. The same in every language, so this is what to branch on.
currencytext
The country's currency code, e.g. 'CAD'.
districttext
The district within the city, where one is known. Empty for most addresses.
hostingtrue/false
True for an address in a data center or hosting provider, which is what a server or a bot usually calls from. Null when ip-api reported nothing.
iptext
The IP address ip-api located. The same as what was asked for, unless a domain name was: then it is the address that domain resolves to.
isptext
The internet provider serving the address.
kindtext
Whether the located address is 'ipv4' or 'ipv6'.
latitudenumber
The latitude of the area the address is in. It locates the network, not a person: treat it as a neighborhood, not a street address.
location_labeltext
The place in one line, e.g. 'Montreal, Quebec, Canada', ready to put in a message.
longitudenumber
The longitude of the area the address is in.
map_urltext
A link showing the located point on OpenStreetMap.
mobiletrue/false
True for a cellular connection. Null when ip-api reported nothing, which is not the same as false.
organizationtext
The organization the address is registered to, which is often the business behind it rather than the provider.
postal_codetext
The postal or zip code, e.g. 'H1K'. Often only the first part of one, since an address covers an area.
proxytrue/false
True for a proxy, a VPN or a Tor exit node. Null when ip-api reported nothing, which is not the same as false.
querytext
What this step looked up, exactly as it was given: an address, a domain name, or empty for this server's own address.
regiontext
The region or state's name, e.g. 'Quebec'.
region_codetext
The region or state's short code, e.g. 'QC'. FIPS or ISO depending on the country, and sometimes a number.
reverse_dnstext
The host name the address points back to. Empty unless the step asked for it, since that lookup is slower.
timezonetext
The IANA time zone, e.g. 'America/Toronto'.
utc_offsettext
The same offset written the usual way, e.g. '-04:00'.
utc_offset_secondsnumber
How far the time zone is from UTC in seconds right now, daylight saving already applied, e.g. -14400.
Example output
{
  "as_name": "VIDEOTRON",
  "as_number": 5769,
  "as_organization": "Videotron Ltee",
  "autonomous_system": "AS5769 Videotron Ltee",
  "city": "Montreal",
  "continent": "North America",
  "continent_code": "NA",
  "country": "Canada",
  "country_code": "CA",
  "currency": "CAD",
  "district": "",
  "hosting": false,
  "ip": "24.48.0.1",
  "isp": "Le Groupe Videotron Ltee",
  "kind": "ipv4",
  "latitude": 45.6085,
  "location_label": "Montreal, Quebec, Canada",
  "longitude": -73.5493,
  "map_url": "https://www.openstreetmap.org/?mlat=45.6085&mlon=-73.5493#map=10/45.6085/-73.5493",
  "mobile": false,
  "organization": "Videotron Ltee",
  "postal_code": "H1K",
  "proxy": false,
  "query": "24.48.0.1",
  "region": "Quebec",
  "region_code": "QC",
  "reverse_dns": "",
  "timezone": "America/Toronto",
  "utc_offset": "-04:00",
  "utc_offset_seconds": -14400
}

Look up several IP addresses

Geolocate a list of addresses in one step - a column of sign-up addresses, the addresses in a log - and get a row for each with where it is and who runs it. Addresses that cannot be located are reported alongside the ones that can, so one private address in the list does not fail the step.

Inputs

IP addresses or domainsip_addresseslistRequired
The addresses to look up, as a list or separated by commas. At most 25 in one step: each one is a separate request against ip-api's free allowance of 45 a minute, which every workflow in this workspace shares. Repeats are looked up once.
Languagelanguagetext
The language to return the city, region, country and continent names in. English by default. Codes such as the two-letter country code are the same in every language.One of: en (English), de (German (Deutsch)), es (Spanish (Espanol)), pt-BR (Portuguese, Brazil (Portugues)), fr (French (Francais)), ja (Japanese), zh-CN (Chinese, simplified), ru (Russian). Default: en.

Outputs

countnumber
How many addresses were asked about.
failedlist
The addresses ip-api refused.
failed_countnumber
How many ip-api refused - private, reserved or unreadable.
locatedlist
The addresses that were located.
located_countnumber
How many of them were located.
not_checkedlist
The addresses left untried. Run the step again for these once the allowance resets.
not_checked_countnumber
How many were left untried because the minute's allowance ran out mid-list.
requests_madenumber
How many requests this step made to ip-api.
requests_remainingnumber
How many lookups ip-api says are left in the current minute, from its X-Rl header. Null if it did not say.
resultslist
One row per address that was tried, in the order given.
seconds_until_resetnumber
How many seconds until that allowance resets, from ip-api's X-Ttl header. Null if it did not say.
Example output
{
  "count": 2,
  "failed": [
    "192.168.1.1"
  ],
  "failed_count": 1,
  "located": [
    "24.48.0.1"
  ],
  "located_count": 1,
  "not_checked": [],
  "not_checked_count": 0,
  "requests_made": 2,
  "requests_remaining": 43,
  "results": [
    {
      "city": "Montreal",
      "country": "Canada",
      "country_code": "CA",
      "hosting": false,
      "ip": "24.48.0.1",
      "isp": "Le Groupe Videotron Ltee",
      "latitude": 45.6085,
      "located": true,
      "location_label": "Montreal, Quebec, Canada",
      "longitude": -73.5493,
      "mobile": false,
      "proxy": false,
      "query": "24.48.0.1",
      "reason": "",
      "region": "Quebec",
      "timezone": "America/Toronto"
    },
    {
      "city": "",
      "country": "",
      "country_code": "",
      "hosting": null,
      "ip": "",
      "isp": "",
      "latitude": null,
      "located": false,
      "location_label": "",
      "longitude": null,
      "mobile": null,
      "proxy": null,
      "query": "192.168.1.1",
      "reason": "private range",
      "region": "",
      "timezone": ""
    }
  ],
  "seconds_until_reset": 58
}

Look up this workflow's IP address

Look up the address this workflow's requests go out from, and where it is. That is Lodol's own outbound address, not the address of whoever is watching the workflow, which is what you need when a third-party API asks you to allow-list the address your calls arrive from.

Inputs

Languagelanguagetext
The language to return the city, region, country and continent names in. English by default. Codes such as the two-letter country code are the same in every language.One of: en (English), de (German (Deutsch)), es (Spanish (Espanol)), pt-BR (Portuguese, Brazil (Portugues)), fr (French (Francais)), ja (Japanese), zh-CN (Chinese, simplified), ru (Russian). Default: en.
Look up reverse DNSinclude_reverse_dnstrue/false
Also return the host name the address points back to, e.g. 'wi-in-f94.1e100.net'. Off by default because ip-api warns that this lookup can make the request take noticeably longer.Default: false.

Outputs

as_nametext
The AS's short registry name, e.g. 'VIDEOTRON'. Empty for address blocks not announced in BGP.
as_numbernumber
Just the AS number, as a number, e.g. 5769. Null when there is none.
as_organizationtext
Just the organization half of the same field.
autonomous_systemtext
The autonomous system as ip-api writes it, e.g. 'AS5769 Videotron Ltee'. Empty for address blocks not announced in BGP.
citytext
The city, e.g. 'Montreal'.
continenttext
The continent's name, e.g. 'North America'.
continent_codetext
The continent's two-letter code, e.g. 'NA'.
countrytext
The country's name, e.g. 'Canada', in the language that was asked for.
country_codetext
The country's ISO 3166-1 alpha-2 code, e.g. 'CA'. The same in every language, so this is what to branch on.
currencytext
The country's currency code, e.g. 'CAD'.
districttext
The district within the city, where one is known. Empty for most addresses.
hostingtrue/false
True for an address in a data center or hosting provider, which is what a server or a bot usually calls from. Null when ip-api reported nothing.
iptext
The IP address ip-api located. The same as what was asked for, unless a domain name was: then it is the address that domain resolves to.
isptext
The internet provider serving the address.
kindtext
Whether the located address is 'ipv4' or 'ipv6'.
latitudenumber
The latitude of the area the address is in. It locates the network, not a person: treat it as a neighborhood, not a street address.
location_labeltext
The place in one line, e.g. 'Montreal, Quebec, Canada', ready to put in a message.
longitudenumber
The longitude of the area the address is in.
map_urltext
A link showing the located point on OpenStreetMap.
mobiletrue/false
True for a cellular connection. Null when ip-api reported nothing, which is not the same as false.
organizationtext
The organization the address is registered to, which is often the business behind it rather than the provider.
postal_codetext
The postal or zip code, e.g. 'H1K'. Often only the first part of one, since an address covers an area.
proxytrue/false
True for a proxy, a VPN or a Tor exit node. Null when ip-api reported nothing, which is not the same as false.
querytext
What this step looked up, exactly as it was given: an address, a domain name, or empty for this server's own address.
regiontext
The region or state's name, e.g. 'Quebec'.
region_codetext
The region or state's short code, e.g. 'QC'. FIPS or ISO depending on the country, and sometimes a number.
reverse_dnstext
The host name the address points back to. Empty unless the step asked for it, since that lookup is slower.
timezonetext
The IANA time zone, e.g. 'America/Toronto'.
utc_offsettext
The same offset written the usual way, e.g. '-04:00'.
utc_offset_secondsnumber
How far the time zone is from UTC in seconds right now, daylight saving already applied, e.g. -14400.
Example output
{
  "as_name": "VIDEOTRON",
  "as_number": 5769,
  "as_organization": "Videotron Ltee",
  "autonomous_system": "AS5769 Videotron Ltee",
  "city": "Montreal",
  "continent": "North America",
  "continent_code": "NA",
  "country": "Canada",
  "country_code": "CA",
  "currency": "CAD",
  "district": "",
  "hosting": false,
  "ip": "24.48.0.1",
  "isp": "Le Groupe Videotron Ltee",
  "kind": "ipv4",
  "latitude": 45.6085,
  "location_label": "Montreal, Quebec, Canada",
  "longitude": -73.5493,
  "map_url": "https://www.openstreetmap.org/?mlat=45.6085&mlon=-73.5493#map=10/45.6085/-73.5493",
  "mobile": false,
  "organization": "Videotron Ltee",
  "postal_code": "H1K",
  "proxy": false,
  "query": "24.48.0.1",
  "region": "Quebec",
  "region_code": "QC",
  "reverse_dns": "",
  "timezone": "America/Toronto",
  "utc_offset": "-04:00",
  "utc_offset_seconds": -14400
}

Measure the distance to an IP address

Measure how far an address is from a point you name, in kilometers and miles - which office, store or region a visitor is nearest. It is a straight line over the globe, not a route, and it measures to the area the address is in rather than to a street.

Inputs

IP address or domainip_addresstextRequired
The IPv4 address, IPv6 address or domain name to look up. A domain is resolved by ip-api and the address it resolves to is what gets located. A whole URL is accepted too: only its host is used.
Latitude to measure fromlatitudenumberRequired
The latitude of the place to measure from, between -90 and 90.From -90 to 90.
Longitude to measure fromlongitudenumberRequired
The longitude of the place to measure from, between -180 and 180.From -180 to 180.

Outputs

citytext
The city, e.g. 'Montreal'.
countrytext
The country's name, e.g. 'Canada', in the language that was asked for.
country_codetext
The country's ISO 3166-1 alpha-2 code, e.g. 'CA'. The same in every language, so this is what to branch on.
distance_kmnumber
The straight-line distance in kilometers, to one decimal place.
distance_milesnumber
The same distance in miles.
from_latitudenumber
The latitude that was measured from.
from_longitudenumber
The longitude that was measured from.
iptext
The IP address ip-api located. The same as what was asked for, unless a domain name was: then it is the address that domain resolves to.
latitudenumber
The latitude of the area the address is in. It locates the network, not a person: treat it as a neighborhood, not a street address.
location_labeltext
The place in one line, e.g. 'Montreal, Quebec, Canada', ready to put in a message.
longitudenumber
The longitude of the area the address is in.
map_urltext
A link showing the located point on OpenStreetMap.
querytext
What this step looked up, exactly as it was given: an address, a domain name, or empty for this server's own address.
timezonetext
The IANA time zone, e.g. 'America/Toronto'.
Example output
{
  "city": "Montreal",
  "country": "Canada",
  "country_code": "CA",
  "distance_km": 545.6,
  "distance_miles": 339.0,
  "from_latitude": 40.7127837,
  "from_longitude": -74.0059413,
  "ip": "24.48.0.1",
  "latitude": 45.6085,
  "location_label": "Montreal, Quebec, Canada",
  "longitude": -73.5493,
  "map_url": "https://www.openstreetmap.org/?mlat=45.6085&mlon=-73.5493#map=10/45.6085/-73.5493",
  "query": "24.48.0.1",
  "timezone": "America/Toronto"
}

Screen several IP addresses

Check a list of up to 100 IP addresses in one request, such as the day's sign-ups or the addresses in a log, and flag each one that is a proxy, VPN or Tor exit node, sits in a data center, is outside the countries you allow, or is in a country you block. The flagged and the clear addresses come back as separate lists, each row saying why, with a yes or no to branch on. Addresses ip-api cannot locate are listed apart rather than flagged. Domain names are not looked up here.

Inputs

IP addressesip_addresseslistRequired
The addresses to check, as a list or separated by commas or new lines. Up to 100, all sent to ip-api in one request, which is allowed 15 times a minute. Repeats are checked once. Anything that is not an IP address, a domain name included, is reported as not located rather than sent, because ip-api does not look names up in a list.
Allowed countriesallowed_countrieslist
Flag any address outside these countries. Leave empty to allow every country. Pick from the list, or pass country names or two-letter codes from an earlier step: either is matched.One or more of: AF (Afghanistan), AL (Albania), DZ (Algeria), AD (Andorra), AO (Angola), AI (Anguilla), AQ (Antarctica), AG (Antigua & Barbuda), AR (Argentina), AM (Armenia), and 239 more.
Blocked countriesblocked_countrieslist
Flag any address in these countries. Leave empty to block none. Names and two-letter codes are matched, as for Allowed countries.One or more of: AF (Afghanistan), AL (Albania), DZ (Algeria), AD (Andorra), AO (Angola), AI (Anguilla), AQ (Antarctica), AG (Antigua & Barbuda), AR (Argentina), AM (Armenia), and 239 more.
Flag data centersflag_hostingtrue/false
Also flag addresses in a data center or hosting provider, which is where bots and scripted sign-ups usually come from. On by default. Turn it off when the addresses are meant to be servers, such as the ones that call your own API.Default: true.

Outputs

allowed_countrieslist
The allowed countries that were checked against. Empty when every country was allowed.
any_flaggedtrue/false
True when at least one address was flagged. Branch on this to stay quiet when the list is clean.
blocked_countrieslist
The blocked countries that were checked against.
clearlist
The addresses that were located and not flagged.
clear_countnumber
How many were located and not flagged.
countnumber
How many entries were checked, repeats counted once.
flaggedlist
The flagged addresses, in the order given.
flagged_countnumber
How many addresses were flagged.
not_locatedlist
The entries ip-api could not locate: private or reserved addresses, and anything that is not an IP address at all.
not_located_countnumber
How many could not be located.
requests_remainingnumber
How many list lookups ip-api says are left in the current minute, from its X-Rl header. It allows 15. Null when nothing was sent, because no entry was an IP address.
resultslist
One row per entry, in the order given.
seconds_until_resetnumber
How many seconds until that allowance resets, from ip-api's X-Ttl header. Null when nothing was sent.
Example output
{
  "allowed_countries": [
    "US",
    "CA"
  ],
  "any_flagged": true,
  "blocked_countries": [],
  "clear": [
    "24.48.0.1"
  ],
  "clear_count": 1,
  "count": 4,
  "flagged": [
    "8.8.8.8",
    "1.1.1.1"
  ],
  "flagged_count": 2,
  "not_located": [
    "192.168.1.1"
  ],
  "not_located_count": 1,
  "requests_remaining": 14,
  "results": [
    {
      "country": "Canada",
      "country_code": "CA",
      "flagged": false,
      "flags": [],
      "hosting": false,
      "ip": "24.48.0.1",
      "isp": "Le Groupe Videotron Ltee",
      "located": true,
      "location_label": "Montreal, Quebec, Canada",
      "mobile": false,
      "proxy": false,
      "query": "24.48.0.1",
      "reason": "",
      "summary": "Clear."
    },
    {
      "country": "United States",
      "country_code": "US",
      "flagged": true,
      "flags": [
        "proxy",
        "hosting"
      ],
      "hosting": true,
      "ip": "8.8.8.8",
      "isp": "Google LLC",
      "located": true,
      "location_label": "Ashburn, Virginia, United States",
      "mobile": false,
      "proxy": true,
      "query": "8.8.8.8",
      "reason": "",
      "summary": "Flagged: a proxy or VPN; in a data center."
    },
    {
      "country": "Australia",
      "country_code": "AU",
      "flagged": true,
      "flags": [
        "hosting",
        "country_not_allowed"
      ],
      "hosting": true,
      "ip": "1.1.1.1",
      "isp": "Cloudflare, Inc",
      "located": true,
      "location_label": "South Brisbane, Queensland, Australia",
      "mobile": false,
      "proxy": false,
      "query": "1.1.1.1",
      "reason": "",
      "summary": "Flagged: in a data center; outside the allowed countries."
    },
    {
      "country": "",
      "country_code": "",
      "flagged": false,
      "flags": [],
      "hosting": null,
      "ip": "",
      "isp": "",
      "located": false,
      "location_label": "",
      "mobile": null,
      "proxy": null,
      "query": "192.168.1.1",
      "reason": "private range",
      "summary": "Not located (private range)."
    }
  ],
  "seconds_until_reset": 60
}

Summarize several IP addresses

Look up a list of up to 100 IP addresses in one request and count them: how many are in each country, which internet providers they come from, and how many are proxies, data centers or mobile networks. It is the weekly 'where did our sign-ups come from?' report, most common first. Domain names are not looked up here.

Inputs

IP addressesip_addresseslistRequired
The addresses to check, as a list or separated by commas or new lines. Up to 100, all sent to ip-api in one request, which is allowed 15 times a minute. Repeats are checked once. Anything that is not an IP address, a domain name included, is reported as not located rather than sent, because ip-api does not look names up in a list.
Languagelanguagetext
The language to return the city, region, country and continent names in. English by default. Codes such as the two-letter country code are the same in every language.One of: en (English), de (German (Deutsch)), es (Spanish (Espanol)), pt-BR (Portuguese, Brazil (Portugues)), fr (French (Francais)), ja (Japanese), zh-CN (Chinese, simplified), ru (Russian). Default: en.

Outputs

countnumber
How many entries were looked up, repeats counted once.
countrieslist
Every country with how many addresses are in it, most first. One country is counted once even when ip-api names it two ways.
country_countnumber
How many different countries they are in.
hosting_countnumber
How many are in a data center or hosting provider.
ispslist
Every internet provider with how many of the addresses it runs, most first.
located_countnumber
How many were located. The counts and shares below are out of these.
mobile_countnumber
How many are on a cellular network.
not_locatedlist
The entries ip-api could not locate: private or reserved addresses, and anything that is not an IP address at all.
not_located_countnumber
How many could not be located.
proxy_countnumber
How many are a proxy, a VPN or a Tor exit node.
requests_remainingnumber
How many list lookups ip-api says are left in the current minute, from its X-Rl header. It allows 15. Null when nothing was sent, because no entry was an IP address.
seconds_until_resetnumber
How many seconds until that allowance resets, from ip-api's X-Ttl header. Null when nothing was sent.
top_countrytext
The country most of them are in, in the language asked for. Empty when none was located.
top_country_codetext
Its two-letter code, the same in every language.
Example output
{
  "count": 5,
  "countries": [
    {
      "count": 2,
      "country": "United States",
      "country_code": "US",
      "percent": 50.0
    },
    {
      "count": 1,
      "country": "Australia",
      "country_code": "AU",
      "percent": 25.0
    },
    {
      "count": 1,
      "country": "Canada",
      "country_code": "CA",
      "percent": 25.0
    }
  ],
  "country_count": 3,
  "hosting_count": 3,
  "isps": [
    {
      "count": 2,
      "isp": "Google LLC",
      "percent": 50.0
    },
    {
      "count": 1,
      "isp": "Cloudflare, Inc",
      "percent": 25.0
    },
    {
      "count": 1,
      "isp": "Le Groupe Videotron Ltee",
      "percent": 25.0
    }
  ],
  "located_count": 4,
  "mobile_count": 0,
  "not_located": [
    "192.168.1.1"
  ],
  "not_located_count": 1,
  "proxy_count": 1,
  "requests_remaining": 14,
  "seconds_until_reset": 60,
  "top_country": "United States",
  "top_country_code": "US"
}

On this page