IP-Geolokalisierungsdaten (JSON / CSV)

Autorenname · 2025-10-31

IP-Geolokalisierungsdatenbank ordnet zusammenhängende IP-Bereiche (ip_from~ip_to) Ländern/Regionen, Verwaltungsgebieten, Städten und Breiten-/Längengrad zu. Sie wird für Szenarien wie Georedundanz, Compliance und Risikomanagement, nähebezogene Planung und Betriebsanalysen verwendet. Die Daten werden in zwei separate Exporte unterteilt: IPv6 und IPv4, mit gleichen Feldern und im gleichen Dateiformat.

Datenstruktur (Spaltenbeschreibung)

  • ip_from VARCHAR(39) NOT NULL: Start-IP (kompatibel mit IPv4/IPv6).
  • ip_to VARCHAR(39) NOT NULL: End-IP (kompatibel mit IPv4/IPv6).
  • country_code CHAR(2): ISO 3166-1 Alpha-2 (z.B. US, CN).
  • region VARCHAR(100): Provinz/Bundesstaat/erste Verwaltungseinheit.
  • city VARCHAR(100): Stadtname.
  • latitude DECIMAL(9,5): Breitengrad.
  • longitude DECIMAL(9,5): Längengrad.
SQL zum Erstellen der Tabelle (MySQL Beispiel)
CREATE TABLE geoip_ranges (
  ip_from      VARCHAR(39)  NOT NULL,
  ip_to        VARCHAR(39)  NOT NULL,
  country_code CHAR(2),
  region       VARCHAR(100),
  city         VARCHAR(100),
  latitude     DECIMAL(9,5),
  longitude    DECIMAL(9,5),
  PRIMARY KEY (ip_from, ip_to)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

Online herunterladen

Für jedes Protokoll (IPv6 / IPv4) gibt es drei Formate: JSON (.gz), CSV (.gz), SQL (.gz).

Quelle Typ Format Herunterladen Beschreibung
IPIN IPv6 JSON (.gz) Herunterladen IPv6 Bereich → Geoinformationen (JSON Array).
IPIN IPv6 CSV (.gz) Herunterladen Standard durch Komma getrennt, mit Kopfzeile, ideal für ETL/Tableau.
IPIN IPv6 SQL (.gz) Herunterladen Beinhaltet Erstellungs- und INSERT-Anweisungen für MySQL.
IPIN IPv4 JSON (.gz) Herunterladen IPv4 Bereich → Geoinformationen (JSON Array).
IPIN IPv4 CSV (.gz) Herunterladen Standard durch Komma getrennt, mit Kopfzeile, ideal für ETL/Tableau.
IPIN IPv4 SQL (.gz) Herunterladen Beinhaltet Erstellungs- und INSERT-Anweisungen für MySQL.

Hinweis: Alle Downloads sind .gz komprimierte Archive. Diese können mit gunzip entpackt oder direkt im Programm streamend verarbeitet werden.

Schnell herunterladen per CLI

curl

# IPv6
curl -fL -OJ 'https://ipin.io/exports/20251028_204109/ipv6_ip_location.json.gz'
curl -fL -OJ 'https://ipin.io/exports/20251028_204109/ipv6_ip_location.csv.gz'
curl -fL -OJ 'https://ipin.io/exports/20251028_204109/ipv6_ip_location.sql.gz'

# IPv4
curl -fL -OJ 'https://ipin.io/exports/20251028_204109/ipv4_ip_location.json.gz'
curl -fL -OJ 'https://ipin.io/exports/20251028_204109/ipv4_ip_location.csv.gz'
curl -fL -OJ 'https://ipin.io/exports/20251028_204109/ipv4_ip_location.sql.gz'

wget

# Auto-Dateiname vom Server übernehmen (--content-disposition)
# IPv6
wget --content-disposition 'https://ipin.io/exports/20251028_204109/ipv6_ip_location.json.gz'
wget --content-disposition 'https://ipin.io/exports/20251028_204109/ipv6_ip_location.csv.gz'
wget --content-disposition 'https://ipin.io/exports/20251028_204109/ipv6_ip_location.sql.gz'

# IPv4
wget --content-disposition 'https://ipin.io/exports/20251028_204109/ipv4_ip_location.json.gz'
wget --content-disposition 'https://ipin.io/exports/20251028_204109/ipv4_ip_location.csv.gz'
wget --content-disposition 'https://ipin.io/exports/20251028_204109/ipv4_ip_location.sql.gz'

# Mit spezifischen Namen speichern + Fortsetzung der Downloads
wget -c -O ipv6_ip_location.json.gz 'https://ipin.io/exports/20251028_204109/ipv6_ip_location.json.gz'
wget -c -O ipv6_ip_location.csv.gz  'https://ipin.io/exports/20251028_204109/ipv6_ip_location.csv.gz'
wget -c -O ipv6_ip_location.sql.gz  'https://ipin.io/exports/20251028_204109/ipv6_ip_location.sql.gz'
wget -c -O ipv4_ip_location.json.gz 'https://ipin.io/exports/20251028_204109/ipv4_ip_location.json.gz'
wget -c -O ipv4_ip_location.csv.gz  'https://ipin.io/exports/20251028_204109/ipv4_ip_location.csv.gz'
wget -c -O ipv4_ip_location.sql.gz  'https://ipin.io/exports/20251028_204109/ipv4_ip_location.sql.gz'

aria2c (Mehrfach-Downloads)

# IPv6
aria2c -x16 -s16 -k1M -o ipv6_ip_location.json.gz 'https://ipin.io/exports/20251028_204109/ipv6_ip_location.json.gz'
aria2c -x16 -s16 -k1M -o ipv6_ip_location.csv.gz  'https://ipin.io/exports/20251028_204109/ipv6_ip_location.csv.gz'
aria2c -x16 -s16 -k1M -o ipv6_ip_location.sql.gz  'https://ipin.io/exports/20251028_204109/ipv6_ip_location.sql.gz'

# IPv4
aria2c -x16 -s16 -k1M -o ipv4_ip_location.json.gz 'https://ipin.io/exports/20251028_204109/ipv4_ip_location.json.gz'
aria2c -x16 -s16 -k1M -o ipv4_ip_location.csv.gz  'https://ipin.io/exports/20251028_204109/ipv4_ip_location.csv.gz'
aria2c -x16 -s16 -k1M -o ipv4_ip_location.sql.gz  'https://ipin.io/exports/20251028_204109/ipv4_ip_location.sql.gz'

PowerShell

# IPv6
Invoke-WebRequest -Uri "https://ipin.io/exports/20251028_204109/ipv6_ip_location.json.gz" -OutFile "ipv6_ip_location.json.gz"
Invoke-WebRequest -Uri "https://ipin.io/exports/20251028_204109/ipv6_ip_location.csv.gz"  -OutFile "ipv6_ip_location.csv.gz"
Invoke-WebRequest -Uri "https://ipin.io/exports/20251028_204109/ipv6_ip_location.sql.gz"  -OutFile "ipv6_ip_location.sql.gz"

# IPv4
Invoke-WebRequest -Uri "https://ipin.io/exports/20251028_204109/ipv4_ip_location.json.gz" -OutFile "ipv4_ip_location.json.gz"
Invoke-WebRequest -Uri "https://ipin.io/exports/20251028_204109/ipv4_ip_location.csv.gz"  -OutFile "ipv4_ip_location.csv.gz"
Invoke-WebRequest -Uri "https://ipin.io/exports/20251028_204109/ipv4_ip_location.sql.gz"  -OutFile "ipv4_ip_location.sql.gz"

Hinweis: Alle Downloads sind .gz komprimierte Dateien. Diese können mit gunzip entpackt oder direkt im Programm als Stream gelesen werden.

Formatbeschreibung

JSON

Array-Format; jedes Element enthält ip_from, ip_to, country_code, region, city, latitude, longitude.

[
  {
    "ip_from": "2400:cb00::",
    "ip_to":   "2400:cb00:ffff:ffff:ffff:ffff:ffff:ffff",
    "country_code": "US",
    "region": "California",
    "city": "Los Angeles",
    "latitude": 34.05460,
    "longitude": -118.24400
  }
]
CSV

Erste Zeile ist die Kopfzeile; Felder mit Kommata/Anführungszeichen werden nach RFC 4180 maskiert.

ip_from,ip_to,country_code,region,city,latitude,longitude
1.0.0.0,1.0.0.255,AU,Queensland,South Brisbane,-27.47480,153.01700
SQL

Enthält Erstellungs- und INSERT Anweisungen, geeignet zum direkten Import in MySQL.

-- Siehe oben zum Erstellen der Tabelle
INSERT INTO geoip_ranges
(ip_from, ip_to, country_code, region, city, latitude, longitude) VALUES
('1.0.0.0','1.0.0.255','AU','Queensland','South Brisbane',-27.47480,153.01700);

Verwendung (Schnellstart)

  1. Wählen Sie die IPv6 oder IPv4 JSON / CSV / SQL-Datei und laden Sie sie herunter.
  2. Entpacken Sie die Datei und importieren Sie sie in die Datenbank (oder parsen Sie sie direkt im Programm).
  3. Verwenden Sie die Daten für Georedundanz, Compliance und Risikomanagement; Planung basierend auf Nähe (grobe Granularität) ist ebenfalls möglich.
  4. Erstellen Sie einen geplanten Task (z.B. täglich/wöchentlich), um die Daten regelmäßig zu aktualisieren und die Datenbank aktuell zu halten.

Zusätzliche Hinweise

  • IPv6/IPv4 verwenden dieselbe Spaltenstruktur; nur der abgedeckte Adressbereich ist unterschiedlich.
  • Breiten- und Längengrad sowie Verwaltungsgebiete dienen zur groben Lokalisierung und stellen keine exakte Adresse dar; beachten Sie die Datenschutz- und Compliance-Vorgaben.
  • Für performante Abfragen können IPv4 in 32-Bit-Integer-Bereiche umgewandelt werden, IPv6 nutzt vorzugweise Präfix-/Bereichs-Bäume oder spezielle Indizes.