IPv6 Base
1. Data size
The following statistics were collected from the raw data of version 2026/09/01. They vary a little between snapshot versions, but stay roughly the same. For reference only:
-
Data version:
V6-Base -
Data rows:
1437385rows -
Storage size:
231651530bytes = 221M; the generatedFull variantXDBfile is about80MB
2. Data sample
The following data samples are taken from the offline .txt raw data of one snapshot. For reference only:
240e:57f:3000::|240e:57f:30ff:ffff:ffff:ffff:ffff:ffff|亚洲|中国|广东|深圳|南山|电信|113.93029|22.53291|440305|0755|518000|Asia/Shanghai|CNY|15|CHXX0120|CN
240e:57f:3100::|240e:57f:31ff:ffff:ffff:ffff:ffff:ffff|亚洲|中国|广东|深圳||电信|114.085947|22.547|440300|0755|518000|Asia/Shanghai|CNY|11|CHXX0120|CN
240e:57f:3200::|240e:57f:32ff:ffff:ffff:ffff:ffff:ffff|亚洲|中国|广东|深圳|宝安|电信|113.88311|22.55371|440306|0755|518100|Asia/Shanghai|CNY|11|CHXX0120|CN
240e:57f:3300::|240e:57f:33ff:ffff:ffff:ffff:ffff:ffff|亚洲|中国|广东|深圳||电信|114.085947|22.547|440300|0755|518000|Asia/Shanghai|CNY|11|CHXX0120|CN
240e:57f:3400::|240e:57f:34ff:ffff:ffff:ffff:ffff:ffff|亚洲|中国|广东|深圳|龙岗|电信|114.24771|22.71986|440307|0755|518116|Asia/Shanghai|CNY|35|CHXX0120|CN3. Field descriptions
Each line represents one IP segment and its associated data. Fields are separated by |, every line has the same number of fields, and a field without a value is replaced by an empty string.
240e:57f:3200::|240e:57f:32ff:ffff:ffff:ffff:ffff:ffff|亚洲|中国|广东|深圳|宝安|电信|113.88311|22.55371|440306|0755|518100|Asia/Shanghai|CNY|11|CHXX0120|CNFor example, the data above maps, from left to right, to the fields in the table below (top to bottom). The table structure makes it easy to import the data into a database:
| Field value | Field description | Field name | Field type | Field length |
|---|---|---|---|---|
| 240e:57f:3200:: | Start IP of the IP block | ip_start | varchar | 50 |
| 240e:57f:32ff:ffff:ffff:ffff:ffff:ffff | End IP of the IP block | ip_end | varchar | 50 |
| 亚洲 | Continent the address belongs to | continent | varchar | 20 |
| 中国 | Country | country | varchar | 50 |
| 广东 | Province | province | varchar | 100 |
| 深圳 | City | city | varchar | 100 |
| 宝安 | District | district | varchar | 120 |
| 电信 | ISP | isp | varchar | 100 |
| 113.88311 | Longitude | longitude | varchar | 15 |
| 22.55371 | Latitude | latitude | varchar | 15 |
| 440306 | Administrative area code | area_code | varchar | 100 |
| 0755 | City area code | city_code | varchar | 10 |
| 518100 | ZIP code | zip_code | varchar | 20 |
| Asia/Shanghai | Time zone | time_zone | varchar | 20 |
| CNY | Currency | currency | varchar | 20 |
| 11 | Elevation | elevation | varchar | 50 |
| CHXX0120 | Weather station | weather_station | varchar | 50 |
| CN | Country alpha-2 code | alpha2_code | char | 2 |
4. Query and field access
The XDB storage format normalizes the raw data above into a common format: start IP|end IP|region info. Calling the XDB search API returns only the trailing region info part. For example, searching the IP 240e:57f:32ff:ffff:ffff:ffff:ffff:ffff with the XDB search client downloaded from “Data services” returns the following string region info:
亚洲|中国|广东|深圳|宝安|电信|113.88311|22.55371|440306|0755|518100|Asia/Shanghai|CNY|11|CHXX0120|CNIf you want to use the individual fields, split the data by | and then extract them by index, for example:
var region = "region information queried from the XDB file, assume it is the region information above";
var fields = region.split("|"); // split the region information by |
// the numeric index structure of fields is as follows:
[
0: "Asia",
1: "China",
2: "Guangdong",
3: "Shenzhen",
4: "Bao'an",
5: "China Telecom",
6: "113.88311",
7: "22.55371",
8: "440306",
9: "0755",
10: "518100",
11: "Asia/Shanghai",
12: "CNY",
13: "11",
14: "CHXX0120"
15: "CN"
];
// now you can pick the corresponding fields by index.
print(fields[1]); // country
print(fields[3]); // city
print(fields[4]); // district
print(fields[11]); // time zone
...If the XDB file was generated with custom fields, the usage stays the same; only the index positions change after the region information is split. Pick the correct indexes to get the field values you need.
The fields in the offline data are all standardized: if a field is missing, an empty string is used in its place by default. That means the same index always yields the same field, and a missing value is returned as an empty string. For example, here is a sample row with empty values:
北美洲|美国|California|Los Angeles||美国电话电报公司|-118.243680|34.052230|||90009|America/Los_Angeles|USD|||USIn the data above, both the administrative area code and the city area code are missing, so fields[8] and fields[9] return empty strings.