Rakesh Vidyadharan Help

MMDB

TCP and Websocket service for the dbip MMDB Lite database.

Protocol

Simplest use is to send the IP address for which you want details to the service, and if it is a valid IP address, you will receive a JSON response with all the details.

Note: For the TCP service, finish the query with a single UNIX newline character (\n). The response will be terminated by two UNIX newline characters (\n\n). Other than this, there is no difference between the TCP and Websocket protocols.

Example

The following example shows a request IP address and the response:

{ "city" : { "names" : { "en" : "Oklahoma City (Central Oklahoma City)" } }, "continent" : { "code" : "NA", "geoname_id" : 6255149, "names" : { "de" : "Nordamerika", "en" : "North America", "es" : "Norteamérica", "fa" : " امریکای شمالی", "fr" : "Amérique Du Nord", "ja" : "北アメリカ大陸", "ko" : "북아메리카", "pt-BR" : "América Do Norte", "ru" : "Северная Америка", "zh-CN" : "北美洲" } }, "country" : { "geoname_id" : 6252001, "is_in_european_union" : false, "iso_code" : "US", "names" : { "de" : "Vereinigte Staaten von Amerika", "en" : "United States", "es" : "Estados Unidos de América (los)", "fa" : "ایالات متحدهٔ امریکا", "fr" : "États-Unis", "ja" : "アメリカ合衆国", "ko" : "미국", "pt-BR" : "Estados Unidos", "ru" : "США", "zh-CN" : "美国" } }, "location" : { "latitude" : 35.5248, "longitude" : -97.5971 }, "subdivisions" : [ { "names" : { "en" : "Oklahoma" } } ] }

Fields

If you prefer a simpler listing of field : value pairs, prefix the IP address with f:. The following example shows the same request as above:

f:184.105.163.155 city : Oklahoma City (Central Oklahoma City) continent : North America country : United States country_iso_code : US latitude : 35.524800 longitude : -97.597100 query_ip_address : 184.105.163.155 query_language : en subdivision : Oklahoma

Location

You can also retrieve the geo-coordinates (latitude and longitude) for an IP address by prefixing the address with l:. The following examples illustrates:

l:184.105.163.155 35.524800,-97.597100
Last modified: 21 January 2025