# 🌍 IP Geolocation Scraper — Bulk IP Lookup & Locations (`lokki/ip-geolocation-scraper`) Actor

Bulk IP geolocation lookup for IPs, domains, and URLs. Get country, city, coordinates, timezone, ISP, organization, ASN, proxy/hosting flags, and clean network data.

- **URL**: https://apify.com/lokki/ip-geolocation-scraper.md
- **Developed by:** [Ian Dikhtiar](https://apify.com/lokki) (community)
- **Categories:** Developer tools, E-commerce, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.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.

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

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## IP Geolocation Scraper

Get clean, structured geolocation intelligence for IP addresses and domains. This Actor turns a list of IPs, hostnames, or URLs into ready-to-use location and network data including country, region, city, latitude/longitude, timezone, ISP, organization, ASN, and lookup status.

Use it for fraud checks, lead enrichment, traffic analysis, security investigations, proxy/VPN screening, compliance workflows, or any pipeline that needs reliable IP-to-location data at scale.

### What it does

- Looks up IP geolocation data for one or many IP addresses, domains, or URLs
- Normalizes results into a consistent dataset format
- Extracts network ownership details such as ISP, organization, and ASN when available
- Returns location fields such as country, region, city, postal code, timezone, and coordinates
- Tracks lookup status and errors per record so failed inputs are easy to debug
- Saves results to the default Apify dataset for export as JSON, CSV, Excel, XML, or via API

### Common use cases

- Enrich customer, signup, or transaction records with country and city data
- Detect suspicious logins, proxy-heavy traffic, or unusual geographic patterns
- Analyze website traffic, server logs, affiliate clicks, or ad leads
- Map IP addresses to approximate coordinates for dashboards and BI tools
- Validate regional access, compliance, and localization workflows
- Build security, threat intelligence, and OSINT datasets

### Input

Provide IP addresses, domains, hostnames, or URLs. The Actor resolves/normalizes each entry and returns one result per input.

```json
{
  "queries": [
    "8.8.8.8",
    "1.1.1.1",
    "example.com",
    "https://apify.com"
  ]
}
````

### Output

Each dataset item contains the original query, normalized IP/domain information, geolocation fields, network metadata, and lookup status.

```json
{
  "query": "8.8.8.8",
  "ip": "8.8.8.8",
  "status": "success",
  "country": "United States",
  "countryCode": "US",
  "region": "California",
  "city": "Mountain View",
  "postalCode": "94043",
  "latitude": 37.4056,
  "longitude": -122.0775,
  "timezone": "America/Los_Angeles",
  "isp": "Google LLC",
  "organization": "Google Public DNS",
  "asn": "AS15169",
  "source": "ip-geolocation",
  "checkedAt": "2026-04-29T20:00:00.000Z"
}
```

> IP geolocation is approximate. City, postal code, ISP, and ASN availability depends on the lookup source and may vary by IP type, region, carrier, VPN, proxy, or cloud provider.

### How to use

1. Open the Actor on Apify.
2. Paste your list of IP addresses, domains, hostnames, or URLs into the input.
3. Run the Actor.
4. Download results from the dataset or connect them to your workflow using the Apify API.

### Tips for best results

- Use raw IP addresses when possible for the most direct lookup.
- Deduplicate large input lists before running to reduce cost and noise.
- Keep the original query field when joining results back to logs, leads, or CRM exports.
- Treat latitude and longitude as approximate, not device-level GPS coordinates.

### Integrations

Results can be exported from Apify as JSON, CSV, Excel, XML, RSS, or HTML. You can also connect the Actor to webhooks, scheduled runs, Make, Zapier, Google Sheets, BI dashboards, SIEM tools, or your own backend via the Apify API.

### SEO keywords

IP geolocation scraper, IP geolocation API, IP lookup tool, IP address lookup, bulk IP lookup, IP to location, IP intelligence, ASN lookup, ISP lookup, IP enrichment, geolocation data, proxy detection, traffic analysis, cybersecurity OSINT.

### FAQ

#### Can this identify an exact street address?

No. IP geolocation estimates the network location of an IP address. It does not reveal a person's exact physical address.

#### Can I run bulk IP lookups?

Yes. Add multiple IP addresses, domains, or URLs to the input and the Actor will return structured results for each item.

#### Does it work with domains and URLs?

Yes, the Actor is designed to accept domains and URLs as inputs, normalize them, and return geolocation data for the resolved IP when available.

#### What formats can I export?

Apify datasets can be exported as JSON, CSV, Excel, XML, RSS, HTML, or accessed programmatically through the Apify API.

### Responsible use

Use this Actor for legitimate analytics, security, enrichment, and compliance purposes. Do not use geolocation data to harass, stalk, discriminate against, or unlawfully profile people.

# Actor input Schema

## `queries` (type: `array`):

List of IP addresses, domains, hostnames, or URLs to look up.

## `includeRaw` (type: `boolean`):

Include the raw lookup response when available for debugging or advanced workflows.

## Actor input object example

```json
{
  "queries": [
    "8.8.8.8",
    "1.1.1.1",
    "example.com"
  ],
  "includeRaw": false
}
```

# Actor output Schema

## `results` (type: `string`):

All structured records produced by this Actor in the default dataset.

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

Open the default dataset in Apify Console. If the Actor defines dataset views, Console will render them here.

## `input` (type: `string`):

The JSON input used for this run, stored in the default key-value store under INPUT.

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

Optional machine-readable run summary when the Actor writes an OUTPUT record to the default key-value store.

# 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 = {
    "queries": [
        "8.8.8.8",
        "1.1.1.1",
        "example.com"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("lokki/ip-geolocation-scraper").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 = { "queries": [
        "8.8.8.8",
        "1.1.1.1",
        "example.com",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("lokki/ip-geolocation-scraper").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "queries": [
    "8.8.8.8",
    "1.1.1.1",
    "example.com"
  ]
}' |
apify call lokki/ip-geolocation-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=lokki/ip-geolocation-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "🌍 IP Geolocation Scraper — Bulk IP Lookup & Locations",
        "description": "Bulk IP geolocation lookup for IPs, domains, and URLs. Get country, city, coordinates, timezone, ISP, organization, ASN, proxy/hosting flags, and clean network data.",
        "version": "1.0",
        "x-build-id": "prxrD6MXoxO195Zbt"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/lokki~ip-geolocation-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-lokki-ip-geolocation-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/lokki~ip-geolocation-scraper/runs": {
            "post": {
                "operationId": "runs-sync-lokki-ip-geolocation-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/lokki~ip-geolocation-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-lokki-ip-geolocation-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "queries"
                ],
                "properties": {
                    "queries": {
                        "title": "IP addresses, domains, or URLs",
                        "type": "array",
                        "description": "List of IP addresses, domains, hostnames, or URLs to look up.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "includeRaw": {
                        "title": "Include raw provider response",
                        "type": "boolean",
                        "description": "Include the raw lookup response when available for debugging or advanced workflows.",
                        "default": false
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
