GET/api/v2/me

What is my IP API

Your own public IP address, network and approximate location, as Cloudflare saw your request.

GEThttps://dnsrobot.netBase URL/api/v2Version/meEndpoint?format=Parameters
200 OKRecorded 2026-10-25. Send it to run the request live.
{
  "query": {},
  "ip": "195.250.20.4",
  "version": 4,
  "special": null,
  "hostname": "unvps0032.spidyhost.com",
  "network": {
    "asn": 199404,
    "name": "WHG Hosting Services",
    "organization": "WHG Hosting Services Ltd",
    "brand": {
      "name": "hosting.com",
      "website": "hosting.com"
    },
    "kind": "hosting",
    "service": null,
    "users": null
  },
  "location": {
    "country": "IN",
    "countryName": "India",
    "region": "Maharashtra",
    "regionCode": "MH",
    "city": "Artist Village",
    "postalCode": "400703",
    "timezone": "Asia/Kolkata",
    "latitude": 19.03227,
    "longitude": 73.04276,
    "continent": "AS",
    "eu": false,
    "source": "cloudflare"
  },
  "connection": {
    "type": "hosting",
    "tor": false,
    "relay": null,
    "colo": "HKG",
    "rttMs": 97,
    "httpProtocol": "HTTP/2",
    "tlsVersion": "TLSv1.3"
  },
  "tookMs": 1157
}

How it works

Answers the caller: the address your request came from (Cloudflare's CF-Connecting-IP, which a proxy header can't fake), your network and location from Cloudflare's own request metadata, the reverse DNS name, the Cloudflare data centre that took the request and the connection's round trip. No third-party lookup is made.

?format=text returns just the address and a newline as text/plain, for scripts: curl -s https://dnsrobot.net/api/v2/me?format=text. Errors stay JSON. Our domain has A and AAAA records, so curl -4 and curl -6 pick the family.

A VPN, iCloud Private Relay or Cloudflare WARP shows its own exit, which connection.type (relay, hosting) and network.kind tell apart from a home or mobile line.

Query parameters

  • formatstringoptionaldefault json
    json (the default) or text: just the address, as text/plain.

    one of json, text

Response fields

200 with this JSON object, plus tookMs, and incomplete with warnings when a source failed. Fields marked optional appear only when they apply.

  • queryobjectalways
    What was looked up, normalised (lower case, no trailing dot, IDNs as Punycode).
    • ipstringalways
      Your address.
    • versionintegeralways
      4 or 6.

      one of 4, 6

    • specialobject or nullalways
      The special-purpose block the address is in (IANA's IPv4 and IPv6 Special-Purpose Address Registries), or null for an ordinary address.
      Show 5 fields
      • kindstringalways
        private (RFC 1918, RFC 4193), cgnat (RFC 6598), loopback, link-local, documentation, multicast or reserved: never on the public internet, so nothing else was looked up. special-purpose: an IANA block that is on the public internet (6to4, Teredo, NAT64's well-known prefix, AS112), looked up normally.

        one of "private", "cgnat", "loopback", "link-local", "documentation", "multicast", "reserved", "special-purpose"

      • blockstringalways
        The block, e.g. 10.0.0.0/8.
      • namestring or nullalways
        IANA's name for the block, e.g. Private-Use.
      • rfcstring or nullalways
        The RFC that defines it, e.g. RFC 1918.
      • globallyReachableboolean or nullalways
        IANA's "Globally Reachable" column; null where IANA leaves it open.
    • hostnamestring or nullalways
      The reverse DNS (PTR) name of your address, or null.
    • networkobject or nullalways
      Your network, from Cloudflare's request metadata and our network table; null when Cloudflare gave none.
      Show 7 fields
      • asnintegeralways
        The AS number.
      • namestringalways
        The network's name as people read it.
      • organizationstring or nullalways
        The AS's registered organization, as Cloudflare has it.
      • brandobject or nullalways
        The brand people know ("Xfinity" for Comcast's AS7922), where our brand table has the network.
        Show 2 fields
        • namestringalways
          The brand.
        • websitestring or nullalways
          The brand's website domain.
      • kindstring or nullalways
        What kind of network it is: isp (home broadband), mobile, relay (Apple iCloud Private Relay, Cloudflare WARP), hosting (cloud, hosting, VPN exits, CDNs), satellite, other. From APNIC's user counts, a hand-checked brand table and name rules.

        one of "isp", "mobile", "relay", "hosting", "satellite", "other", null

      • servicestring or nullalways
        The brand table's service: fixed (home broadband), mobile, both or satellite.

        one of "fixed", "mobile", "both", "satellite", null

      • usersobject or nullalways
        APNIC Labs' estimate of the people online through the network in its main country, or null (not counted, or a hosting or relay network, whose "users" are VPN and relay users).
        Show 5 fields
        • countrystringalways
          ISO 3166-1 alpha-2 country code.
        • estimateintegeralways
          Estimated users there.
        • sharenumberalways
          Percent of the country's users.
        • rankintegeralways
          Rank among the networks APNIC lists there (1 = largest).
        • countryUsersinteger or nullalways
          The country's estimated internet users.
    • locationobject or nullalways
      Where Cloudflare places your request (its own geolocation, usually your city or your provider's nearest hub); null when it gave none.
      Show 12 fields
      • countrystring or nullalways
        ISO 3166-1 alpha-2 country code.
      • countryNamestring or nullalways
        The country's English name.
      • regionstring or nullalways
        Region or state.
      • regionCodestring or nullalways
        ISO 3166-2 region code, where Cloudflare gives one.
      • citystring or nullalways
        City.
      • postalCodestring or nullalways
        Postal code.
      • timezonestring or nullalways
        IANA time zone, e.g. Europe/London.
      • latitudenumber or nullalways
        Latitude.
      • longitudenumber or nullalways
        Longitude.
      • continentstring or nullalways
        Continent code: AF, AN, AS, EU, NA, OC or SA.
      • eubooleanalways
        Whether the country is in the European Union.
      • sourcestringalways
        Always cloudflare.
    • connectionobjectalways
      Your connection.
      Show 7 fields
      • typestring or nullalways
        One type for the address, most specific first: tor (the Tor Project's exit list), relay, hosting, mobile, satellite, residential (a home ISP), business; null when unknown.

        one of "tor", "relay", "hosting", "mobile", "satellite", "residential", "business", null

      • torboolean or nullalways
        Whether the address is a Tor exit right now (the Tor Project's own list, kept 30 minutes); null for IPv6 (the list has none) or when the list couldn't be read.
      • relaystring or nullalways
        A network that carries other people's traffic on purpose: icloud (Akamai's AS36183, iCloud Private Relay), cloudflare (AS13335: WARP, but also any Cloudflare server), fastly (AS54113).

        one of "icloud", "cloudflare", "fastly", null

      • colostring or nullalways
        The Cloudflare data centre that took the request (IATA airport code, e.g. LHR).
      • rttMsinteger or nullalways
        The connection's smoothed round trip to that data centre (TCP, or QUIC over HTTP/3), in milliseconds.
      • httpProtocolstring or nullalways
        The HTTP version your client used, e.g. HTTP/2.
      • tlsVersionstring or nullalways
        The TLS version, e.g. TLSv1.3.

    Errors

    • 503 unavailable The request carried no client address (it didn't come through Cloudflare's edge).

    Plus the errors every endpoint can return: 400 for a missing or unreadable parameter, 429 past the limit, 503 when every source failed.

    Code samples

    curl "https://dnsrobot.net/api/v2/me"
    const res = await fetch(`https://dnsrobot.net/api/v2/me`);
    const data = await res.json();
    if (!res.ok) throw new Error(data.error.message);
    console.log(data.ip);
    import requests
    
    r = requests.get(
        "https://dnsrobot.net/api/v2/me",
        timeout=30,
    )
    data = r.json()
    if not r.ok:
        raise RuntimeError(data["error"]["message"])
    print(data["ip"])
    package main
    
    import (
    	"encoding/json"
    	"fmt"
    	"net/http"
    )
    
    func main() {
    	res, err := http.Get("https://dnsrobot.net/api/v2/me")
    	if err != nil {
    		panic(err)
    	}
    	defer res.Body.Close()
    	var data map[string]any
    	if err := json.NewDecoder(res.Body).Decode(&data); err != nil {
    		panic(err)
    	}
    	if res.StatusCode != http.StatusOK {
    		panic(data["error"])
    	}
    	fmt.Println(data["ip"])
    }
    <?php
    $context = stream_context_create(["http" => ["ignore_errors" => true, "timeout" => 30]]);
    $data = json_decode(file_get_contents("https://dnsrobot.net/api/v2/me", false, $context), true);
    if (isset($data["error"])) {
        throw new RuntimeException($data["error"]["message"]);
    }
    print_r($data["ip"]);
    require "net/http"
    require "json"
    
    uri = URI("https://dnsrobot.net/api/v2/me")
    data = JSON.parse(Net::HTTP.get(uri))
    raise data["error"]["message"] if data["error"]
    puts data["ip"]
    // Cargo.toml: reqwest = { version = "0.13", features = ["blocking", "json"] }, serde_json = "1"
    fn main() -> Result<(), Box<dyn std::error::Error>> {
        let res = reqwest::blocking::get("https://dnsrobot.net/api/v2/me")?;
        let ok = res.status().is_success();
        let data: serde_json::Value = res.json()?;
        if !ok {
            return Err(data["error"]["message"].to_string().into());
        }
        println!("{}", data["ip"]);
        Ok(())
    }
    using System.Text.Json;
    
    using var http = new HttpClient();
    var res = await http.GetAsync("https://dnsrobot.net/api/v2/me");
    var data = JsonDocument.Parse(await res.Content.ReadAsStringAsync()).RootElement;
    if (!res.IsSuccessStatusCode)
        throw new Exception(data.GetProperty("error").GetProperty("message").GetString());
    Console.WriteLine(data.GetProperty("ip"));

    Called from a server in a data centre (our own, at hosting.com)

    GET /api/v2/me
    200 OKRecorded 2026-10-25
    {
      "query": {},
      "ip": "195.250.20.4",
      "version": 4,
      "special": null,
      "hostname": "unvps0032.spidyhost.com",
      "network": {
        "asn": 199404,
        "name": "WHG Hosting Services",
        "organization": "WHG Hosting Services Ltd",
        "brand": {
          "name": "hosting.com",
          "website": "hosting.com"
        },
        "kind": "hosting",
        "service": null,
        "users": null
      },
      "location": {
        "country": "IN",
        "countryName": "India",
        "region": "Maharashtra",
        "regionCode": "MH",
        "city": "Artist Village",
        "postalCode": "400703",
        "timezone": "Asia/Kolkata",
        "latitude": 19.03227,
        "longitude": 73.04276,
        "continent": "AS",
        "eu": false,
        "source": "cloudflare"
      },
      "connection": {
        "type": "hosting",
        "tor": false,
        "relay": null,
        "colo": "HKG",
        "rttMs": 97,
        "httpProtocol": "HTTP/2",
        "tlsVersion": "TLSv1.3"
      },
      "tookMs": 1157
    }