
A new version of Sypex Geo 2.2 has been released - a very fast algorithm for determining a city by IP. Now the databases have become bilingual (Russian and English), regions and cities are now tied to the GeoNames database, and have permanent IDs.
OKATO codes for cities and regions of Russia, KOATUU for Ukraine and SOATO for Belarus were added.
Technical details
The algorithm of Sypex Geo has not changed significantly, small errors have been corrected, which occurred with a strong uneven distribution of IP ranges.
Major changes were made to directories.
- Added a directory of countries that allows you to save more detailed information about the country.
- A universal data packer format has been introduced, thanks to which you can save any data to the database, without any changes to the API.
- The packaging format is stored in the database file, after the header.
More information about the data format can be found in the
specification format SxGeo 2.2 .
')
REST API
Together with the new version of Sypex Geo, the REST API service was launched. Where using a simple HTTP or HTTPS request, you can get the most up-to-date and extensive IP information using the latest Sypex Geo Max database.
Results can be issued in 3 formats: JSON, JSONP and XML. Batch processing is supported, up to 100 IP per request.
The simplest API request is:
api.sypexgeo.netAs a result, you will receive information about your IP in JSON format.
{ "ip":"123.45.67.89",
The same data in xml can be obtained by running
api.sypexgeo.net/xmlTo get information about an arbitrary IP, you need to run the query:
api.sypexgeo.net/json/123.45.67.89If you need to check several IP at once, you just need to list them separated by a comma or a semicolon
api.sypexgeo.net/json/123.45.67.89;222.22.22.22To get data in JSONP format, you need to run the query:
api.sypexgeo.net/jsonp/123.45.67.89&callback=alertPOST requests are also allowed, in which case IPs are specified in the ip parameter.
Related Links