A lightweight IPinfo CSV database, updated daily at 12:00 UTC.
Format | Size | Latest Release Download Link |
---|---|---|
CSV | ~110MB | https://github.com/alice39s/ipinfo-csv-lite/releases/latest/download/ipinfo-lite.csv |
CSV (Gzip) | ~15MB | https://github.com/alice39s/ipinfo-csv-lite/releases/latest/download/ipinfo-lite.csv.gz |
CSV (Lzma) | ~12MB | https://github.com/alice39s/ipinfo-csv-lite/releases/latest/download/ipinfo-lite.csv.xz |
You can also download the latest release from Releases page.
from typing import TypedDict, Optional
class IPInfo(TypedDict):
cidr: str
country_code: str
continent_code: str
as_number: int
as_name: Optional[str]
type IPInfo struct {
CIDR string `json:"cidr"`
CountryCode string `json:"country_code"`
ContinentCode string `json:"continent_code"`
ASNumber int `json:"as_number"`
ASName *string `json:"as_name"`
}
interface IPInfo {
cidr: string;
country_code: string;
continent_code: string;
as_number: number;
as_name: string | null;
}
- Python 3.10+
- Download the latest IPinfo CSV file from IPinfo Dashboard - "Free IP to Country + IP to ASN".
- Move the CSV file to
./libs/country_asn.csv
. - Run the script.
- The output file will be
./libs/ipinfo-lite.csv
.
- IPinfo - Free IP to Country + IP to ASN
Code is licensed under MIT.
Data is licensed under CC BY-SA 4.0.