REST API allows you to get the most current and advanced IP information using the latest Sypex Geo Max database using a simple request over HTTP or HTTPS.

Each user without registration is provided with 10,000 requests per month (identification by IP and REFERER). When registering on the site, a unique key is issued to record requests, and bonus requests are added to the account (30 000 per month). Unused bonus requests do not carry over to the next month. At the same time, paid requests have no time limits. For users who purchased requests, free bonus requests are used up first, and after they are finished, paid ones begin to be used up. Thus, if you have 40,000 requests per month, then a portion of 100 thousand paid requests will last you 10 months.

REST API allows you to receive data in JSON, JSONP, XML and MessagePack formats. All data is encoded in UTF-8. In one request you can obtain information from up to 100 IPs. Please note that in batch mode (when more than one IP is requested at a time), requests will be charged for each IP address in the packet.


Send a GET request to{format}/[{ip}][?callback={callback}]

or to one of the regional servers, for example, a server in Moscow{format}/[{ip}][?callback={callback}]

API supports HTTP and HTTPS requests.

Supported formats are xml, json, jsonp and msg.

In ip you can specify either one IPv4 or several IPv4 separated by a comma, semicolon, space or line feed.

If no IP is specified, information about your IP is displayed, from which the request to the API is made.

callback - the JSON response is wrapped in a callback function. If the callback function is not specified, then the console.dir function is automatically added.

You can also use POST requests, in which case the required IPs must be specified in the ip parameter.

For registered users, the key is specified:{key}/{format}/[{ip}][?callback={callback}]

Attention! Be sure to take into account that not only ordinary visitors, but also search bots visit the site , which can create many requests to the site and, accordingly, to the API.

Therefore, be sure to filter requests from search bots. This can be done with a simple regular expression, like:

// We filter bots so that there are no unnecessary requests to the API
$is_bot = empty($_SERVER['HTTP_USER_AGENT']) || preg_match(
$geo = !$is_bot ? json_decode(
file_get_contents('' . $_SERVER['REMOTE_ADDR']),
true) : [];
// All IP data

// Select the required data
if ($is_bot) {
echo 'Hello Google Bot, and other bots';
elseif ($geo->country->iso == 'UA'){
switch($geo->city->name_en) {
case 'Kyiv': echo 'Your city - Kyiv'; break;
case 'Lviv': echo 'Your city is Lviv'; break;
default: echo 'Another city in Ukraine';
else {
echo 'You are not from Ukraine';

You should also cache query results for users, so that when a user visits 100 pages of the site, you do not make 100 requests to the API.

Sypex Geo API regional servers

In 2016, additional Sypex Geo API servers were launched. Servers are located in different countries and cities. Thanks to this, you can significantly reduce the ping to the server, and, accordingly, the time to access the API.

There are currently 14 servers available:

Eastern Europe and Asia:

  • - Ukraine, Khmelnitsky (GMhost)
  • - Russia, Moscow (Ihor)
  • - Russia, St. Petersburg (Vscale)
  • - Russia, Ekaterinburg (NetAngels)

Western Europe:

  • - Germany, Falkenstein (Hetzner)
  • - Netherlands, Amsterdam (Vultr)
  • - France, Gravelines (OVH)
  • - Italy, Arezzo (ArubaCloud)
  • - England, London (ArubaCloud)

North America:


  • - Japan, Tokyo (Amazon)
  • - Singapore (Amazon)

Usage Examples


Outputs information about your IP in JSON.


Outputs information in JSON about IP


Outputs information in JSON about IP and


Outputs information in XML about IP


Outputs information in JSONP about IP, with the alert callback function.

Example results

Result of calling the API in JSON

 "name_ru":"Южная Корея","name_en":"South Korea","timezone":"Asia/Seoul"

Result of API call in XML

<?xml version="1.0" encoding="UTF-8"?>
<ip num="">
<name_ru>Южная Корея</name_ru>
<name_en>South Korea</name_en>