Recommended API urls
Note: Don't forget the trailing slash to avoid unnessary 301 redirects
- IPv4 only query
- Dual stack IPv6 and IPv4 (preference depends on your OS/client)
- IPv6 only query
Some day far in the future ip4.me may have a AAAA record so it is not recommended for "IPv4 only" automated queries. Use ip4only.me instead.
There are no request options in v1.1
We ask that you do not obsfucate or suppress your user-agent (you aren't fooling anyone as 99.96% of queries are automated).
Any information you provide about how you are using the service helps us improve it.
Output consists of several fields separated by commas and may differ from other CSV formats. This format is optimized for easy scripting
by users vs. pedantic accuracy.
- Commas will never appear within output values. Any commas in source data will be replaced with a space character. This means that commas that might
appear in X-Forwarded-For and RFC7239 headers are replaced with spaces.
- Output values with spaces or quotes are not escaped with quote characters however any quote characters appearing in source data
(common in RFC7239) will be passed through as-is.
- Output fields for which there is no input value will be empty (,,) and no placeholder character or strings are used. For example, if the string "Unknown" appears in an output value
that means that string actually appeared in the source data and was passed along to the output field.
Output values derived from HTTP Headers are pre-processed according to the following rules in order:
If desired, commas within values can be recovered by converting spaces to commas.
|Field||Description||Maximum Length||Valid Values|
|1||Remote IP Address Protocol||4|
|2||Remote IP Address||39||Examples:|
|3||API Version||15||Current version:|
|5||Forwarded Header (RFC7239)||255||Examples:|
|6||System Message||255||May vary. Current default value:|
See http://ip6.me/docs for api documentation
IPv4,192.0.2.60,v1.1,,,See http://ip6.me/docs/ for api documentation
IPv6,2001:db8:0:0:8:800:200c:417a,v1.1,,,See http://ip6.me/docs for api documentation
IPv4,192.0.2.60,v1.1,10.1.2.3,,See http://ip6.me/docs for api documentation
IPv4,192.0.2.60,v1.1,10.1.2.3,for=10.1.2.3,See http://ip6.me/docs for api documentation
Prior to v1.1, the retroactively named v1.0 had fields 1 and 2 as above, followed by a system message field and four empty fields. Fields 1 and 2 were not changed in v1.1 for backwards compatibility.
It is expected that future versions fields 1-5 will not be changed in a way that breaks backwards compatibility or will use a different URL.
Sample output from API v1.0:
IPv4,192.0.2.60,Remaining fields reserved for future use,,,