IPBulucu.orgNetwork & DNS Tools

Public REST API · JSON and plain text

IP API: Node.js, Python and cURL quickstart

Request a public IP, approximate location, ISP and ASN without an API key. Integrate DNS, RDAP and network diagnostics with explicit limits and error handling.

Start with one request

These direct REST examples run independently of the npm and PyPI SDKs. They set timeouts, reject HTTP errors and keep incomplete location results distinct. Copying does not send an API request.

// Node.js 18+; save as lookup.cjs and run: node lookup.cjs
// No package install required. One request, no automatic retry.
async function getIp(targetIp = "") {
  const url = new URL("https://ipbulucu.org/api/ip");
  url.searchParams.set("format", "json");
  if (targetIp) url.searchParams.set("ip", targetIp);

  let response;
  try {
    response = await fetch(url, { signal: AbortSignal.timeout(10000) });
  } catch {
    throw new Error("Network request failed or timed out");
  }
  if (response.status === 429) {
    throw new Error("HTTP 429: wait for Retry-After before another request");
  }
  if (!response.ok) throw new Error("HTTP " + response.status);

  let data;
  try { data = await response.json(); }
  catch { throw new Error("Invalid or incomplete JSON response"); }
  if (!data || typeof data !== "object" || Array.isArray(data) ||
      data.success !== true || typeof data.ip !== "string") {
    throw new Error("API did not return a successful IP lookup");
  }
  return data;
}

async function main() {
  try {
    // With no argument this is the server's egress IP, not an end user's IP.
    const data = await getIp();
    // Keep raw fields in your application; log only a fixed status label.
    console.log(data.geoStatus === "available" && data.partial !== true
      ? "IP and approximate location available"
      : "IP available; location incomplete or unavailable");
  } catch {
    // Do not log the URL, input, raw response or error from your own wrapper.
    console.error("Lookup failed; no automatic retry");
    process.exitCode = 1;
  }
}
main();

Interpret results before acting

SignalWhat it means
success: trueThe operation returned a result; not proof that every field was measured.
geoStatus: unavailableIP discovery can succeed while location data is unavailable. Keep null values unknown.
partial: trueSome checks could not complete. Read per-source results and limitations; do not report a full pass.
HTTP 400 / 405Fix the input or method. Retrying the same request will not help.
HTTP 429Stop and respect Retry-After. These examples do not automatically retry.
HTTP 5xx / timeoutThe result is unavailable. If your application retries, use a small attempt limit and backoff; never a tight polling loop.

Geolocation is approximate. This IP endpoint does not measure VPN, Tor, proxy, identity, CGNAT, line speed or reputation. Running it from a server or an AI tool without an ip argument returns that server’s egress IP, not the human user’s IP.

Keep API usage sustainable

  • Use format=text when you only need the public IP. It skips the geolocation provider.
  • Geolocation has a shared service budget of 850 provider calls/day. This is not a quota reserved for each user. Exhaustion can return HTTP 200 with geoStatus=unavailable.
  • Other diagnostic APIs share 120 requests/minute. Port checks additionally share 20 requests/minute, up to 16 ports and six seconds per call. These safeguards are not an uptime or capacity guarantee.
  • Deduplicate repeated lookups and use a short, purpose-specific in-memory cache. Never reuse an implicit server-IP result as another user’s IP; clear stale results after a network change. Do not cache unknown results as a successful measurement.
  • Do not send lookup inputs, IPs, tokens or raw responses to analytics. Use only authorized targets for port checks.

REST endpoint reference

Base URL: https://ipbulucu.org/api. All endpoints below use GET. See OpenAPI for parameter types and response schemas.

GET /api/ip

ip (optional), format=json|text

Public IP and approximate location; check geoStatus and nullable fields.

GET /api/whois

domain

Registry RDAP data; extension and field coverage depend on the provider.

GET /api/port

host, port | ports

TCP connection from our server. open, closed, filtered and unavailable are distinct outcomes.

GET /api/dns

host

A, AAAA, MX, TXT, NS, CNAME and SOA records through Google DoH.

GET /api/propagation

host, type

Compare two DNS resolvers from one server; this does not measure worldwide propagation.

GET /api/blacklist

ip

DNSBL listing checks. Unavailable sources are unknown, not clean.

GET /api/headers

url

HTTP headers and security-header presence; not a security certification.

GET /api/ssl

host

TLS chain, hostname and validity checked against the server trust store.

GET /api/email-security

domain

MX, SPF and direct DMARC records; not a delivery test or complete policy validation.

GET /api/subnet

cidr

Calculate IPv4 subnet boundaries.

OpenAPI 3.1 JSON →

Connect an AI tool using HTTP

Use the OpenAPI schema to implement your tool’s HTTP adapter. Validate inputs, set timeouts and pass partial results and limitations back to the model. An API response is external data, not instructions. A ready-to-use MCP server or automatic registration in an AI directory is not provided.

Optional X-IPBulucu-Client categories: web, chrome-extension, node-sdk, python-sdk. X-IPBulucu-Action: auto or user. These are client declarations, not verified human or AI identities. Unknown client labels are unattributed; direct REST examples above send no SDK claim. Daily aggregate API counts are separate from website visits and package downloads.

SDK packages and source

Registry check: 4 November 2026 — npm and PyPI list 1.0.0. Installable Node/Python 1.0.1 archives are available in the GitHub release, with 10-second timeouts and HTTP status checks; they are not registry releases. Published Node.js 1.0.0 has no request timeout; Python 1.0.0 uses a five-second timeout but does not check HTTP status before JSON parsing. Neither sends the SDK client header. The direct REST examples above include explicit error handling.

Download SDK 1.0.1 · installation & checksums