This page provides an API to retrieve the IP address.
The API specifications are as follows:
The API URL is as follows:
Each API returns data in the following format:
Returns the IP address.
Example:
${request.headers.get('cf-connecting-ip')}
Returns the IP address in JSON format.
Example:
{"ip": "${request.headers.get('cf-connecting-ip')}"}
Returns the IP address in XML format.
Example:
${request.headers.get('cf-connecting-ip')}
The API URL is as follows:
Each API returns data in the following format:
Returns the country.
Example:
${country}
Returns the country in JSON format.
Example:
{"country": "${country}"}
Returns the country in XML format.
Example:
${country}
The API URL is as follows:
Each API returns data in the following format:
Returns the region.
Example:
${region}
Returns the region in JSON format.
Example:
{"region": "${region}"}
Returns the region in XML format.
Example:
${region}
The API URL is as follows:
Each API returns data in the following format:
Returns the prefecture code.
Example:
${prefcode}
Returns the prefecture code in JSON format.
Example:
{"prefcode": "${prefcode}"}
Returns the prefecture code in XML format.
Example:
${prefcode}
The API URL is as follows:
Each API returns data in the following format:
Returns the city name.
Example:
${city}
Returns the city name in JSON format.
Example:
{"city": "${city}"}
Returns the city name in XML format.
Example:
${city}
The API URLs are as follows:
Each URL returns data in the following format:
Returns the postal code.
Example:
${postalcode}
Returns the postal code in JSON format.
Example:
{"postalcode": "${postalcode}"}
Returns the postal code in XML format.
Example:
${postalcode}
The API URLs are as follows:
Each URL returns data in the following format:
Returns the longitude.
Example:
${lon}
Returns the longitude in JSON format.
Example:
{"lon": "${lon}"}
Returns the longitude in XML format.
Example:
${lon}
The API URLs are as follows:
Each URL returns data in the following format:
Returns the latitude.
Example:
${lat}
Returns the latitude in JSON format.
Example:
{"lat": "${lat}"}
Returns the latitude in XML format.
Example:
${lat}
The API URLs are as follows:
Each URL returns data in the following format:
Returns the latitude and longitude.
Example:
${latlon}
Returns the latitude and longitude in JSON format.
Example:
{"latlon": "${latlon}"}
Returns the latitude and longitude in XML format.
Example:
${latlon}
The URLs for the API are as follows:
Each URL returns the following data:
Returns the timezone.
Example:
${timezone}
Returns the timezone in JSON format.
Example:
{"timezone": "${timezone}"}
Returns the timezone in XML format.
Example:
${timezone}
The URLs for the API are as follows:
Each URL returns the following data:
Returns the AS number.
Example:
${asn}
Returns the AS number in JSON format.
Example:
{"asn": "${asn}"}
Returns the AS number in XML format.
Example:
${asn}
The URLs for the API are as follows:
Each URL returns the following data:
Returns the ISP.
Example:
${isp}
Returns the ISP in JSON format.
Example:
{"isp": "${isp}"}
Returns the ISP in XML format.
Example:
${isp}
The URLs for the API are as follows:
Each URL returns the following data:
Returns the User Agent.
Example:
${ua}
Returns the User Agent in JSON format.
Example:
{"ua": "${ua}"}
Returns the User Agent in XML format.
Example:
${ua}