IP Geolocation Lookup avatar

IP Geolocation Lookup

Pricing

Pay per event

Go to Apify Store
IP Geolocation Lookup

IP Geolocation Lookup

This actor performs IP geolocation lookups for IP addresses and domain names. It resolves domains to IPs, then looks up country, city, region, coordinates, timezone, ISP, and organization. Uses certificate transparency and public APIs.

Pricing

Pay per event

Rating

0.0

(0)

Developer

Stas Persiianenko

Stas Persiianenko

Maintained by Community

Actor stats

0

Bookmarked

4

Total users

2

Monthly active users

an hour ago

Last modified

Categories

Share

Look up IP geolocation for domains and IP addresses. Find country, city, ISP, and coordinates.

What does IP Geolocation Lookup do?

This actor performs IP geolocation lookups for IP addresses and domain names. It resolves domains to IPs, then looks up country, city, region, coordinates, timezone, ISP, and organization for each address. You can pass in a mix of IP addresses and domain names and get structured geolocation data for every target. Uses public geolocation APIs for accurate, up-to-date results.

Who is it for?

  • ๐Ÿ›ก๏ธ Security analysts โ€” geolocating suspicious IPs from access logs and threat feeds
  • ๐Ÿ“Š Marketing analysts โ€” mapping website visitor locations for audience insights
  • ๐Ÿ”ง Network engineers โ€” identifying the geographic origin of network traffic
  • ๐Ÿ“‹ Compliance teams โ€” verifying that traffic originates from permitted regions
  • ๐Ÿ’ผ Fraud investigators โ€” detecting location mismatches in transaction and login data

Use cases

  • Security investigators -- geolocate suspicious IP addresses from server logs or threat intelligence feeds to identify attack origins
  • Compliance teams -- verify that servers and services are hosted in specific countries to meet data residency requirements
  • DevOps engineers -- confirm hosting locations for your infrastructure and verify CDN edge server placement
  • Competitive analysts -- discover where competitor websites are hosted and which ISPs or cloud providers they use
  • Network analysts -- map IP addresses to physical locations for traffic analysis and capacity planning

Why use IP Geolocation Lookup?

  • Domains and IPs accepted -- pass domain names or IP addresses interchangeably; domains are automatically resolved
  • Rich geolocation data -- returns country, region, city, latitude/longitude, timezone, ISP, and organization
  • Batch processing -- look up hundreds of targets in a single run
  • Pay-per-event pricing -- only $0.001 per lookup, keeping costs low for bulk analysis
  • Structured JSON output -- every result is formatted consistently for easy parsing and integration
  • No API keys required -- runs on Apify cloud with built-in geolocation lookups, no third-party API keys to manage

Input parameters

ParameterTypeRequiredDefaultDescription
targetsarray of stringsYes--List of IP addresses or domain names to look up geolocation for. Example: ["8.8.8.8", "google.com"]
{
"targets": [
"8.8.8.8",
"google.com",
"github.com"
]
}

Output example

Each target produces a result object with the following fields:

FieldTypeDescription
querystringThe original input (IP or domain)
ipstringThe resolved IP address
countrystringCountry name
countryCodestringISO 3166-1 alpha-2 country code
regionNamestringRegion or state name
citystringCity name
latnumberLatitude coordinate
lonnumberLongitude coordinate
timezonestringIANA timezone identifier
ispstringInternet Service Provider name
orgstringOrganization name
errorstring/nullError message if the lookup failed
checkedAtstringISO 8601 timestamp of the check
{
"query": "google.com",
"ip": "142.250.80.46",
"country": "United States",
"countryCode": "US",
"regionName": "California",
"city": "Mountain View",
"lat": 37.4056,
"lon": -122.0775,
"timezone": "America/Los_Angeles",
"isp": "Google LLC",
"org": "Google LLC",
"error": null,
"checkedAt": "2026-03-01T12:00:00.000Z"
}

How much does it cost to look up IP geolocation?

EventPriceDescription
Start$0.035One-time per run
IP looked up$0.001Per IP/domain looked up

Example costs:

  • 10 targets: $0.035 + 10 x $0.001 = $0.045
  • 100 targets: $0.035 + 100 x $0.001 = $0.135
  • 1,000 targets: $0.035 + 1,000 x $0.001 = $1.035

How to look up IP geolocation

  1. Go to the IP Geolocation Lookup page on Apify Store.
  2. Click Try for free to open the actor configuration.
  3. Add your IP addresses or domain names to the targets list.
  4. Click Start and wait for the run to finish.
  5. Review the results โ€” each target shows country, city, region, coordinates, timezone, ISP, and organization.
  6. Download your data as JSON, CSV, or Excel, or connect via the Apify API.

Using the Apify API

You can start IP Geolocation Lookup programmatically from your own applications using the Apify API. The following examples show how to run the actor and retrieve results.

Node.js

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_TOKEN' });
const run = await client.actor('automation-lab/ip-geolocation').call({
targets: ['8.8.8.8', 'google.com'],
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);

Python

from apify_client import ApifyClient
client = ApifyClient('YOUR_TOKEN')
run = client.actor('automation-lab/ip-geolocation').call(run_input={
'targets': ['8.8.8.8', 'google.com'],
})
items = client.dataset(run['defaultDatasetId']).list_items().items
print(items)

cURL

curl -X POST "https://api.apify.com/v2/acts/automation-lab~ip-geolocation/runs?token=YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"targets": ["8.8.8.8", "google.com"]}'

Integrations

IP Geolocation Lookup works with all major integration platforms supported by Apify. Connect it to Make (formerly Integromat), Zapier, n8n, or Slack to build automated geolocation workflows. Export results directly to Google Sheets for collaborative mapping or use webhooks to trigger alerts based on geographic location. You can also chain this actor with the IP Address Validator to first validate addresses and then geolocate only the valid public IPs.

Common integration patterns include:

  • Google Sheets -- export geolocation results to a spreadsheet and use the coordinates to create maps
  • Slack -- receive alerts when geolocation runs detect traffic from unexpected countries or regions
  • Zapier / Make -- automatically geolocate IP addresses from server logs or security feeds and route results to your SIEM
  • Webhooks -- receive results via POST request for real-time geographic filtering in your applications

Tips and best practices

  • Pass domains directly -- you do not need to resolve domains to IPs first. The actor handles DNS resolution automatically and returns both the resolved IP and its geolocation.
  • Combine with IP Address Validator -- run the IP Address Validator first to filter out private and invalid addresses, then pass only valid public IPs to this actor for geolocation.
  • Use coordinates for mapping -- the lat and lon fields can be used to plot results on a map for visual geographic analysis of your infrastructure or traffic.
  • Batch your lookups -- running one actor call with many targets is cheaper than many separate runs, since the $0.035 start fee is charged only once.
  • Be aware of CDN IPs -- domains behind CDNs (like Cloudflare) may resolve to edge server IPs that do not reflect the origin server's true location. The geolocation will show the CDN edge location instead.

Use with Claude AI (MCP)

You can connect IP Geolocation Lookup to Claude AI as an MCP tool, enabling Claude to look up geographic locations of IP addresses during conversations.

Setup

Add the Apify MCP server using the Claude CLI:

$claude mcp add apify-ip-geo -- npx -y @anthropic-ai/apify-mcp-server@latest automation-lab/ip-geolocation

Or add it to your Claude Desktop config (claude_desktop_config.json):

{
"mcpServers": {
"apify-ip-geolocation": {
"command": "npx",
"args": ["-y", "@anthropic-ai/apify-mcp-server@latest", "automation-lab/ip-geolocation"],
"env": { "APIFY_TOKEN": "YOUR_TOKEN" }
}
}
}

Example prompts for Claude

  • "Where is IP 8.8.8.8 located?"
  • "Look up geolocation for these IP addresses: 1.1.1.1, 208.67.222.222"
  • "Find the country and ISP for github.com and stackoverflow.com"

Legality

Scraping publicly available data is generally legal according to the US Court of Appeals ruling (HiQ Labs v. LinkedIn). This actor only accesses publicly available information and does not require authentication. Always review and comply with the target website's Terms of Service before scraping. For personal data, ensure compliance with GDPR, CCPA, and other applicable privacy regulations.

FAQ

How accurate is the geolocation data? IP geolocation is generally accurate to the city level for most commercial ISPs. For cloud providers and CDNs, the location typically reflects the data center rather than the end user. Country-level accuracy is above 99% for most providers.

Can I look up private IP addresses? Private IP addresses (e.g., 192.168.x.x, 10.x.x.x) do not have meaningful geolocation data since they are used on internal networks. The actor will return an error or empty location fields for private addresses.

What happens if a domain cannot be resolved? If DNS resolution fails for a domain, the actor returns a result with an error field describing the failure. The IP and location fields will be null. The run continues processing remaining targets.

Can I use the coordinates to plot results on a map? Yes. The lat and lon fields are standard decimal coordinates that work with any mapping service or GIS tool. Export results to Google Sheets and use the coordinates with Google Maps, Mapbox, or any other mapping platform to visualize the geographic distribution of your targets.

What is the difference between ISP and organization? The isp field shows the Internet Service Provider that owns the IP address range (e.g., "Google LLC", "Amazon Technologies"). The org field shows the organization currently using that IP address, which may differ from the ISP if the IP is assigned to a customer or subsidiary.

The geolocation shows the wrong city or country for my IP. IP geolocation databases are approximations. Cloud provider IPs often resolve to data center locations, not end-user locations. CDN IPs (Cloudflare, Akamai) will show edge server locations. Country-level accuracy is typically 99%+, but city-level accuracy varies.

Some domains return errors while others work fine. DNS resolution failures are usually caused by typos in the domain name, expired domains, or domains that use DNS providers with restrictive rate limiting. Verify the domain resolves in your browser first.

Other developer tools