{
"success": true,
"data": {
"name": "POZMAN",
"org": "Institute of Bioorganic Chemistry Polish Academy of Science, Poznan Supercomputing and Networking Center",
"phone": "+48 61 8582010",
"email": null,
"domain": "poznan.pl",
"status": "ASSIGNED",
"created": "2004-04-17T11:47:57Z",
"type": "education",
"registry": "RIPE",
"prefixes": {
"ipv4": [
"150.254.0.0/16",
"62.3.160.0/19"
],
"ipv6": [
"2001:808::/35"
],
"total": 3
},
"number": "AS9112",
"country_code": "PL"
},
"execution_ms": 0
}
{
"success": false,
"code": 101,
"type": "invalid_key",
"description": "The API Key is missing or invalid."
}
ASN lookup
curl --request GET \
--url https://v2.greipapi.com/lookup/asn/{asn} \
--header 'Authorization: Bearer <token>'import requests
url = "https://v2.greipapi.com/lookup/asn/{asn}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://v2.greipapi.com/lookup/asn/{asn}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://v2.greipapi.com/lookup/asn/{asn}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://v2.greipapi.com/lookup/asn/{asn}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://v2.greipapi.com/lookup/asn/{asn}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://v2.greipapi.com/lookup/asn/{asn}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body
{
"success": true,
"data": {
"name": "POZMAN",
"org": "Institute of Bioorganic Chemistry Polish Academy of Science, Poznan Supercomputing and Networking Center",
"phone": "+48 61 8582010",
"email": null,
"domain": "poznan.pl",
"status": "ASSIGNED",
"created": "2004-04-17T11:47:57Z",
"type": "education",
"registry": "RIPE",
"prefixes": {
"ipv4": [
"150.254.0.0/16",
"62.3.160.0/19"
],
"ipv6": [
"2001:808::/35"
],
"total": 3
},
"number": "AS9112",
"country_code": "PL"
},
"execution_ms": 0
}
{
"success": false,
"code": 101,
"type": "invalid_key",
"description": "The API Key is missing or invalid."
}
Data Lookup
ASN Lookup
This API method allows you to look up any given Autonomous System Number (ASN) and retrieve comprehensive data associated with it.
The information returned includes the ASN name, organization name, country, associated domain, contact email, phone number, and more. This functionality is essential for network analysis, troubleshooting, and understanding the infrastructure behind IP addresses.
{
"success": true,
"data": {
"name": "POZMAN",
"org": "Institute of Bioorganic Chemistry Polish Academy of Science, Poznan Supercomputing and Networking Center",
"phone": "+48 61 8582010",
"email": null,
"domain": "poznan.pl",
"status": "ASSIGNED",
"created": "2004-04-17T11:47:57Z",
"type": "education",
"registry": "RIPE",
"prefixes": {
"ipv4": [
"150.254.0.0/16",
"62.3.160.0/19"
],
"ipv6": [
"2001:808::/35"
],
"total": 3
},
"number": "AS9112",
"country_code": "PL"
},
"execution_ms": 0
}
{
"success": false,
"code": 101,
"type": "invalid_key",
"description": "The API Key is missing or invalid."
}
GET
/
lookup
/
asn
/
{asn}
ASN lookup
curl --request GET \
--url https://v2.greipapi.com/lookup/asn/{asn} \
--header 'Authorization: Bearer <token>'import requests
url = "https://v2.greipapi.com/lookup/asn/{asn}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://v2.greipapi.com/lookup/asn/{asn}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://v2.greipapi.com/lookup/asn/{asn}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://v2.greipapi.com/lookup/asn/{asn}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://v2.greipapi.com/lookup/asn/{asn}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://v2.greipapi.com/lookup/asn/{asn}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body
{
"success": true,
"data": {
"name": "POZMAN",
"org": "Institute of Bioorganic Chemistry Polish Academy of Science, Poznan Supercomputing and Networking Center",
"phone": "+48 61 8582010",
"email": null,
"domain": "poznan.pl",
"status": "ASSIGNED",
"created": "2004-04-17T11:47:57Z",
"type": "education",
"registry": "RIPE",
"prefixes": {
"ipv4": [
"150.254.0.0/16",
"62.3.160.0/19"
],
"ipv6": [
"2001:808::/35"
],
"total": 3
},
"number": "AS9112",
"country_code": "PL"
},
"execution_ms": 0
}
{
"success": false,
"code": 101,
"type": "invalid_key",
"description": "The API Key is missing or invalid."
}
Authentication
Include your API key in theAuthorization header:
Authorization: Bearer <api_key>
Path parameters
string
required
The ASN you want to look up.Sample value:
AS6167 or 6167Query parameters
string
default:"JSON"
The format command is used to get a response in a specific format.Expected values:
JSON, XML, CSV, or NewlineFor more information please refer to Response format.string
default:"live"
The mode command is used in the development stage to simulate the integration process before releasing it to the production environment.Expected values:
live, or test.For more information please refer to Development environment.string
Optional label for your own analytics or support correlation (for example a product or channel name).
string
The user_id command can be used to identify requests sent by specific users to monitor in the Events page.Expected values: email address, phone number, user id, name, etc.For more information please refer to User identifier.
Response properties
boolean
required
true when the request succeeded; false on error.object
required
Hide properties
Hide properties
string
required
Autonomous System Number youâre looking up.
string
required
Name of the organization.
string
required
Country code of the organization.
string
required
Organization name.
string
required
Phone number contact for the organization.
string
required
Email contact for the organization.
string
required
Domain associated with the organization.
string
required
Status of the organization.
string
required
Date of organization creation.
string
required
Type of organization (âispâ, âhostingâ, âbusinessâ, âeducationâ, or
âgovernmentâ).
string
required
Registration information of the organization.
integer
required
Time taken to process the request (milliseconds).
Was this page helpful?