IPv6 Pro
1. Data size
The following statistics were collected from the source data of version 2026/09/01. They vary slightly from snapshot to snapshot but are roughly the same, for reference only:
-
Data version:
V6-Pro -
Number of data rows:
1519522rows -
Storage size:
262975914bytes = 251M; the generatedFull variantXDBfile is around90MB
2. Data sample
The following data samples were collected from the offline .txt source 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|AS4134|DYN|15|CHXX0120|CN
240e:57f:3100::|240e:57f:31ff:ffff:ffff:ffff:ffff:ffff|亚洲|中国|广东|深圳||电信|114.085947|22.547|440300|0755|518000|Asia/Shanghai|CNY|AS4134|DYN|11|CHXX0120|CN
240e:57f:3200::|240e:57f:32ff:ffff:ffff:ffff:ffff:ffff|亚洲|中国|广东|深圳|宝安|电信|113.88311|22.55371|440306|0755|518100|Asia/Shanghai|CNY|AS4134|DYN|11|CHXX0120|CN
240e:57f:3300::|240e:57f:33ff:ffff:ffff:ffff:ffff:ffff|亚洲|中国|广东|深圳||电信|114.085947|22.547|440300|0755|518000|Asia/Shanghai|CNY|AS4134|DYN|11|CHXX0120|CN
240e:57f:3400::|240e:57f:34ff:ffff:ffff:ffff:ffff:ffff|亚洲|中国|广东|深圳|龙岗|电信|114.24771|22.71986|440307|0755|518116|Asia/Shanghai|CNY|AS4134|DYN|35|CHXX0120|CN3. Field description
Each line represents an IP data segment and its associated data. The fields are separated by |. Every line has the same number of fields, and a field with no value is replaced with an empty string.
240e:57f:3200::|240e:57f:32ff:ffff:ffff:ffff:ffff:ffff|亚洲|中国|广东|深圳|宝安|电信|113.88311|22.55371|440306|0755|518100|Asia/Shanghai|CNY|AS4134|DYN|11|CHXX0120|CNFor example, the data above corresponds, from left to right, to the fields in the table below (from top to bottom). This table structure makes it easy for you to import the data into a database:
| Field value | Field description | Field name | Field type | Field length |
|---|---|---|---|---|
| 240e:57f:3200:: | Starting IP of the IP block | ip_start | varchar | 50 |
| 240e:57f:32ff:ffff:ffff:ffff:ffff:ffff | Ending IP of the IP block | ip_end | varchar | 50 |
| 亚洲 | The continent the segment belongs to | continent | varchar | 20 |
| 中国 | Country | country | varchar | 50 |
| 广东 | Province | province | varchar | 100 |
| 深圳 | City | city | varchar | 100 |
| 宝安区 | District | district | varchar | 120 |
| 电信 | Internet service provider | 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 |
| AS4134 | ASN number | asn | varchar | 20 |
| DYN | Network scenario | scenes | varchar | 20 |
| 11 | Elevation | elevation | varchar | 50 |
| CHXX0120 | Weather station | weather_station | varchar | 50 |
| CN | Country alpha-2 code | alpha2_code | char | 2 |
4. Querying and field retrieval
The XDB storage format standardizes the source data above into a common format: start IP|end IP|region info. The data returned by an XDB query call contains only the trailing region info. For example, querying the IP 240e:57f:32ff:ffff:ffff:ffff:ffff:ffff with the XDB query client downloaded from "Data services" returns the following string of region info:
亚洲|中国|广东|深圳|宝安|电信|113.88311|22.55371|440306|0755|518100|Asia/Shanghai|CNY|AS4134|DYN|11|CHXX0120|CNIf I want to use individual fields from it, I need to split the data by | and then extract them by index, for example:
var region = "region info queried from XDB, assume it is the region info above";
var fields = region.split("|"); // split the region info by |
// the numeric index structure of fields is as follows:
[
0: "亚洲",
1: "中国",
2: "广东",
3: "深圳",
4: "宝安",
5: "电信",
6: "113.88311",
7: "22.55371",
8: "440306",
9: "0755",
10: "518100",
11: "Asia/Shanghai",
12: "CNY",
13: "AS4134",
14: "MOB",
15: "11",
16: "CHXX0120"
17: "CN"
];
// from here on, the corresponding fields can be fetched by index.
print(fields[1]); // country
print(fields[3]); // city
print(fields[4]); // district
print(fields[11]); // time zone
print(fields[13]); // ASN number
print(fields[14]); // network scenario, MOB means mobile network
...If the XDB file you use was generated with custom fields, the usage stays the same; only the index positions of the fields change after the region info is split. Just pick the correct indexes to get the field values you want.
The fields of the offline data are all standardized: if a field is missing, an empty string is used by default. That is, the same index always maps to the same field, and a missing value returns an empty string. For example, here is a sample with empty values:
北美洲|美国|Nevada|Las Vegas||美国电话电报公司|-115.137220|36.174970|||89111|America/Los_Angeles|USD|AS20057|MOB|||USIn the data above, both the administrative area code and the city area code are missing, so fields[8] and fields[9] both return an empty string.
5. Network scenario description
As described in Section 4, the value of the network scenario field can be fetched via fields[14]. The complete mapping between the codes and the scenario types is as follows:
| Scenario code | Scenario type | Notes |
|---|---|---|
| CDN | Content delivery | Part of the data centers; a content delivery network |
| DNS | Domain name resolution | IPs used to provide domain name resolution services |
| EDU | Educational institution | IPs used by schools/educational institutions |
| GTW | Enterprise dedicated line | Fixed IP; IPs of medium and large companies accessing the Internet over a dedicated line |
| GOV | Government agency | IPs used by government agencies |
| DYN | Home broadband | IPs used by home/residential users |
| IDC | Data center | IPs used by server rooms/cloud service providers |
| MOB | Mobile network | Base station egress IPs (2G/3G/4G/5G) |
| ORG | Organization | Non-profit organizations |
| NET | Infrastructure | Network infrastructure IPs, including network hardware devices, communication facilities, etc., for example: routers, transmission equipment, etc. |
| BOGON | Reserved IP | Used to ensure that, in specific situations, a computer or device can keep the same IP address on a LAN without the address being assigned to another device |