# IP Geolocation & ASN Lookup: Country, City, Org (`globose_talent_mn9/ip-geolocation`) Actor

Bulk lookup IP addresses for country, city, lat/lon, ASN, ISP/org and timezone. No API key required (ipwho.is). $0.30 per 1,000 IPs; failed lookups free.

- **URL**: https://apify.com/globose_talent_mn9/ip-geolocation.md
- **Developed by:** [Andrew Shamah](https://apify.com/globose_talent_mn9) (community)
- **Categories:** Developer tools, Automation
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.30 / 1,000 ip looked ups

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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 & ASN Lookup – country, city, ASN, org, timezone

Look up **many IP addresses in one run**. For each IP you get country, region, city, latitude/longitude, ASN, ISP/org, and timezone.

### Data source & attribution

Uses the free [ipwho.is](https://ipwho.is/) JSON API (no API key). Please be polite: the Actor caps concurrency and documents the source. See [ipwhois.io docs](https://ipwhois.io/docs). Results may include a `attribution` field.

### Use cases

- Enrich server / visitor IP lists with location and ASN
- Bulk threat-intel triage (org + country)
- Compliance / residency checks on infrastructure IPs

### Input

```json
{ "ips": ["8.8.8.8", "1.1.1.1", "2001:4860:4860::8888"] }
```

### Output (one item per IP)

```json
{
  "ip": "8.8.8.8",
  "type": "IPv4",
  "country": "United States",
  "countryCode": "US",
  "city": "San Jose",
  "region": "California",
  "latitude": 37.3394,
  "longitude": -121.895,
  "asn": 15169,
  "org": "Google LLC",
  "isp": "Google LLC",
  "timezone": "America/Los_Angeles",
  "attribution": "Data: ipwho.is"
}
```

### Pricing

**$0.0003 per IP looked up** ($0.30 per 1,000) + a tiny start fee. Failed / invalid lookups are **free**.

### Related Actors

- [WHOIS Domain Lookup](https://apify.com/globose_talent_mn9/whois-domain-lookup)
- [DNS & Email Security Checker](https://apify.com/globose_talent_mn9/dns-email-security-checker)
- [Subdomain Finder](https://apify.com/globose_talent_mn9/subdomain-finder)

# Actor input Schema

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

IPv4 or IPv6 addresses to look up (one per line). Hostnames are rejected.

## `concurrency` (type: `integer`):

Keep low to be polite to the free geolocation API.

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

Seconds to wait for each IP lookup.

## `maxIps` (type: `integer`):

Look up at most this many (0 = all).

## Actor input object example

```json
{
  "ips": [
    "8.8.8.8",
    "1.1.1.1",
    "208.67.222.222"
  ],
  "concurrency": 5,
  "timeoutSecs": 10,
  "maxIps": 0
}
```

# Actor output Schema

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

All IPs (overview table).

## `summary` (type: `string`):

Counts.

# 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",
        "1.1.1.1",
        "208.67.222.222"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("globose_talent_mn9/ip-geolocation").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",
        "1.1.1.1",
        "208.67.222.222",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("globose_talent_mn9/ip-geolocation").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",
    "1.1.1.1",
    "208.67.222.222"
  ]
}' |
apify call globose_talent_mn9/ip-geolocation --silent --output-dataset

```

## MCP server setup

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

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/3A3EM5kejjrv3cJUv/builds/m26hWvDNzaAaNdyLR/openapi.json
