Search Autonomous Systems
GEThttps://api-ip-intelligence.dataandapis.com/v1/asns
Search Autonomous Systems é um endpoint da IP Intelligence API. País, ASN, datacenter, nuvem e detecção de Tor com pontuação de risco explicável para qualquer IP.
Envie sua chave no header X-Api-Key. Cada chamada custa 1 token; uma chave gratuita inclui 500 tokens por mês.
Requisição
Parâmetros de consulta
| Parâmetro | Exemplo | |
|---|---|---|
| country | DE | Opcional |
| limit | 20 | Opcional |
| page | 1 | Opcional |
| q | hetzner | Opcional |
Exemplo de requisição
curl
curl "https://api-ip-intelligence.dataandapis.com/v1/asns?country=DE&limit=20&page=1&q=hetzner" \
-H "X-Api-Key: YOUR_API_KEY"JavaScript / TypeScript (pacote dataandapis)
// npm install dataandapis
import { DataAndApis } from "dataandapis";
const client = new DataAndApis(); // reads DATAANDAPIS_API_KEY
const data = await client.ipIntelligence.searchAutonomousSystems({
country: "DE",
limit: 20,
page: 1,
q: "hetzner",
});Node.js (fetch)
const res = await fetch("https://api-ip-intelligence.dataandapis.com/v1/asns?country=DE&limit=20&page=1&q=hetzner", {
headers: { "X-Api-Key": process.env.DATAANDAPIS_KEY },
});
const data = await res.json();Python (pacote dataandapis)
# pip install dataandapis
from dataandapis import DataAndApis
client = DataAndApis() # reads DATAANDAPIS_API_KEY
data = client.ip_intelligence.search_autonomous_systems(
country="DE",
limit=20,
page=1,
q="hetzner",
)Python (requests)
import os, requests
r = requests.get(
"https://api-ip-intelligence.dataandapis.com/v1/asns?country=DE&limit=20&page=1&q=hetzner",
headers={"X-Api-Key": os.environ["DATAANDAPIS_KEY"]},
)
data = r.json()Guia do pacote npm dataandapis →Guia do pacote Python dataandapis →
Exemplo de resposta
Exemplo de resposta{
"ok": true,
"total": 10,
"page": 1,
"limit": 5,
"count": 5,
"results": [
{
"asn": 13335,
"organization": "CLOUDFLARENET",
"registry_country": "US"
},
{
"asn": 14789,
"organization": "CLOUDFLARENET",
"registry_country": "US"
},
{
"asn": 132892,
"organization": "CLOUDFLARE Cloudflare, Inc.",
"registry_country": "US"
},
{
"asn": 139242,
"organization": "CSL-AS-AP Cloudflare Sydney, LLC",
"registry_country": "US"
},
{
…
Ver resposta completa
Exemplo de resposta
{
"ok": true,
"total": 10,
"page": 1,
"limit": 5,
"count": 5,
"results": [
{
"asn": 13335,
"organization": "CLOUDFLARENET",
"registry_country": "US"
},
{
"asn": 14789,
"organization": "CLOUDFLARENET",
"registry_country": "US"
},
{
"asn": 132892,
"organization": "CLOUDFLARE Cloudflare, Inc.",
"registry_country": "US"
},
{
"asn": 139242,
"organization": "CSL-AS-AP Cloudflare Sydney, LLC",
"registry_country": "US"
},
{
…{
"ok": true,
"total": 10,
"page": 1,
"limit": 5,
"count": 5,
"results": [
{
"asn": 13335,
"organization": "CLOUDFLARENET",
"registry_country": "US"
},
{
"asn": 14789,
"organization": "CLOUDFLARENET",
"registry_country": "US"
},
{
"asn": 132892,
"organization": "CLOUDFLARE Cloudflare, Inc.",
"registry_country": "US"
},
{
"asn": 139242,
"organization": "CSL-AS-AP Cloudflare Sydney, LLC",
"registry_country": "US"
},
{
"asn": 202623,
"organization": "CLOUDFLARENET-CORE Cloudflare, Inc.",
"registry_country": "US"
}
]
}