OpenIPApi를 애플리케이션에 통합하는 데 필요한 모든 것. 기본 URL: https://api.openipapi.com (/v1로 버전 관리).
threat_score와 VPN/프록시/Tor 플래그는 의사결정 로직에 대한 입력입니다. 계정, 결제, 기기, 행동 신호와 결합하여 사용하시고, 차단의 유일한 근거로 사용하지 마십시오. 자세한 내용은 데이터 방법론을 참조하십시오.
모든 API 요청에는 X-API-Key 요청 헤더에 API 키를 포함해야 합니다. API 키는 콘솔.
X-API-Key: oip_your_api_key_here
모든 API 요청은 HTTPS를 통해 다음 기본 URL로 이루어집니다:
https://api.openipapi.com
기계 판독 가능 사양 (OpenAPI 3.1): /openapi.yaml.
모든 응답은 JSON입니다. 성공적인 응답은 HTTP 200.
오류 응답은 적절한 4xx 또는 5xx 상태 코드와 error 필드를 반환합니다.
{
"error": "invalid_api_key",
"message": "The provided API key is invalid or has been revoked.",
"status": 401
}
단일 IP 주소의 위치정보, 네트워크, 위협 데이터를 조회합니다.
https://api.openipapi.com/v1/lookup/{ip}
| 파라미터 | 유형 | 설명 |
|---|---|---|
| ip | path | 조회할 IPv4 또는 IPv6 주소. |
| fields | query (optional) | 반환할 최상위 필드의 쉼표로 구분된 목록: geo,network,threat,abuse. |
| date | query (optional) | 과거 조회 — 지정된 날짜의 이 IP 스냅샷을 반환합니다 (YYYY-MM-DD). 최대 365일 이전까지. 다음이 필요합니다 Pro+. 다음을 반환합니다 no_snapshot 해당 날짜에 데이터가 없는 경우 오류. |
| 필드 | 설명 | 플랜 |
|---|---|---|
| ip | The queried IP address. | All |
| type | IPv4 or IPv6. | All |
| geo.country_code | 2-letter ISO 3166-1 country code. | All |
| geo.country | Full country name. | All |
| geo.region | Region / state name. | All |
| geo.region_code | Region / state code. | All |
| geo.city | City name. | All |
| geo.postal_code | Postal / ZIP code. | All |
| geo.latitude | Latitude (decimal degrees). | All |
| geo.longitude | Longitude (decimal degrees). | All |
| geo.timezone | IANA timezone identifier (e.g. Europe/Berlin). | All |
| geo.is_sanctioned | True if the country is on OFAC, EU, or UN sanction lists. | All |
| geo.sanction_lists | Array of applicable sanction programs, e.g. ["OFAC","EU"]. | All |
| network.asn | Autonomous System Number. | Starter+ |
| network.as_name | AS organisation name. | Starter+ |
| network.as_domain | AS organisation domain. | Starter+ |
| network.isp | Internet Service Provider name. | All |
| network.organization | Network organisation name. | All |
| network.connection_type | residential, datacenter, mobile, education, or government. | All |
| threat.is_vpn | True if the IP is a known VPN endpoint. | Pro+ |
| threat.is_proxy | True if the IP is a known open proxy. | Pro+ |
| threat.is_tor | True if the IP is a Tor exit node. | Pro+ |
| threat.is_relay | True if the IP is an anonymous relay. | Pro+ |
| threat.is_hosting | True if the IP belongs to a hosting provider. | Pro+ |
| threat.threat_score | Composite risk score 0–100. A signal, not a final verdict — combine with account, payment, device and behavior data. | Pro+ |
| threat.threat_categories | Array of threat category strings. | Pro+ |
| threat.bot_type | Verified bot identifier (e.g. "googlebot", "bingbot") or null. Verified via reverse-DNS + forward confirmation. | All |
| abuse.contact_email | Abuse contact email from WHOIS data. | Pro+ |
$ curl https://api.openipapi.com/v1/lookup/185.220.101.45 \
-H "X-API-Key: oip_your_api_key_here"
{
"ip": "185.220.101.45",
"type": "IPv4",
"geo": {
"country_code": "DE",
"country": "Germany",
"region": "Hessen",
"region_code": "HE",
"city": "Frankfurt am Main",
"postal_code": "60313",
"latitude": 50.1109,
"longitude": 8.6821,
"timezone": "Europe/Berlin",
"is_sanctioned": false,
"sanction_lists": []
},
"network": {
"asn": 205100,
"as_name": "F3 Netze e.V.",
"as_domain": "f3netze.de",
"isp": "F3 Netze",
"organization": "F3 Netze e.V.",
"connection_type": "datacenter"
},
"threat": {
"is_vpn": true,
"is_proxy": false,
"is_tor": true,
"is_relay": false,
"is_hosting": true,
"threat_score": 85,
"threat_categories": ["tor_exit_node", "known_abuser"],
"bot_type": null
},
"abuse": {
"contact_email": "abuse@f3netze.de"
}
}
단일 요청으로 여러 IP 주소를 조회합니다. 일괄 크기 제한은 플랜에 따라 다릅니다.
https://api.openipapi.com/v1/lookup/batch
plan_required 오류를 받습니다. | 플랜 | 요청당 최대 IP 수 |
|---|---|
| Starter | 100 |
| Pro | 500 |
| Business | 1,000 |
| Enterprise | 5,000 |
{
"ips": [
"185.220.101.45",
"8.8.8.8",
"1.1.1.1"
]
}
요청과 동일한 순서로 전체 조회 객체의 래핑된 배열을 반환합니다.
{
"results": [
{ "ip": "185.220.101.45", /* full lookup object */ },
{ "ip": "8.8.8.8", /* full lookup object */ },
{ "ip": "1.1.1.1", /* full lookup object */ }
],
"count": 3
}
요청을 하는 IP 주소의 위치정보 및 위협 데이터를 반환합니다. "내 IP는?"과 같은 기능에 유용합니다.
https://api.openipapi.com/v1/me
응답은 GET /v1/lookup/{ip} 와 동일하며 호출자의 IP가 미리 채워집니다.
$ curl https://api.openipapi.com/v1/me \
-H "X-API-Key: oip_your_api_key_here"
자율 시스템 번호에 대한 자세한 정보를 검색합니다. Starter 플랜 이상이 필요합니다.
https://api.openipapi.com/v1/asn/{asn}
asn 파라미터는 13335 및 AS13335 형식을 모두 허용합니다.
$ curl https://api.openipapi.com/v1/asn/13335 \
-H "X-API-Key: oip_your_api_key_here"
{
"asn": 13335,
"as_name": "Cloudflare, Inc.",
"as_domain": "cloudflare.com",
"organization": "Cloudflare, Inc.",
"country_code": "US",
"ip_ranges_count": 1284,
"total_ips": 2359296
}
IP 주소를 검증하고 유형을 결정합니다. 조회 할당량을 소비하지 않습니다.
https://api.openipapi.com/v1/validate/{ip}
{
"ip": "185.220.101.45",
"valid": true,
"type": "IPv4",
"private": false,
"bogon": false
}
위험 수준과 실행 가능한 권고사항이 포함된 종합 사기 점수(0–100). VPN, 프록시, Tor, 데이터센터, 과거 남용 신호를 결합합니다. Starter 플랜 이상
https://api.openipapi.com/v1/fraud/{ip}
{
"ip": "185.220.101.45",
"fraud_score": 92,
"risk_level": "critical",
"signals": {
"is_vpn": true,
"is_proxy": false,
"is_tor": true,
"is_datacenter": true,
"is_known_attacker": true,
"high_risk_country": false
},
"recommendation": "block"
}
| 점수 | 위험 수준 | 권고사항 | 일반적인 조치 |
|---|---|---|---|
| 0–30 | low | allow | 요청을 허용합니다 |
| 31–60 | medium | review | 수동 검토를 위해 기록합니다 |
| 61–85 | high | challenge | CAPTCHA / 2FA / 추가 인증 요구 |
| 86–100 | critical | block | 거부 및 알림 |
60개 이상의 활성 프로빙 노드에서 얻은 실시간 네트워크 프로브 데이터: 개방된 TCP 포트, 서비스 배너, 역방향 DNS, 전체 TLS 인증서 세부 정보(주체, 발급자, SAN, 유효 기간), 탐지된 서비스 카테고리. Pro 플랜 이상
https://api.openipapi.com/v1/probe/{ip}
"stale": true.{
"ip": "185.220.101.45",
"reachable": true,
"last_probed": "2026-04-18T14:23:11+00:00",
"age_hours": 2.3,
"stale": false,
"refresh_queued": false,
"probe_count_24h": 14,
"probed_from_nodes": 8,
"open_ports": [
{ "port": 22, "service": "ssh", "banner": "SSH-2.0-OpenSSH_8.9p1" },
{ "port": 80, "service": "http", "banner": "nginx/1.24.0" },
{ "port": 443, "service": "https", "banner": null },
{ "port": 9001, "service": "tor-relay", "banner": null }
],
"reverse_dns": "tor-exit.f3netze.de",
"tls": {
"subject_cn": "*.f3netze.de",
"issuer": "Let's Encrypt",
"valid_from": "2026-02-10T00:00:00Z",
"valid_to": "2026-05-10T00:00:00Z",
"sans": ["f3netze.de", "*.f3netze.de"],
"fingerprint": "7e:4f:...:b2:e1"
},
"banners": {
"22": "SSH-2.0-OpenSSH_8.9p1",
"80": "nginx/1.24.0"
},
"detected_services": {
"is_tor_relay": true,
"is_ssh_open": true,
"is_web_server": true,
"is_vpn": false,
"is_proxy": false
}
}
22 (ssh), 80 / 8080 (http), 443 / 8443 (https), 1080 (socks5), 3128 / 8888 (http-proxy), 9001 / 9030 (tor-relay / tor-dir), 9050 / 9150 (tor-socks), 1194 (openvpn), 4500 (ipsec-nat-t), 51820 (wireguard).
IP가 알려진 일반 사용자 프록시 풀, 상업용 VPN, 또는 데이터센터 범위에 속하는지 식별합니다. 일반적인 is_proxy 플래그와 달리, 이 엔드포인트는 IP를 특정 제공업체(Bright Data, Oxylabs, NordVPN 등)에 귀속합니다 — 일부 제공업체는 허용하고 다른 제공업체는 차단해야 하는 사기 팀에 매우 중요합니다. Proxy Intel 애드온
https://api.openipapi.com/v1/proxy-attribution/{ip}
{
"ip": "2.56.16.42",
"detected": true,
"primary_provider": {
"provider": "unknown_vpn",
"display_name": "Unknown VPN",
"network_type": "vpn",
"confidence": 0.75
},
"networks": [
{
"provider": "unknown_vpn",
"network_type": "vpn",
"confidence": 0.75,
"source": "x4bnet-vpn",
"cidr": "2.56.16.0/22"
},
{
"provider": "unknown_datacenter",
"network_type": "datacenter",
"confidence": 0.75,
"source": "x4bnet-datacenter"
}
],
"recommendation": "treat_as_vpn"
}
residential — 일반 사용자 프록시 풀(Bright Data, Oxylabs, Smartproxy, IPRoyal, Hola, Honeygain, EarnApp, Peer2Profit, SOAX)vpn — 상업용 VPN 제공업체(NordVPN, ExpressVPN, Surfshark, Mullvad, ProtonVPN, PIA, IPVanish, CyberGhost)datacenter — 상업용 프록시 출구로 자주 사용되는 호스팅 제공업체(AWS, DigitalOcean, OVH, Hetzner 등)tor — Tor 출구 / 릴레이 노드mobile — 모바일 통신사 프록시 풀| 권고사항 | 의미 |
|---|---|
| no_proxy_detected | IP가 알려진 풀과 일치하지 않습니다 — 정상 트래픽으로 처리하세요. |
| treat_as_commercial_proxy | IP가 일반 사용자 프록시 풀에 있습니다 — 스크래핑 외 사이트에서는 악성일 가능성이 높습니다. |
| treat_as_vpn | IP가 상업용 VPN 범위에 있습니다 — VPN 정책을 적용하세요. |
| treat_as_datacenter | IP가 데이터센터 범위에서 왔습니다 — 실제 일반 사용자가 아닙니다. |
| block_or_challenge | Tor 출구 — 차단하거나 강력한 인증을 요구하세요. |
계정의 현재 청구 기간 사용 통계를 반환합니다.
https://api.openipapi.com/v1/account/usage
{
"plan": "Pro",
"period_start": "2026-03-01",
"period_end": "2026-03-31",
"lookups_used": 184320,
"lookups_limit": 500000,
"lookups_remaining": 315680,
"reset_at": "2026-04-01T00:00:00Z"
}
플랜에서 사용 가능한 MMDB 데이터베이스를 나열합니다. 오프라인 / 엣지 사용을 위한 MaxMind .mmdb 대체품 — 모든 MaxMind DB 리더(PHP, Go, Python, Node.js, Rust, Java)와 호환됩니다.
https://api.openipapi.com/v1/database/list
{
"plan": "Business",
"sources": [
{
"source": "country",
"filename": "geo-whois-asn-country.mmdb",
"size_bytes": 8225621,
"updated_at": "2026-04-18T02:00:00+00:00",
"etag": "\"fa2b851f9155838b\"",
"download_url": "https://api.openipapi.com/v1/database/download/country"
}
]
}
원시 MMDB 파일을 스트리밍합니다. ETag +
If-None-Match 조건부 GET 지원(파일이 변경되지 않은 경우 304 Not Modified). 속도 제한: 소스당 하루 10회 다운로드.
https://api.openipapi.com/v1/database/download/{source}
| 출처 | 내용 | 라이선스 | 필요 플랜 |
|---|---|---|---|
| country | 국가 코드 + ASN | CC0 | Pro |
| asn | ASN + 조직 | CC0 | Business |
| city-geolite2 | 도시, 지역, 위도/경도, 시간대(GeoLite2) | MaxMind GeoLite2 EULA | Business |
| city-dbip | 도시(GeoLite2의 대안) | DB-IP Lite | Enterprise |
# Download latest MMDB
$ curl -H "X-API-Key: YOUR_KEY" \
-o asn.mmdb \
https://api.openipapi.com/v1/database/download/asn
# Use with maxmind-db/reader
$ composer require maxmind-db/reader
<?php
use MaxMind\Db\Reader;
$reader = new Reader('asn.mmdb');
$record = $reader->get('8.8.8.8');
// ['autonomous_system_number' => 15169,
// 'autonomous_system_organization' => 'Google LLC']
모든 /v1/lookup 응답에는 IP의 국가가 국제 제재를 받는지 알려주는 두 필드가 geo 블록에 포함됩니다.
| 필드 | 설명 |
|---|---|
| geo.is_sanctioned | true 국가가 모니터링된 제재 목록에 있는 경우; false 그렇지 않은 경우. |
| geo.sanction_lists | 적용되는 제재 프로그램 식별자 배열: OFAC, EU, UN, UK. 빈 배열 [] 제재받지 않는 경우. |
지원 제재 목록: OFAC(미국), EU, UN 안전보장이사회, 영국 OFSI. 현재 표시된 국가에는 이란, 북한, 러시아, 벨라루스, 시리아, 쿠바, 베네수엘라, 수단 등이 포함됩니다. 목록은 프로그램 변경에 따라 유지 및 업데이트됩니다.
"geo": {
"country_code": "IR",
"country": "Iran",
...
"is_sanctioned": true,
"sanction_lists": ["OFAC", "EU", "UN"]
}
OpenIPApi는 이중 역방향 DNS 검증 을 수행하여 합법적인 크롤러를 식별합니다. 결과는 모든 조회의 threat.bot_type 에서 확인할 수 있습니다.
| 필드 | 값 |
|---|---|
| threat.bot_type |
null (검증된 봇이 아님) 또는 다음 중 하나: googlebot,
google_special_crawl,
bingbot,
applebot,
yandexbot,
duckduckbot,
facebookbot,
semrushbot,
ahrefsbot,
mj12bot
|
검증 방법: (1) IP에 대한 PTR 조회 → 호스트명. (2) 호스트명이 봇의 도메인 패턴과 일치해야 합니다(예: *.googlebot.com). (3) 호스트명에 대한 정방향 DNS가 원래 IP로 다시 확인되어야 합니다. 결과는 24시간 동안 캐시됩니다.
"threat": {
"is_vpn": false,
"is_proxy": false,
"is_tor": false,
"threat_score": 0,
"bot_type": "googlebot"
}
단일 IP 조회에 ?date=YYYY-MM-DD 파라미터를 추가하여 해당 날짜의 스냅샷을 검색합니다.
https://api.openipapi.com/v1/lookup/{ip}?date=2026-01-15
$ curl "https://api.openipapi.com/v1/lookup/185.220.101.45?date=2026-01-15" \
-H "X-API-Key: oip_your_api_key_here"
{
"ip": "185.220.101.45",
"snapshot_date": "2026-01-15",
"is_historical": true,
"data": {
/* standard lookup response */
}
}
{
"error": "No historical snapshot available for this IP on 2026-01-15",
"code": "no_snapshot"
}
| 코드 | HTTP 상태 | 설명 |
|---|---|---|
| invalid_api_key | 401 | API 키가 없거나, 잘못된 형식이거나, 취소되었습니다. |
| limit_exceeded | 429 | 현재 청구 기간의 모든 조회를 사용했습니다. |
| plan_required | 403 | 요청한 기능은 현재 플랜에서 사용할 수 없습니다. |
| invalid_ip | 400 | 제공된 IP 주소가 유효한 IPv4 또는 IPv6 주소가 아닙니다. |
| not_found | 404 | 요청된 리소스에 대한 데이터를 찾을 수 없습니다(예: 알 수 없는 ASN). |
| no_snapshot | 404 | 요청된 날짜에 이 IP에 대한 과거 스냅샷이 없습니다. |
| date_out_of_range | 400 | 과거 조회 날짜가 365일을 초과합니다. |
| invalid_date | 400 | 날짜 파라미터가 없거나, 잘못된 형식이거나, 미래입니다. |
| plan_upgrade_required | 403 | 요청한 기능은 더 높은 플랜 티어가 필요합니다. |
| rate_limited | 429 | 짧은 시간 내에 너무 많은 요청입니다. 잠시 후 재시도하세요. |
| internal_error | 500 | 예기치 않은 서버 오류가 발생했습니다. 계속 발생하면 지원팀에 문의하세요. |
월별 조회 할당량 외에도, 요청은 슬라이딩 윈도우를 사용하여 API 키별로 속도가 제한됩니다. 초과 시 API는 HTTP 429 와 Retry-After 헤더를 반환합니다.
| 플랜 | 분당 요청 수 | 월 조회 수 |
|---|---|---|
| Free | 30 | 10,000 |
| Starter | 120 | 100,000 |
| Pro | 300 | 500,000 |
| Business | 600 | 2,000,000 |
| Enterprise | Custom | Unlimited |
추가 제한: /v1/validate (미인증)은 호출자 IP당 분당 60개 요청으로 제한됩니다; /v1/me 는 분당 30개. MMDB 다운로드는 계정당 소스당 하루 10회로 제한됩니다. 속도 제한 응답에는 Retry-After.
Webhook을 통해 감시 중인 IP의 상태가 변경될 때 실시간 HTTP POST 알림을 받을 수 있습니다. 에서 설정하세요 콘솔 → Webhook, 또는 대시보드 UI를 통해 — API 호출이 필요 없습니다.
| 이벤트 | 발생 시점 |
|---|---|
| vpn_detected | 감시 중인 IP가 새로 VPN 엔드포인트로 탐지됩니다. |
| tor_detected | 감시 중인 IP가 Tor 출구 노드 목록에 나타나거나 Tor 릴레이로 프로빙됩니다. |
| proxy_detected | 감시 중인 IP가 개방형 또는 SOCKS 프록시로 탐지됩니다. |
| high_threat | 위협 점수가 설정된 임계값(50–95)을 초과합니다. |
POST https://your-endpoint.example.com/webhook
Content-Type: application/json
User-Agent: OpenIPApi-Webhook/1.0
X-OpenIPApi-Event: high_threat
X-OpenIPApi-Signature: sha256=8c7f1a...b2e
{
"event": "high_threat",
"delivered_at": "2026-04-18T12:34:56Z",
"webhook_id": 142,
"data": {
"ip": "185.220.101.45",
"threat_score": 92,
"previous_score": 45,
"is_tor": true,
"is_vpn": true
}
}
모든 webhook은 webhook 시크릿으로 원시 JSON 본문의 HMAC-SHA256을 사용하여 서명됩니다. 서명은 X-OpenIPApi-Signature 헤더에 sha256=<hex>.
로 전송됩니다. 페이로드에 따른 조치 전에 항상 검증하세요:
PHP
$body = file_get_contents('php://input');
$hdr = $_SERVER['HTTP_X_OPENIPAPI_SIGNATURE'] ?? '';
$expected = 'sha256=' . hash_hmac(
'sha256', $body, $webhookSecret
);
if (!hash_equals($expected, $hdr)) {
http_response_code(401);
exit;
}
// Safe to process $body now
Node.js (Express)
const crypto = require('crypto');
app.post('/webhook',
express.raw({ type: 'application/json' }),
(req, res) => {
const hdr = req.headers['x-openipapi-signature'];
const expected = 'sha256=' + crypto
.createHmac('sha256', process.env.WEBHOOK_SECRET)
.update(req.body).digest('hex');
if (expected !== hdr) return res.status(401).end();
// Process JSON.parse(req.body)
});
엔드포인트는 수신을 확인하기 위해 10초 이내에 HTTP 2xx로 응답해야 합니다. 다른 상태(또는 타임아웃)는 지수 백오프 재시도를 트리거합니다: 1분, 5분, 30분, 2시간, 12시간. 최종 시도 후 webhook이 실패로 표시되고 대시보드 알림이 발생합니다.
콘솔 → Webhook 에서 계정당 최근 100개의 배달 시도를 보여주며, 이벤트 유형, HTTP 상태 코드, 엔드포인트가 반환한 응답 본문을 표시합니다. 원본 서명 페이로드를 재전송하려면 재전송 이전 배달을 재전송하고 내장된 서명 디버거 를 사용하여 시크릿을 서버와 공유하지 않고 브라우저에서 HMAC-SHA256 서명을 검증할 수 있습니다.
재전송된 배달에는 추가 X-OpenIPApi-Replay: 1 헤더가 포함되어 엔드포인트가 라이브 이벤트와 구별할 수 있습니다.
$ curl https://api.openipapi.com/v1/lookup/8.8.8.8 \
-H "X-API-Key: oip_your_api_key_here"
$ curl -X POST https://api.openipapi.com/v1/lookup/batch \
-H "X-API-Key: oip_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"ips": ["8.8.8.8", "1.1.1.1", "185.220.101.45"]}'
$ curl https://api.openipapi.com/v1/me \
-H "X-API-Key: oip_your_api_key_here"
const response = await fetch('https://api.openipapi.com/v1/lookup/8.8.8.8', {
headers: {
'X-API-Key': 'oip_your_api_key_here'
}
});
const data = await response.json();
console.log(data.geo.country); // "United States"
console.log(data.threat.is_vpn); // false
console.log(data.threat.threat_score); // 0
const response = await fetch('https://api.openipapi.com/v1/lookup/batch', {
method: 'POST',
headers: {
'X-API-Key': 'oip_your_api_key_here',
'Content-Type': 'application/json'
},
body: JSON.stringify({
ips: ['8.8.8.8', '1.1.1.1', '185.220.101.45']
})
});
const { results } = await response.json();
for (const info of results) {
console.log(info.ip, info.geo.city, info.threat.threat_score);
}
import requests
API_KEY = "oip_your_api_key_here"
headers = {"X-API-Key": API_KEY}
r = requests.get(
"https://api.openipapi.com/v1/lookup/8.8.8.8",
headers=headers
)
r.raise_for_status()
data = r.json()
print(data["geo"]["country"]) # United States
print(data["threat"]["is_vpn"]) # False
print(data["threat"]["threat_score"]) # 0
import requests
API_KEY = "oip_your_api_key_here"
headers = {
"X-API-Key": API_KEY,
"Content-Type": "application/json"
}
payload = {
"ips": ["8.8.8.8", "1.1.1.1", "185.220.101.45"]
}
r = requests.post(
"https://api.openipapi.com/v1/lookup/batch",
json=payload,
headers=headers
)
r.raise_for_status()
for info in r.json()["results"]:
print(info["ip"], info["geo"]["city"], info["threat"]["threat_score"])