Using the ipstack API output
parameter, the API’s result format can be switched between JSON (default) and XML. Set the output
parameter to json
or xml
, depending on your preference.
Requesting JSON Format
https://api.clarifyip.com/?key=YOUR_ACCESS_KEY&ip=185.245.87.169&output=json
Requesting XML Format
https://api.clarifyip.com/?key=YOUR_ACCESS_KEY&ip=185.245.87.169&output=xml
Response in XML Format:
<?xml version="1.0" encoding="utf-8"?> <geo> <connection> <asn>9009</asn> <ip>185.245.87.169</ip> <isp>M247 Ltd</isp> <type>ipv4</type> </connection> <zip>90014</zip> <city> <name>Los Angeles</name> <id>5368361</id> </city> <location> <metro_code>34.0494</metro_code> <languages> <one>eng</one> </languages> <calling_code> <one>+1</one> </calling_code> <flag>//cdn.clarifyip.com/assets/flags/svg/us.svg</flag> <emoji>??</emoji> <latitude>34.0494</latitude> <longitude>-118.2641</longitude> </location> <country> <code_3>USA</code_3> <name>United States</name> <id>6252001</id> <code>US</code> </country> <region> <code>CA</code> <name>California</name> </region> <continent> <name>North America</name> <id>6255149</id> <code>NA</code> </continent> <time_zone> <id>America/Los_Angeles</id> </time_zone> </geo>