Querying the service
Visitor API
You can show the physical location of visitors to your site by including a couple lines of code. Include the following code in your site where you want the widget to appear:
<div id="revipvisitors"></div>
<script type="text/javascript" src="http://api.revip.info/visitor.js"></script>
<script type="text/javascript">
revip_history('revipvisitors');
</script>
Example:Optionally, you can disable the date and time of the visit by using:
<div id="revipvisitors"></div>
<script type="text/javascript" src="http://api.revip.info/visitor.js"></script>
<script type="text/javascript">
revip.showtime=0;
revip_history('revipvisitors');
</script>
Example:Visitor Javascript API
Geolocation information for the current visitor is available by including our JSAPI code in your site.
<script type="text/javascript" src="http://api.revip.info/jsapi"></script>
The following variables and parameters are exposed under the namespace revip.IPInfo:AbuseContact ~ Email address(es) of abuse contacts
AreaCode ~ NPA/prefix for the local calling area
City ~ City name
Country ~ Country name
CountryCode ~ Country code (2 letters)
IP ~ IP of visitor
Latitude ~ Latitude in decimal format
Longitude ~ Longitude in decimal format
NetOwner ~ Network owner (ISP)
PostalCode ~ Postal/zip code
Province ~ Province/state name
QueryTime ~ Time spent by server building this response
Status ~ Response code from server
For example, the visitor's city name can be accessed with the variable revip.IPInfo.City.
Full API
RevIP.info has published a public API free for non-commercial use as long as you meet the following requirements:
- Perform no more than 25 queries per 5-minute period
- Perform no more than 500 queries per 24-hour period
- Use this data only for personal or educational purposes
- Do not resell or redistribute this data in any way
The query limits are automatically enforced with a temporary warning but frequent abusers will be irrevocably blocked. If you would like to perform more queries or plan to use this data for commercial purposes then please contact us to discuss an API key or rate-limit exception.
The API can be queried by performing a single HTTP GET request in the following format:
http://api.revip.info/api?format=<RESULTFORMAT>&type=<QUERYTYPE>&query=<ADDRESS>
Full API Query Types
ipinfo
format: json, jsonp, text (optional; default: json)
getdomains: true, false (optional; default: false)
query: IPv4/IPv6 address, fully qualified domain name (required)
Returns available information on provided address including network owner, abuse contacts, geolocation and rDNS. Additionally, returns a list of domains hosted on that IP if the getdomains parameter is set to true.
To retrieve all available information including domains for 74.125.95.99, perform the query:
http://api.revip.info/api?type=ipinfo&query=74.125.95.99&format=json&getdomains=true
which returns:
{
"Longitude": "-122.057",
"Status": "Success",
"Domains": [
"www2.l.google.com",
"maps.l.google.com",
"ipv4.ipv6-exp.l.google.com",
"scholar.l.google.com",
"news.l.google.com",
"dualstack.ipv6-exp.l.google.com",
"google.com.hk",
"t3.gstatic.com",
"tbn.l.google.com",
"google.es",
"t0.gstatic.com",
"scholar.google.com",
"google.net",
],
"City": "Mountain View",
"NeighborAfter": "74.125.95.100",
"DomainCount": "13",
"DnsMatch": "Yes",
"Province": "California",
"NetOwner": "Google Inc.",
"QueryTime": "0.00151",
"AsnNetwork": "74.125.94.0/23",
"PostalCode": "94043",
"AsnRegDate": "2000-03-30",
"ReverseDNS": "iw-in-f99.1e100.net",
"ARecord": "74.125.95.99",
"AreaCode": "650",
"Latitude": "37.4192",
"AsNumber": "AS15169",
"Query": "74.125.95.99",
"Country": "United States",
"NeighborBefore": "74.125.95.97",
"IP": "74.125.95.99",
"AsnOwner": "Google Inc.",
"AbuseContact": "arin-contact@google.com",
"DomainsListed": 13,
"CountryCode": "US"
}
reverseip
format: json, jsonp, text (optional; default: json)
query: IPv4/IPv6 address, fully qualified domain name (required)
Returns a list of up to 5000 domains hosted on that IP.
To retrieve all available information including domains for 74.125.95.99, perform the query:
http://api.revip.info/api?type=reverseip&query=74.125.95.99&format=json
which returns:
{
"Status": "Success",
"Domains": [
"www2.l.google.com",
"maps.l.google.com",
"ipv4.ipv6-exp.l.google.com",
"scholar.l.google.com",
"news.l.google.com",
"dualstack.ipv6-exp.l.google.com",
"google.com.hk",
"t3.gstatic.com",
"tbn.l.google.com",
"google.es",
"t0.gstatic.com",
"scholar.google.com",
"google.net",
],
"NeighborAfter": "74.125.95.100",
"DomainCount": "13",
"QueryTime": "0.00151",
"Query": "74.125.95.99",
"NeighborBefore": "74.125.95.97",
"IP": "74.125.95.99",
"DomainsListed": 13,
}