2017-09-26 23:25:40 +02:00
|
|
|
[![Build Status](https://travis-ci.org/jedisct1/iptoasn-webservice.svg?branch=master)](https://travis-ci.org/jedisct1/iptoasn-webservice)
|
|
|
|
|
2016-10-26 13:09:33 +02:00
|
|
|
# iptoasn-webservice
|
2016-10-27 17:32:38 +02:00
|
|
|
|
2018-10-29 17:34:21 +01:00
|
|
|
Webservice to map IP addresses to AS information.
|
2016-10-27 17:32:38 +02:00
|
|
|
|
|
|
|
This is the source code of the public API from [iptoasn.com](https://iptoasn.com).
|
|
|
|
|
2018-10-29 17:34:21 +01:00
|
|
|
Requires [rust](https://www.rust-lang.org/).
|
2016-10-27 17:32:38 +02:00
|
|
|
|
|
|
|
# Usage:
|
|
|
|
|
|
|
|
```sh
|
|
|
|
$ curl https://api.iptoasn.com/v1/as/ip/<ip address>
|
|
|
|
```
|
|
|
|
```json
|
|
|
|
{
|
|
|
|
"announced": true,
|
|
|
|
"as_country_code": "US",
|
|
|
|
"as_description": "LEVEL3 - Level 3 Communications, Inc.",
|
|
|
|
"as_number": 3356,
|
|
|
|
"first_ip": "4.0.0.0",
|
2017-09-26 23:25:40 +02:00
|
|
|
"ip": "4.3.2.1",
|
2016-10-27 17:32:38 +02:00
|
|
|
"last_ip": "4.23.87.255"
|
|
|
|
}
|
|
|
|
```
|