API v1

API Documentation

Public REST API for IP geolocation, network tools and security verification.

RESTJSONSSECORS Base URLhttps://mon-ip.dev
Authentication

API Key

The API is publicly accessible without authentication. For higher limits, create an account and generate an API key from your dashboard. Open the dashboard →

Pass your key via the Authorization header:

HTTP Header
Authorization: Bearer mk_votre_cle_api
Example · curl
$ curl https://mon-ip.dev/api/v1/json -H "Authorization: Bearer mk_a1b2c3d4e5f6..."
Limits

Rate limiting

Requests are limited based on your access level. If exceeded, the API returns a 429 Too Many Requests error.

TierPer hourPer dayMax keys
Public100 / IP500 / IP—
Free1 00010 0005
Prosoon10 000100 00020
Response headers

Each response includes headers to track your usage:

X-RateLimit-LimitMaximum allowed requests per hour
X-RateLimit-RemainingRemaining requests in the current window
X-RateLimit-ResetUNIX timestamp of counter reset
Errors

Error codes

In case of error, the response contains an error field with a descriptive message.

400Missing or invalid parameter
401Invalid or revoked API key
429Request limit exceeded (rate limit)
502Internal service connection error
500Internal server error
429 Too Many Requests
{
"error": "Rate limit exceeded",
"limit": 100,
"reset": 1709913600
}

Terminal (curl)

No key, no parameters: query the site root directly from curl, wget, HTTPie or PowerShell. Responses are never cached and CORS is allowed.

GET /

Returns your public IP address as plain text followed by a newline when the request comes from a command-line client (curl, wget, HTTPie, PowerShell…). The /ip path returns the same response from any client.

Request
$ curl mon-ip.dev
Response · text/plain
203.0.113.42
GET /json

Geolocation and network details for your IP, as indented JSON (readable straight in the terminal).

JSON Response
ipstringIP address looked up
ipTypestringVersion: IPv4 or IPv6
ipClassstringIP class (A, B, C)
hostnamestringReverse DNS
countrystringCountry
countryCodestringISO 3166-1 country code (2 letters)
citystringCity
continentstringContinent
postalCodestringPostal code (if known)
latitudenumberApproximate latitude
longitudenumberApproximate longitude
timezonestringTime zone (IANA)
providerstringInternet provider or operator
asnnumberAutonomous system number (AS)
Request
$ curl mon-ip.dev/json
Response · application/json
{
"ip": "203.0.113.42",
"ipType": "IPv4",
"ipClass": "C",
"hostname": "42.113.0.203.example.net",
"country": "France",
"countryCode": "FR",
"city": "Paris",
"continent": "Europe",
"latitude": 48.8566,
"longitude": 2.3522,
"timezone": "Europe/Paris",
"provider": "Orange SA",
"asn": 3215
}
GET /{ip}/json

The same details for any IPv4 or IPv6 address given in the path. Missing fields are omitted.

Parameters
iprequiredIPv4 or IPv6 address to look up, in the path (e.g. 8.8.8.8)
Request
$ curl mon-ip.dev/8.8.8.8/json
Response · application/json
{
"ip": "8.8.8.8",
"ipType": "IPv4",
"ipClass": "A",
"country": "United States",
"countryCode": "US",
"city": "Mountain View",
"continent": "North America",
"latitude": 37.422,
"longitude": -122.085,
"provider": "Google LLC",
"asn": 15169
}

IP & Geolocation

GET /api/v1/json

Returns geolocation, ISP and security information for the client's IP.

JSON Response
ipstringIPv4 address
ipv6stringIPv6 address (if available)
hostnamestringReverse DNS
typestringIP type (Residential, Business, etc.)
classstringIP class (A, B, C)
locationobjectcountry, countryCode, city, continent, latitude, longitude, timezone, postalCode
networkobjectprovider, asn
securityobjectSecurity indicators (proxy, VPN, Tor, etc.)
Request
$ curl https://mon-ip.dev/api/v1/json
Response · application/json
{
"ip": "203.0.113.42",
"hostname": "42.113.0.203.example.net",
"type": "Residential",
"class": "C",
"location": {
"country": "France",
"countryCode": "FR",
"city": "Paris",
"latitude": 48.8566,
"longitude": 2.3522,
"timezone": "Europe/Paris"
},
"network": { "provider": "Orange SA", "asn": "AS3215" },
"security": { "proxy": false, "vpn": false, "tor": false }
}
GET /api/v1/ipv6

Detects whether the client is connecting via IPv4 or IPv6.

JSON Response
ipstringClient IP address
is_ipv4booleantrue if IPv4
is_ipv6booleantrue if native IPv6
protocolstring"IPv4" or "IPv6"
timestampstringISO 8601 timestamp
Request
$ curl https://mon-ip.dev/api/v1/ipv6
Response · application/json
{
"ip": "203.0.113.42",
"is_ipv4": true,
"is_ipv6": false,
"protocol": "IPv4",
"timestamp": "2026-03-09T14:30:00Z"
}

DNS & Domains

GET /api/v1/dns

Performs a DNS resolution for a given record type.

Parameters
hostrequiredDomain name (e.g., google.com)
record_typerequiredType: A, AAAA, MX, NS, TXT, CNAME, SOA, PTR, SRV
JSON Response
hoststringQueried domain
recordsarrayList of records: record_type, value, ttl
Request
$ curl "https://mon-ip.dev/api/v1/dns?host=google.com&record_type=MX"
Response · application/json
{
"host": "google.com",
"records": [
{ "record_type": "MX", "value": "10 smtp.google.com", "ttl": 300 }
]
}
GET /api/v1/whois

Returns WHOIS information for a domain or IP.

Parameters
targetrequiredDomain or IP (e.g., google.com)
JSON Response
targetstringQueried target
rawstringRaw WHOIS response
parsedobjectdomain_name, registrar, creation_date, expiration_date, name_servers, status, dnssec
cachedbooleantrue if result is from cache
Request
$ curl https://mon-ip.dev/api/v1/whois?target=google.com
Response · application/json
{
"target": "google.com",
"parsed": {
"domain_name": "google.com",
"registrar": "MarkMonitor Inc.",
"creation_date": "1997-09-15",
"expiration_date": "2028-09-14",
"name_servers": ["ns1.google.com", "ns2.google.com"],
"dnssec": "unsigned"
},
"cached": false
}
GET /api/v1/ssl

Checks the SSL/TLS certificate of a domain by connecting to port 443.

Parameters
hostrequiredDomain name (e.g., google.com)
JSON Response
hoststringTested domain
validbooleantrue if certificate is valid
days_remainingnumberDays until expiration
subjectstringSubject (CN)
issuerstringIssuer (CN)
issuer_orgstringIssuer organization
valid_fromstringStart date (ISO 8601)
valid_tostringExpiration date (ISO 8601)
serialstringSerial number
fingerprintstringSHA-256 fingerprint
protocolstringTLS protocol (e.g., TLSv1.3)
bitsnumber | nullKey size in bits
alt_namesstring[]Subject alternative names (SAN)
Request
$ curl https://mon-ip.dev/api/v1/ssl?host=google.com
Response · application/json
{
"host": "google.com",
"valid": true,
"days_remaining": 62,
"subject": "*.google.com",
"issuer": "GTS CA 1C3",
"protocol": "TLSv1.3",
"alt_names": ["*.google.com", "google.com"]
}

Security

GET /api/v1/blacklist

Checks if an IPv4 address is listed in 8 DNS blacklists.

Parameters
iprequiredIPv4 address (e.g., 8.8.8.8)
JSON Response
ipstringTested IP
totalnumberNumber of lists tested
listednumberNumber of lists where IP appears
cleanbooleantrue if IP is not on any list
resultsarrayDetail per list: name, zone, listed
Request
$ curl https://mon-ip.dev/api/v1/blacklist?ip=8.8.8.8
Response · application/json
{
"ip": "8.8.8.8",
"total": 8,
"listed": 0,
"clean": true,
"results": [
{ "name": "Spamhaus ZEN", "zone": "zen.spamhaus.org", "listed": false }
]
}

Network

GET /api/v1/ping SSE

Sends ICMP packets and returns results in real-time via Server-Sent Events.

Parameters
hostrequiredHost or IP (e.g., 8.8.8.8)
countoptionalNumber of packets (default: 4)
SSE Events
starthost, resolved_ip
replyseq, ip, time_ms, ttl
timeoutseq
donealive, packets_sent, packets_received, packet_loss, min_ms, avg_ms, max_ms
errormessage
Request
$ curl -N "https://mon-ip.dev/api/v1/ping?host=8.8.8.8&count=4"
Response · text/event-stream
data: {"type":"start","host":"8.8.8.8","resolved_ip":"8.8.8.8"}
data: {"type":"reply","seq":1,"ip":"8.8.8.8","time_ms":12.4,"ttl":118}
data: {"type":"reply","seq":2,"ip":"8.8.8.8","time_ms":11.8,"ttl":118}
data: {"type":"done","alive":true,"packets_sent":4,"packets_received":4,"packet_loss":0,"min_ms":11.2,"avg_ms":12.0,"max_ms":12.8}
GET /api/v1/traceroute SSE

Traces the network path to a host in real-time via Server-Sent Events.

Parameters
hostrequiredHost or IP (e.g., google.com)
SSE Events
starthost, resolved_ip
hophop, ip, hostname, rtt_ms
donetotal_hops, reached
errormessage
Request
$ curl -N https://mon-ip.dev/api/v1/traceroute?host=google.com
Response · text/event-stream
data: {"type":"start","host":"google.com","resolved_ip":"142.250.179.110"}
data: {"type":"hop","hop":1,"ip":"192.168.1.1","hostname":"gateway","rtt_ms":1.2}
data: {"type":"hop","hop":2,"ip":"10.0.0.1","hostname":"isp-router","rtt_ms":5.4}
data: {"type":"done","total_hops":12,"reached":true}
CORSAll endpoints accept cross-origin requests (CORS).
SSEPing and traceroute endpoints use Server-Sent Events. EventSource / curl -N
KEYYour API key is shown only once when created. Keep it safe.
SECAPI keys are encrypted with AES-256-GCM at rest.
CLIcurl mon-ip.dev returns only the IP: ideal in a script (IP=$(curl -s mon-ip.dev)).
Back to home

Get your IP from the terminal

Use our API or the curl command to integrate mon-ip.dev into your scripts.

JSON API →