More than 1623 benchmarks completed!
Follow us on twitter

API Access

PetaByet GeoIP & JsonIP REST API (now with IPv6 support!)

About

PetaByet offers a free GeoIP & JsonIP API to developers for their projects.
The output is JSON (JavaScript Object Notation) which can be integrated into anything.
We offer this service for free public use (both commercial/non-commercial) and an optional link back is appreciated.

The database is updated monthly.
Last updated: 30 July 2017

GeoIP API Usage

Get GeoIP data of your IP: http://api.petabyet.com/geoip/

Get information about a specific IP address: http://api.petabyet.com/geoip/{ip-address}

Example GeoIP Output

Below you can find the output of our API server's IP address:

{
   "longitude":-84.3846,
   "latitude":33.8379,
   "asn":"AS7489",
   "offset":"-4",
   "ip":"162.245.217.117",
   "area_code":"0",
   "continent_code":"NA",
   "dma_code":"0",
   "city":"Atlanta",
   "timezone":"America\/New_York",
   "region":"Georgia",
   "country_code":"US",
   "isp":"HostUS",
   "postal_code":"30305",
   "country":"United States",
   "country_code3":"USA",
   "region_code":"GA"
}

JsonIP API Usage

Get your IP address: http://api.petabyet.com/jsonip

JsonIP Example Output

{"ip":"192.168.1.1"}

Error Output

When an error occurs (eg. Bad input), an error message will be presented.

HTTP: 400 (Bad Request)
JSON Response:
{"code":400,"errormessage":"You did not enter a valid IP address"}

Simple IP

You can now get your IP in plain text without any formatting. This is useful for shell scripts and web applications as no Json is involved.

To access, visit http://api.petabyet.com/ip

Acknowledgement

This product includes GeoLite data created by MaxMind, available from http://www.maxmind.com.