# Ip Geolocation Lookup Ipwhois (`real-estate-api/ip-geolocation-lookup-ipwhois`) Actor

This Actor performs IP geolocation lookups to retrieve geographic and network details for any IP address. It extracts countries, regions, cities, postal codes, coordinates, and Internet Service Provider (ISP) data to support localized content delivery, fraud detection, and traffic analysis.

- **URL**: https://apify.com/real-estate-api/ip-geolocation-lookup-ipwhois.md
- **Developed by:** [real-estate-api](https://apify.com/real-estate-api) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.99 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

### IP Geolocation Lookup (ipwho.is) — IP Location, ISP, ASN and Timezone Data

![IP Geolocation Lookup (ipwho.is) cover](https://images.bigibyte.com/cdn-cgi/image/width=1260,height=540,fit=cover,format=webp/apify-actors-covers/ip-geolocation-lookup-ipwhois-cover.png)

Look up IP geolocation, network, ASN, ISP, and timezone information using public results from ipwho.is (ipwhois.io). Submit IPv4 or IPv6 addresses, set a result limit, and export structured data in JSON, CSV, or Excel formats.

### Overview

This actor retrieves geolocation and network information for each supplied IP address. It collects location details, geographic coordinates, country information, flag data, ISP and ASN details, and timezone information.

Results are deduplicated by IP address and capped according to the `maxItems` setting.

### Features

- Look up IPv4 and IPv6 addresses.
- Retrieve continent, country, region, and city information.
- Collect latitude, longitude, postal code, and EU status.
- Extract country calling codes, capitals, and borders.
- Retrieve country flag images, emojis, and Unicode values.
- Collect ASN, organization, ISP, and domain information.
- Extract timezone, UTC offset, and daylight saving time details.
- Export structured results in JSON, CSV, and Excel formats.

### Collection Mode

**Geolocate IP**

Looks up each supplied IPv4 or IPv6 address and retrieves its geolocation, network, and timezone information.

### Input Parameters

| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| `mode` | String | Yes | `ip` | Selects the IP geolocation mode. |
| `ips` | Array | Yes | — | List of IPv4 or IPv6 addresses to look up. |
| `maxItems` | Integer | No | `50` | Maximum number of results to collect. |
| `requestDelaySecs` | Number | No | `1` | Delay between lookups in seconds. |

### Example Input

```json
{
  "mode": "ip",
  "ips": ["8.8.8.8"],
  "maxItems": 50,
  "requestDelaySecs": 1
}
```

### Extracted Data

#### IP Information

| Field | Description |
|---|---|
| `ip` | IP address submitted for lookup. |
| `success` | Indicates whether the lookup was successful. |
| `ipType` | IP address type, such as IPv4 or IPv6. |

#### Location

| Field | Description |
|---|---|
| `continent` | Continent associated with the IP address. |
| `continent_code` | Continent code. |
| `country` | Country associated with the IP address. |
| `country_code` | Country code. |
| `region` | Region or state associated with the IP address. |
| `region_code` | Region or state code. |
| `city` | City associated with the IP address. |

#### Coordinates

| Field | Description |
|---|---|
| `latitude` | Geographic latitude. |
| `longitude` | Geographic longitude. |
| `postal` | Postal or ZIP code. |
| `is_eu` | Indicates whether the country is part of the European Union. |

#### Country Details

| Field | Description |
|---|---|
| `calling_code` | International telephone calling code. |
| `capital` | Capital city of the country. |
| `borders` | Bordering country codes. |

#### Flag

| Field | Description |
|---|---|
| `flag.img` | URL of the country flag image. |
| `flag.emoji` | Country flag emoji. |
| `flag.emoji_unicode` | Unicode representation of the flag emoji. |

#### ISP / Network

| Field | Description |
|---|---|
| `connection.asn` | Autonomous System Number (ASN). |
| `connection.org` | Network organization name. |
| `connection.isp` | Internet Service Provider name. |
| `connection.domain` | Domain associated with the network connection. |

#### Timezone

| Field | Description |
|---|---|
| `timezone.id` | Timezone identifier. |
| `timezone.abbr` | Timezone abbreviation. |
| `timezone.is_dst` | Indicates whether daylight saving time is active. |
| `timezone.offset` | UTC offset in seconds. |
| `timezone.utc` | UTC offset in formatted notation. |

#### Metadata

| Field | Description |
|---|---|
| `scraped_at` | Date and time when the result was collected. |

### Example Output

```json
{
  "ip": "8.8.8.8",
  "success": true,
  "ipType": "IPv4",
  "continent": "North America",
  "continent_code": "NA",
  "country": "United States",
  "country_code": "US",
  "region": "California",
  "region_code": "CA",
  "city": "San Jose",
  "latitude": 37.3393939,
  "longitude": -121.8949553,
  "is_eu": false,
  "postal": "95025",
  "calling_code": "1",
  "capital": "Washington D.C.",
  "borders": "CA,MX",
  "flag": {
    "img": "https://cdn.ipwhois.io/flags/us.svg",
    "emoji": "🇺🇸",
    "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"
  },
  "scraped_at": "2026-10-26T00:00:00+00:00"
}
```

### Use Cases

- **Traffic analysis:** Map visitor or log IP addresses to countries, regions, and cities for SEO and marketing reports.
- **Fraud checks:** Add ASN and ISP information to suspicious IP addresses for further investigation.
- **Data enrichment:** Add continent, region, country, and timezone details to CRM or analytics datasets.
- **Network operations:** Identify the geographic location and network provider associated with crawler or integration IP addresses.
- **Geographic research:** Analyze IP location data for regional reporting and network insights.

### FAQ

**Who is this actor for?**

It is useful for analysts, marketers, security researchers, and developers who need IP geolocation, ASN, ISP, and timezone information in a structured dataset.

**What export formats are available?**

You can export dataset results in JSON, CSV, Excel, and other supported Apify dataset formats.

**Can I schedule lookups?**

Yes. You can use Apify Schedules to run the actor automatically at your preferred intervals.

### Is Web Scraping Legal?

Collecting information that is already public is generally legal. There is no single law that bans all forms of web scraping. The limits are the usual ones: do not break into accounts, do not take private or confidential data, and be careful with personal data and copyrighted works. A site's terms can also restrict how you access it. Facts such as a public name, price, or rating are not the same as republishing someone's article or photo.

This actor collects information from public pages. It does not log in and it does not bypass access controls.

For a longer explanation, see Apify's article [Is web scraping legal?](https://blog.apify.com/is-web-scraping-legal/).

# Actor input Schema

## `mode` (type: `string`):

What to scrape. Geolocate IP looks up each address via ipwho.is.

## `ips` (type: `array`):

IPv4 or IPv6 addresses to look up, one per line.

## `maxItems` (type: `integer`):

Stop after this many successful rows. Hard max is 1000.

## `requestDelaySecs` (type: `number`):

Seconds to wait between requests.

## `userAgent` (type: `string`):

User-Agent header sent with each request.

## `timeoutSecs` (type: `integer`):

Overall run budget in seconds.

## `requestTimeoutSecs` (type: `integer`):

Per-request timeout in seconds.

## `proxyConfiguration` (type: `object`):

Optional proxy. Leave off unless you need it.

## Actor input object example

```json
{
  "mode": "ip",
  "ips": [
    "8.8.8.8"
  ],
  "maxItems": 100,
  "requestDelaySecs": 1,
  "userAgent": "ActorResearch/1.0",
  "timeoutSecs": 300,
  "requestTimeoutSecs": 30,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `overview` (type: `string`):

Dataset rows in the overview table.

## `dataset` (type: `string`):

Full dataset for this run.

## `items` (type: `string`):

Dataset items as JSON.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "ips": [
        "8.8.8.8"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("real-estate-api/ip-geolocation-lookup-ipwhois").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "ips": ["8.8.8.8"] }

# Run the Actor and wait for it to finish
run = client.actor("real-estate-api/ip-geolocation-lookup-ipwhois").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "ips": [
    "8.8.8.8"
  ]
}' |
apify call real-estate-api/ip-geolocation-lookup-ipwhois --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,real-estate-api/ip-geolocation-lookup-ipwhois"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/ILRNXKubMmUZns0uf/builds/icSDp8zf2rmNUEMDK/openapi.json
