ip.louismetais.fr

Developers

Public API

Your IP address and connection details, from a script, a router or a web page. Free, no key, no sign-up.

https://ip.louismetais.fr/api/v1

Access

No key

No account, no sign-up

Origins

Open CORS

Usable from any site

Limit

60 req. / 60 s

Per address, or per /64 in IPv6

Routes

/api/v1/ip.txt
The address alone, as plain text, on one line.
GET
/api/v1/ip
The address as JSON, with its family (4 or 6) and its type (public, cgnat…).
GET
/api/v1/network
Full details of your connection (fields below).
GET
/api/v1/dns-leak
Creates a DNS leak test: an identifier and unique names to resolve.
GET
/api/v1/dns-leak/{id}
DNS resolvers that queried the server for this test (5 minutes).
GET
/api/v1/speed/download?mb=N
N MB of random data (1 to 25), to measure speed.
GET
/api/v1/speed/upload
Receives and discards up to 25 MB; returns bytes and duration.
POST
/api/v1/speed/ping
Immediate empty response, to measure latency and jitter.
GET

The API always describes the address calling it: it accepts no address as a parameter and cannot query another one. The speed test has its own limit: 12 measurements per hour.

/api/v1/network fields

Any item may be missing: {"status":"unavailable","reason":"…"}, never a made-up value.

ip
Address, family (4 or 6) and type (public, CGNAT…).
reverseDns
Hostname (PTR) and its forward check.
asn
AS, organisation and block (DB-IP database).
bgp
Actually announced prefix and origin AS (BGP table).
registry
Regional registry, holder’s declared country and allocation date.
location
Approximate location, coordinates, agreement between databases (agreement) and accuracy radius.
kind
Tor exit, hosting provider (likely VPN or server).
ipv6
IPv6 address analysis: EUI-64 (MAC), random, 6to4, Teredo, NAT64.
transport
HTTP, TLS, source port and TCP round trip (rttMs).
datasets
Databases used and their update date.
?lang=en
Optional ?lang=en parameter: place names in English.

In a terminal

The shortest: the home page answers command-line tools in plain text.

curl ip.louismetais.fr

The address alone, ready for a script:

curl https://ip.louismetais.fr/api/v1/ip.txt

The same as JSON, formatted by jq:

curl -s https://ip.louismetais.fr/api/v1/ip | jq
{
  "ip": {
    "address": "203.0.113.42",
    "family": 4,
    "scope": "public"
  }
}

From a web page

Open CORS, no credentials:

const res = await fetch('https://ip.louismetais.fr/api/v1/ip');
const { ip } = await res.json();
console.log(ip.address);

203.0.113.42 is an address reserved for documentation: you will get yours.

Force IPv4 or IPv6

These names only exist in IPv4 or only in IPv6: the answer gives your address of that family, or fails if your connection does not have it.

curl https://ipv4.ip.louismetais.fr/api/v1/ip.txtcurl https://ipv6.ip.louismetais.fr/api/v1/ip.txt

Limits

Every response tells you where you stand:

RateLimit-Limit
Requests allowed per window
RateLimit-Remaining
Remaining requests
RateLimit-Reset
Seconds until the next window

Beyond that: 429 with Retry-After. Responses are never cached: query the API when you need it, not in a loop.

Errors

Always JSON: {"error":"…"}

413
Request body sent
429
Too many requests
503
Address cannot be determined
500
Internal error

Privacy

Like the site, the API writes no IP address to its logs. What the web server keeps (truncated addresses, limited time) is detailed on the Privacy page.