Your IP address:
Provider:
...

General information


Our API is created as a public resource for receiving the most complete information about the IP-address of the user. The data formats are XML or JSON with HTTP/HTTPS connection. Information in the databases updates every day and every webmaster can integrate this service with his own projects.

Our API


For the integration of our service with your projects, we offer you one of the following API:

  • service "Geo-IP API";
  • service "Provider-IP API".
  • service "Hosting API";
  • service "MAC-address API";
  • service "Email API".

Restrictions in use


The inquiries' number limit to each service "Geo-IP API", "Provider-IP API", "Hosting API", "MAC-address API" or "Email API" amounts to no more than 10 inquiries from one IP address during 24 hours.

Data format


Data provided by our API contains the following fields.

ip — checking IP address;
country_code — 2-characters country identifier;
country — name of country in english;
country_rus — name of country in russian;
country_ua — name of the country in ukrainian;
region — name of region in english;
region_rus —name of regionin russian;
region_ua —name of regionin ukrainian;
city — name of city in english;
city_rus — name of city in russian;
city_ua — name of city in ukrainian;
latitude — latitude;
longitude — longitude;
ip — checking IP address;
name_ripe — provider official name in the Internet Routing Registry (IRR) database;
name_rus — provider name/brand in russian;
site — provider website;
as — provider AS;
ip_range_start — numeral value (iptolong) of the first IP address of the ISP's network;
ip_range_end — numeral value (iptolong) of the last IP address of the ISP's network;
route — network;
mask — netmask.
name_ripe — hosting provider official name in the Internet Routing Registry (IRR) database;
site — hosting provider website;
company — the name of the company that registered the MAC address block;
address — company full address;
country — 2-characters country identifier according to the standard ISO 3166-1;
private — for an additional fee, suppliers can hide their data. In this case, this flag is set to true, and company, address, and country are set to «private»;
oui — unique organization identifier;
block_size — block size;
date_created — date when the range was allocated;
date_updated — date when the range was last updated;
true — verifiable email address exists;
false — verifiable email address doesn't exist;

Examples of API requests


IPv4:

IPv6:

API call with an empty parameter "ip" returns information about the IP address from which handling comes.

IPv4:

API call with an empty parameter "ip" returns information about the IP address from which handling comes.

The MAC address format for verification can be one of the following:

  • 00:30:48:5a:58:65
  • 00-22-15-75-1C-1E
  • 000a.e475.7469
  • 001201BB4ADD

Examples of response


<geo_api>
<ip>8.8.8.8</ip>
<country_code>US</country_code>
<country>United states</country>
<country_rus>США</country_rus>
<country_ua>США</country_ua>
<region>California</region>
<region_rus>Калифорния</region_rus>
<region_ua>Каліфорнія</region_ua>
<city>Mountain view</city>
<city_rus>Маунтин-Вью</city_rus>
<city_ua>Маунтін-Вью</city_ua>
<latitude>37.405992</latitude>
<longitude>-122.078515</longitude>
</geo_api>
{
"ip":"8.8.8.8",
"country_code":"US",
"country":"United states",
"country_rus":"\u0421\u0428\u0410\r",
"country_ua":"\u0423\u043a\u0440\u0430\u0457\u043d\u0430",
"region":"California",
"region_rus":"\u041a\u0430\u043b\u0438\u0444\u043e\u0440\u043d\u0438\u044f",
"region_ua":"\u041a\u0438\u0457\u0432\u0441\u044c\u043a\u0430 \u043e\u0431\u043b\u0430\u0441\u0442\u044c",
"city":"Mountain view",
"city_rus":"\u041c\u0430\u0443\u043d\u0442\u0438\u043d-\u0412\u044c\u044e",
"city_ua":"\u0411\u043e\u0440\u0438\u0441\u043f\u0456\u043b\u044c",
"latitude":"37.405992",
"longitude":"-122.078515",
}
<provider_api>
<ip>5.1.5.1</ip>
<name_ripe>PJSC "Datagroup"</name_ripe>
<name_rus>ЧАО "Датагруп"</name_rus>
<site>https://www.domtele.com/</site>
<as>21219</as>
<ip_range_start>83951616</ip_range_start>
<ip_range_end>83959807</ip_range_end>
<route>5.1.0.0</route>
<mask>19</mask>
</provider_api>
{
"ip":"5.1.5.1",
"name_ripe":"PJSC \"Datagroup\"",
"name_rus":"\u0427\u0410\u041e \"\u0414\u0430\u0442\u0430\u0433\u0440\u0443\u043f\"",
"site":"http:\/\/www.domtele.com\/",
"as":"21219",
"ip_range_start":"83951616",
"ip_range_end":"83959807",
"route":"5.1.0.0",
"mask":"19"
}
<hosting_api>
<name_ripe>Google Inc.</name_ripe>
<site>https://www.google.com/</site>
</hosting_api>
{
"name_ripe":"Google Inc."
"site":"https:\/\/www.google.com\/"
}
<macVendor>
<company>Super Micro Computer, Inc</company>
<address>2051 Junction Avenue San Jose CA 95131 US</address>
<country>US</country>
<private>0</private>
<oui>00:30:48</oui>
<block_size>MA-L</block_size>
<date_created>2000-11-09</date_created>
<date_updated>2015-09-27</date_updated>
</macVendor>
{
"company":"Super Micro Computer, Inc",
"address":"2051 Junction Avenue San Jose CA 95131 US",
"country":"US",
"private":"0",
"oui":"00:30:48",
"block_size":"MA-L",
"date_created":"2000-11-09",
"date_updated":"2015-09-27"
}
true / false
{
"exist":true,
"detail":{
"domains":{
"google.com":{
"users":["admin"],
"mxs":{
"aspmx.l.google.com":10,
"alt1.aspmx.l.google.com":20,
"alt2.aspmx.l.google.com":30,
"alt3.aspmx.l.google.com":40,
"alt4.aspmx.l.google.com":50,
"google.com":0
}
}
},
"log":[
"[2019-02-13T19:26:56.533234+0000] Connecting to aspmx.l.google.com:25",
"[2019-02-13T19:26:56.566308+0000] Connected to aspmx.l.google.com:25 successfully",
"[2019-02-13T19:26:56.600374+0000] <<<recv: 220 mx.google.com ESMTP u13-v6si69438lju.221 - gsmtp\r\n",
"[2019-02-13T19:26:56.600473+0000] send>>>: EHLO 2ip.ua",
"[2019-02-13T19:26:56.637390+0000] <<<recv: 250-mx.google.com at your service, [77.123.139.187]\r\n",
"[2019-02-13T19:26:56.637419+0000] <<<recv: 250-SIZE 157286400\r\n",
"[2019-02-13T19:26:56.637426+0000] <<<recv: 250-8BITMIME\r\n",
"[2019-02-13T19:26:56.637430+0000] <<<recv: 250-STARTTLS\r\n",
"[2019-02-13T19:26:56.637434+0000] <<<recv: 250-ENHANCEDSTATUSCODES\r\n",
"[2019-02-13T19:26:56.637438+0000] <<<recv: 250-PIPELINING\r\n",
"[2019-02-13T19:26:56.637442+0000] <<<recv: 250-CHUNKING\r\n",
"[2019-02-13T19:26:56.637445+0000] <<<recv: 250 SMTPUTF8\r\n",
"[2019-02-13T19:26:56.637457+0000] send>>>: MAIL FROM:<[email protected]>",
"[2019-02-13T19:26:56.670259+0000] <<<recv: 250 2.1.0 OK u13-v6si69438lju.221 - gsmtp\r\n",
"[2019-02-13T19:26:56.670292+0000] send>>>: NOOP",
"[2019-02-13T19:26:56.703219+0000] <<<recv: 250 2.0.0 OK u13-v6si69438lju.221 - gsmtp\r\n",
"[2019-02-13T19:26:56.703253+0000] send>>>: NOOP",
"[2019-02-13T19:26:56.736009+0000] <<<recv: 250 2.0.0 OK u13-v6si69438lju.221 - gsmtp\r\n",
"[2019-02-13T19:26:56.736052+0000] send>>>: RCPT TO:<[email protected]>",
"[2019-02-13T19:26:56.985345+0000] <<<recv: 250 2.1.5 OK u13-v6si69438lju.221 - gsmtp\r\n",
"[2019-02-13T19:26:56.985377+0000] send>>>: NOOP",
"[2019-02-13T19:26:57.018204+0000] <<<recv: 250 2.0.0 OK u13-v6si69438lju.221 - gsmtp\r\n",
"[2019-02-13T19:26:57.018236+0000] send>>>: RSET",
"[2019-02-13T19:26:57.051533+0000] <<<recv: 250 2.1.5 Flushed u13-v6si69438lju.221 - gsmtp\r\n",
"[2019-02-13T19:26:57.051576+0000] send>>>: QUIT",
"[2019-02-13T19:26:57.084687+0000] <<<recv: 221 2.0.0 closing connection u13-v6si69438lju.221 - gsmtp\r\n",
"[2019-02-13T19:26:57.084761+0000] Closing socket to aspmx.l.google.com:25"]
}
}

Python Module


We have developed a Python Module, that is easy to install and start using the API right away.

Install the module from PyPI:

python3 -m pip install 2ip

Retrieve provider information for the IP address 192.0.2.0 as a dict:

>>> from twoip import TwoIP
>>> twoip = TwoIP(key = None)
>>> twoip.provider(ip = '192.0.2.0')
{'ip': '192.0.2.0',
 'ip_range_end': '3221226239',
 'ip_range_start': '3221225984',
 'mask': '24',
 'name_ripe': 'Reserved AS',
 'name_rus': '',
 'route': '192.0.2.0'}

Retrieve geographic information for the IP address 8.8.8.8 as a dict:

>>> from twoip import TwoIP
>>> twoip = TwoIP(key = None)
>>> twoip.geo(ip = '8.8.8.8')
{'city': 'Mountain view',
 'country': 'United states of america',
 'country_code': 'US',
 'country_rus': 'США',
 'country_ua': 'США',
 'ip': '8.8.8.8',
 'latitude': '37.405992',
 'longitude': '-122.078515',
 'region': 'California',
 'region_rus': 'Калифорния',
 'region_ua': 'Каліфорнія','}

More information here: https://pypi.org/project/2ip/

Price


10 queries per day are free.

1000 requests per day to our database for 30 days cost 10$. Each following thousand is worth + 1$. For example if you want 5000 requests per day it will cost 14$ for month.

Unlimited number of queries — 100$ per month (but not more than 1 million calls per day).

After payment you will receive an email with instructions and your personal "API key". The limit will be tied to it.

You can get more detailed information or contact us at [email protected].