Skip to content

Commit 48569bd

Browse files
committed
Update README with new API fields and EU endpoint documentation
Add region_type, company, is_icloud_relay, and is_datacenter to the example JSON output. Document how to use the EU endpoint (eu-api.ipdata.co) for GDPR compliance. https://claude.ai/code/session_01L8wfDZ1ZCuFLzAgaecvLr1
1 parent f28833e commit 48569bd

1 file changed

Lines changed: 19 additions & 2 deletions

File tree

README.md

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,15 @@ IpdataService ipdataService = Ipdata.builder().url(url)
4343
.key("MY_KEY").get();
4444
/.../
4545
```
46-
Optionally, you can configure a cache for faster access (less than 1ms latency on requests that hit the cache).
46+
47+
To use the EU endpoint for GDPR compliance, pass the EU API URL instead:
48+
```java
49+
URL url = new URL("https://eu-api.ipdata.co");
50+
IpdataService ipdataService = Ipdata.builder().url(url)
51+
.key("MY_KEY").get();
52+
```
53+
54+
Optionally, you can configure a cache for faster access (less than 1ms latency on requests that hit the cache).
4755

4856
The cache is configurable for time and space eviction policies:
4957

@@ -79,6 +87,7 @@ Output:
7987
"city": null,
8088
"region": null,
8189
"region_code": null,
90+
"region_type": null,
8291
"country_name": "Australia",
8392
"country_code": "AU",
8493
"continent_name": "Oceania",
@@ -97,6 +106,12 @@ Output:
97106
"route": "1.1.1.0/24",
98107
"type": "hosting"
99108
},
109+
"company": {
110+
"name": "Cloudflare, Inc.",
111+
"domain": "cloudflare.com",
112+
"network": "1.1.1.0/24",
113+
"type": "hosting"
114+
},
100115
"languages": [
101116
{
102117
"name": "English",
@@ -124,7 +139,9 @@ Output:
124139
"is_known_attacker": false,
125140
"is_known_abuser": false,
126141
"is_threat": false,
127-
"is_bogon": false
142+
"is_bogon": false,
143+
"is_icloud_relay": false,
144+
"is_datacenter": false
128145
},
129146
"count": "0"
130147
}

0 commit comments

Comments
 (0)