---
name: ip2location-lite-ingestion
description: "How to get IP2Location LITE databases data into a pandas DataFrame and Parquet: access, the request, the format, limits, quirks and terms."
---

# Load IP2Location LITE DB11 into pandas and Parquet

Source entry: https://signal-lab-jet.vercel.app/datasets/ip2location-lite
Provider: https://www.ip2location.com/database/lite
Checked against the provider's documentation: 2026-11-01

## Access
- Create a free account, obtain a download token from the account Download page and set IP2LOCATION_DOWNLOAD_TOKEN.
- The DB11LITE package is the IPv4 CSV with country, region, city, coordinates, ZIP code and time zone.

## Request
```bash
curl -L "https://www.ip2location.com/download?token=$IP2LOCATION_DOWNLOAD_TOKEN&file=DB11LITE" -o DB11LITE.zip
```

## Format
ZIP archive containing a headerless CSV of numeric IP-range bounds with country code, country name, region, city, latitude, longitude, ZIP code and time zone.

## Load into pandas and Parquet
Needs Python 3 with requests, pandas and pyarrow.
```python
"""IP2Location LITE DB11 IPv4 CSV -> pandas -> Parquet."""
import io
import os
import zipfile
import requests
import pandas as pd

URL = "https://www.ip2location.com/download"
r = requests.get(URL, params={"token": os.environ["IP2LOCATION_DOWNLOAD_TOKEN"],
                              "file": "DB11LITE"}, timeout=120)
r.raise_for_status()
with zipfile.ZipFile(io.BytesIO(r.content)) as zf:
    member = next(n for n in zf.namelist() if n.upper().endswith(".CSV"))
    with zf.open(member) as src:
        df = pd.read_csv(src, header=None, dtype="string")
df.columns = ["ip_from", "ip_to", "country_code", "country_name",
              "region_name", "city_name", "latitude", "longitude",
              "zip_code", "time_zone"]
df.to_parquet("ip2location_lite_db11_ipv4.parquet", index=False)
print(len(df), "IPv4 ranges", df["country_code"].nunique(), "country codes")
```
Not run: it needs a free API key.

## Limits
- A free account and download token are required.
- Account sharing or massive downloading can cause account disablement.
- The provider directs LITE users to download on the release schedule.

## Quirks
- CSV files have no header; assign names matching the selected package.
- IPv4 and IPv6 packages use separate package codes and numeric range widths.
- A dash in the country fields marks an unallocated or reserved IP range.

## Terms and attribution
- Personal and commercial LITE use is free with attribution.
- One copy may be distributed with an application, but recipients must register for updates.
- Third-party database repositories are not allowed.
- Terms page: https://lite.ip2location.com/terms-of-use

## Sources
- https://www.ip2location.com/database/lite: "One signup unlocks access to all three comprehensive LITE databases."
- https://www.ip2location.com/database/lite: "Semi-monthly"
- https://lite.ip2location.com/database/ip-country: "It is free for personal or commercial use with attribution required"
- https://lite.ip2location.com/faqs: "Third party database repository is not allowed."
- https://www.ip2location.com/free/downloader: "You can also automate the download process using common HTTP applications such as wget or cURL."

## Help improve this skill
Missing a source, or see something to improve? Call the MCP tool suggest_source or feedback (or POST /api/suggest or /api/feedback). Reviewed ideas: https://signal-lab-jet.vercel.app/agent-suggestions

Information for educational purposes only. Free tiers, limits and licenses belong to the providers and may change; check the provider's own terms before using the data.
