https://ip.ayra.ch/ip in your projects.
The shown IP is whatever the users system prefers to use.
To force IPv4, use a different domain:
There's a domain for IPv6 too:
In the past, simply visiting the URLs without
would behave in an identical manner.
This has been changed to allow for this page to be put here.
You can still use the old method if your tool doesn't sends a web browser imitating user agent string.