Only prompt for cookie consent where it's legally required, for a cleaner experience elsewhere.
Each result includes gdpr_required (and is_eu_member). Look the visitor up server-side when rendering the page:
curl "https://ipquery.info/api?apiKey=YOUR_API_KEY&ip=VISITOR_IP"
# -> [ { ..., "is_eu_member": true, "gdpr_required": true } ]
If gdpr_required is true, render your consent banner and withhold non-essential cookies until the visitor accepts; otherwise load normally. This is advisory geolocation, not legal advice — combine it with your own compliance policy.
If the lookup fails or the IP can't be resolved, default to showing the banner so you fail safe.