---
name: db-ip-lite-ingestion
description: "How to get DB-IP Lite databases data into a pandas DataFrame and Parquet: access, the request, the format, limits, quirks and terms."
---

# Load DB-IP Country Lite into pandas and Parquet

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

## Access
- No account or key. The dated monthly CSV and MMDB files are public downloads.
- Accept the CC BY 4.0 terms and provide DB-IP attribution.

## Request
```bash
curl -L 'https://download.db-ip.com/free/dbip-country-lite-2026-11.csv.gz' -o dbip-country-lite-2026-11.csv.gz
```

## Format
Gzip-compressed, headerless CSV with starting IP, ending IP and two-letter country code for each IPv4 or IPv6 range.

## Load into pandas and Parquet
Needs Python 3 with requests, pandas and pyarrow.
```python
"""DB-IP Country Lite IPv4/IPv6 ranges -> pandas -> Parquet."""
import io
import requests
import pandas as pd

URL = "https://download.db-ip.com/free/dbip-country-lite-2026-11.csv.gz"
r = requests.get(URL, timeout=120)
r.raise_for_status()
df = pd.read_csv(io.BytesIO(r.content), compression="gzip", header=None,
                 names=["ip_start", "ip_end", "country_code"], dtype="string")
df.to_parquet("dbip_country_lite_2026_11.parquet", index=False)
print(len(df), "IP ranges", df["country_code"].nunique(), "country codes",
      df.iloc[0]["ip_start"], "to", df.iloc[-1]["ip_end"])
```
Run by us on 2026-11-01 (python 3.13.5 | pandas 3.1.0 | pyarrow 26.0.0 | requests 2.34.2). Result: 732796 IP ranges 250 country codes 0.0.0.0 to ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff

## Limits
- Rate limit: Not stated.
- Lite downloads update monthly.
- Lite editions have fewer records and lower accuracy than commercial editions.

## Quirks
- The CSV has no header row; assign column names when reading it.
- The range columns contain both IPv4 and IPv6 text, so keep them as strings.
- Use the dated URL shown on the provider download page and refresh it each month.

## Terms and attribution
- The Lite databases are CC BY 4.0 and require attribution to DB-IP.com.
- A web application must link to DB-IP on pages that display or use the results.
- Terms page: https://db-ip.com/db/lite.php

## Sources
- https://db-ip.com/db/lite.php: "Lite downloads are updated monthly and distributed under the Creative Commons Attribution License."
- https://db-ip.com/db/lite.php: "You are free to use this database in your application, provided you give attribution to DB-IP.com for the data."
- https://db-ip.com/db/download/ip-to-country-lite: "The free IP to Country Lite geolocation database is a subset of the full database with reduced accuracy."
- https://db-ip.com/db/download/ip-to-city-lite: "The free IP to City Lite geolocation database is a subset of the full database with reduced accuracy."

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