IPify API

Beginner's Pick Development / No Auth Required Beginner HTTPS
Free to Use
78 B
Measured Score 0 50 100 Speed 19/30 Consistency 20/20 Security 20/20 Browser access 15/15 Transparency 4/15 TESTED 2026-08-10

Overview

IPify is an extremely simple, free API with no authentication required that returns your current public IP address as plain text or JSON. It is ideal for scripts, apps, or server-side code that need to discover their external IP address dynamically. With no rate limits and no API key, it is one of the most beginner-friendly APIs available.

Beginner Tip

Just hit https://api.ipify.org to get your IP as plain text, or add ?format=json for a JSON response. This is a perfect first API call for anyone learning to work with REST APIs.

Measurement Record

What actually happened when we called this API from our own infrastructure. Every value below was recorded by the request, not copied from the provider's documentation.

Request
GET https://api.ipify.org?format=json
Result
HTTP 200 · application/json · 24 bytes
Response time
197 ms (median of 3) · fastest 193 ms
Transport
TLSv1.3 · TLS_AES_256_GCM_SHA384 · certificate issued by Google Trust Services
Browser CORS
Allowed — Access-Control-Allow-Origin: *
Served by
cloudflare
Recorded
2026-08-10

Fields Returned

Top-level fields present in the response we captured, with the type and value we actually received.

Field Type Value received
ip string 119.170.249.193

Captured Response

Captured from a real request to https://api.ipify.org?format=json on 2026-08-10. Long arrays and nested objects are truncated to keep the shape readable.

JSON Response · Captured
{
  "ip": "119.170.249.193"
}

Field Reference

ip Your current public IP address as seen by the server (IPv4 or IPv6 depending on endpoint used)

Implementation Example

Calls a real endpoint of this API. Replace any placeholder credentials with your own key.

Request
const url = "https://api.ipify.org?format=json";
const response = await fetch(url);
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

How This API Fails

We deliberately sent this API a broken request and recorded exactly what came back on 2026-08-10. Knowing the shape of an error before you hit it makes error handling much easier to write.

HTTP 404 Requesting a path that does not exist unknown

Returned an HTML error page rather than JSON — worth knowing if your client assumes every response can be parsed as JSON.

Common Errors & Troubleshooting

Generated guidance based on this API's documentation, not observed by us. Treat it as a starting point and check against the provider's own error reference.

Getting a private IP instead of public IP The request was made from within a NAT or local network without going through a public-facing interface
This API returns the IP seen by the server, which should be your public IP; if you see a private address, check your network routing or proxy settings
Response is plain text but JSON expected The format parameter was not added to the request
Use https://api.ipify.org?format=json to get a JSON response with the ip field
IPv6 address returned when IPv4 expected Your system or ISP prefers IPv6 connections
Use https://api4.ipify.org to force an IPv4 response, or https://api6.ipify.org for IPv6

Measured Score Breakdown

Live HTTP request to the API endpoint

Speed 19/30
Consistency 20/20
Security 20/20
Browser access 15/15
Transparency 4/15
Endpoint Response Time 197ms

Fully tested on Aug 10, 2026

Technical Specifications

Auth No Auth
HTTPS REQUIRED
CORS UNKNOWN
Category Development
Difficulty Beginner
Endpoint last called: 2026-08-10

Related Tags

Similar APIs

View All →