---
name: maxmind-geolite-ingestion
description: "How to get MaxMind GeoLite databases data into a pandas DataFrame and Parquet: access, the request, the format, limits, quirks and terms."
---

# Load MaxMind GeoLite City IPv4 blocks into pandas and Parquet

Source entry: https://signal-lab-jet.vercel.app/datasets/maxmind-geolite
Provider: https://dev.maxmind.com/geoip/geolite2-free-geolocation-data/
Checked against the provider's documentation: 2026-11-01

## Access
- Create a free MaxMind account and licence key, then set MAXMIND_ACCOUNT_ID and MAXMIND_LICENSE_KEY.
- GeoLite users may download at most 30 database files per day.

## Request
```bash
curl -L -u "$MAXMIND_ACCOUNT_ID:$MAXMIND_LICENSE_KEY" 'https://download.maxmind.com/geoip/databases/GeoLite2-City-CSV/download?suffix=zip' -o GeoLite2-City-CSV.zip
```

## Format
ZIP archive of CSV tables. The IPv4 blocks table contains CIDR network, geoname identifiers, latitude, longitude, accuracy radius and network traits; a locations table supplies names and ISO codes.

## Load into pandas and Parquet
Needs Python 3 with requests, pandas and pyarrow.
```python
"""MaxMind GeoLite2 City IPv4 blocks -> pandas -> Parquet."""
import io
import os
import zipfile
import requests
import pandas as pd

URL = "https://download.maxmind.com/geoip/databases/GeoLite2-City-CSV/download?suffix=zip"
r = requests.get(URL, auth=(os.environ["MAXMIND_ACCOUNT_ID"],
                            os.environ["MAXMIND_LICENSE_KEY"]), 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.endswith("-Blocks-IPv4.csv"))
    with zf.open(member) as src:
        df = pd.read_csv(src, dtype={"network": "string"})
df.to_parquet("maxmind_geolite2_city_ipv4.parquet", index=False)
print(len(df), "IPv4 network ranges", df["network"].iloc[0], "to", df["network"].iloc[-1])
```
Not run: it needs a free API key.

## Limits
- Database download limit: 30 per day.
- Old database versions must be destroyed within 30 days after a new release.
- Field availability and geographic precision vary by IP range.

## Quirks
- The archive contains separate blocks and locations tables joined by geoname_id fields.
- Coordinates describe an approximate area and must be interpreted with accuracy_radius.
- Some IPs have only country-level data and may lack region, city or postal fields.

## Terms and attribution
- Credit MaxMind using the attribution supplied in the EULA.
- Do not use GeoLite to identify a specific household, individual or street address.
- Replace and destroy old versions within 30 days after a new release.
- Terms page: https://www.maxmind.com/en/geolite2/eula

## Sources
- https://dev.maxmind.com/geoip/geolite2-free-geolocation-data/: "MaxMind offers free geolocation and ASN data in downloadable database and web service formats."
- https://dev.maxmind.com/geoip/geolite2-free-geolocation-data/: "Please note that GeoLite users are limited to 30 database downloads per day."
- https://www.maxmind.com/en/geolite2/eula: "You shall cease use of and destroy (i) any old versions of the Services within thirty (30) days following the release of the updated GeoLite Databases"
- https://www.maxmind.com/en/geolite2/eula: "You must provide attribution of your use to MaxMind"

## 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.
