Payments are experiencing issues due to temporary restrictions in Russia. If your payment does not go through, please submit a support request.Our support team is available 24/7 — we are always here to help with hosting and server issues.We are now accepting requests for dedicated server rental and colocation services in our data center.Reminder: we recommend enabling backups for additional data protection.A new VPS/VDS lineup with NVMe storage and improved performance is now available.Maintenance work on some servers has been completed. All services are operating normally.

MODULE FOR 1C-BITRIX

Pavel Shulaev

GeoIp Api

Starting with version 2.0.0, the module supports extension without modifying source code. The list of GeoIP services and their execution order are assembled via the onBuildServiceList event. You can connect custom services from other modules by registering an event handler and returning the full class name of your service. The module provides an API for location determination by IP address.

Technical details

Published
10.12.2016
Updated
11.08.2026
Version
2.0.1
Installed
More than 1000 times
Suitable editions
'First Site', 'Start', 'Standard', 'Small Business', 'Business', 'Corporate Portal', 'Enterprise'
Adaptability
Yes
Composite support
Yes
Compatible with Sites24
No
Developer
Pavel Shulaev

What this solution does

Starting with version 2.0.0, the module supports extension without modifying source code. The list of GeoIP services and their execution order are assembled via the onBuildServiceList event. You can connect custom services from other modules by registering an event handler and returning the full class name of your service.

The module provides an API for location determination by IP address. If no address is explicitly specified, the current user IP is used. Information about the last determined address is stored in cookies to reduce the number of requests.

Available location data:

- city name;

- country name in the site language;

- country ISO code;

- country ID in 1C-Bitrix CMS;

- region name;

- region ISO code;

- latitude and longitude;

- district name (available only when using third-party services connected via onBuildServiceList; the built-in Sypex service does not fill this field);

- IP address range (available only when using third-party services connected via onBuildServiceList; the built-in Sypex service does not fill this field).

In standard mode, the Rover GeoIP module returns data from the first service that successfully provides a response. The list of services and the order of their invocation are configured via the onBuildServiceList event. The single built-in service, sypexgeo.net (Sypex), is connected using the same method and is active by default.

The built-in services ipgeobase.ru (IpGeoBase) and freegeoip.net (FreeGeoIp) have been removed from the module because these services have ceased operations and no longer offer a public API. Developers can integrate their own GeoIP services through the onBuildServiceList event without modifying the module's source code.

Components

The rover:geoip.user.location component determines user location based on the IP address used during their first visit to the site. Access to this component is restricted to administrators. The Web Analytics module must be installed for it to function correctly.

Complete API documentation and usage examples are available in the project's GitHub repository.

For tasks requiring extended functionality and a more user-friendly interface with similar capabilities, the solution "Enhanced Location Selection with IP Detection and Content Replacement by City" is recommended.

The GeoIP API module was developed by Pavel Shulaev.

General iT can install “GeoIp Api”, configure its settings and verify its operation in the existing project.

UPDATE HISTORY

What’s new

23 releases
2.0.1 (11.08.2026)Latest update

— The list of GeoIP services is now built via the `onBuildServiceList` event of the `rover.geoip` module instead of hard-scanning the `lib/service/` directory.

— The built-in service (Sypex) is registered via the same event; custom services from other modules can be connected without modifying the module core (see README, section "Extending the service list").

— `Service::build()` has been simplified: it now accepts only the full class name (FQCN); support for short names has been removed.

— Services IpGeoBase (ipgeobase.ru) and FreeGeoIp (freegeoip.net) have been removed as both services have ceased operations and their public APIs are unavailable. Along with the classes, the unused options `ipgeobase-active` and `freegoip-active` have been removed. If needed, they can be connected as third-party services via `onBuildServiceList`.

— Fixed cache desynchronization in `Location::getInstance()`: `reload($ip)` with an explicitly specified IP now updates `$this->ip` and re-indexes the internal cache of instances, ensuring that a subsequent `getInstance()` call with the old IP does not return an object containing data for a different address.

— `Location::getData()` now writes the exception text to the `error` field on error instead of the static string `'error'`, simplifying diagnostics.

— All localization string references have been migrated from the deprecated `GetMessage()` to `\Bitrix\Main\Localization\Loc::getMessage()`.

— The minimum required PHP version has been raised to 8.1; the installation check (`install/index.php`) is now synchronized with the module's actual runtime gate (`include.php`). Previously, the installation check allowed PHP 7.2, although the module would not load on versions below 8.1.

— The `rover:geoip.user.location` component now retrieves the user's registration IP via the D7 API (`\Bitrix\Statistic\SessionTable`) instead of a direct SQL query to the `b_stat_session` table; if the "Web Analytics" module is not installed, the method correctly returns `null` instead of querying a non-existent table.

— Component `rover:geoip.user.location`: added permission check — only an administrator (`$USER->IsAdmin()`) can view and modify user data; otherwise, an exception with a message about insufficient permissions is thrown.

— Fixed an error during module update.

1.5.2 (22.05.2025)

— Fixed found vulnerabilities

1.5.1 (06.02.2022)

— Added the ability to set the maximum wait time for the geoip service. Default is 200 ms.

1.5.0 (13.10.2021)

— Sypex is the only service for location determination (others do not work at the moment)

— Added the ability to connect to Sypex via a key (upon registration/subscription)

— Service response wait time reduced from 2 to 0.2 seconds.

1.4.11 (03.06.2021)

— Fixed encoding conversion errors for responses on websites using windows-1251

— Minimum PHP version raised to 7.2

— Refactoring

YOUR PROJECT INFRASTRUCTURE

A home for your website

BEFORE YOU ORDER

Let’s go through the details.

Is installation free?
The solution itself is free. Installation, configuration and customisation services are agreed separately. A compatible platform and an appropriate platform licence are required.
How do I check compatibility?
Compare the supported editions and solution version in the technical details with your project. Before installing on a live website, we recommend making a backup and checking the solution in a test environment.
Can you help with implementation?
We can help install the module, check its settings and verify how it works in your project. Compatibility with other customisations and the scope of work are assessed before we begin.

GENERAL iT

Let’s discuss your project

Получатель: ООО «Дженерал Ай Ти Рус»

1C-BITRIX

Install solution

Enter a domain with or without https://. The installer will open in your website control panel in a new tab.

Solution screenshots

Solution screenshot