MY IP API

⭐ Beginner's Pick Development / No Auth Required Beginner HTTPS
Free to Use Varies (check documentation)

Overview

MY IP is a straightforward API that returns the public IP address of the caller along with associated geolocation metadata such as country, city, ISP, and coordinates. It is free to use without authentication, making it a zero-setup option for detecting user location or verifying network configuration. The API is commonly embedded in web apps to auto-fill country selectors or tailor content based on region.

💡

Beginner Tip

Just hit the endpoint with no parameters — the server reads your IP from the incoming request automatically. Combine the ip, country, and city fields to build simple geolocation features. If testing locally behind NAT or a VPN, the returned IP will reflect your external address, not 127.0.0.1.

Available Data

IP address information
geographic location
ASN and ISP data
Use case: Integrate get ip address information data into web and mobile applications

Example Response

JSON Response
{
  "status": "success",
  "data": {
    "result": "Data from MY IP",
    "description": "Get IP address information",
    "timestamp": "2025-01-15T10:00:00Z"
  }
}

Field Reference

ip The public IPv4 or IPv6 address of the requesting client.
country Full name of the country associated with the IP address.
cc ISO 3166-1 alpha-2 two-letter country code, e.g. "US" or "JP".

Implementation Example

const url = "https://www.myip.com/api-docs/";
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.

Common Errors & Troubleshooting

Returns private/local IP (e.g. 10.x.x.x or 192.168.x.x) The request is made server-to-server from a private network without a public IP.
Pass the real client IP in the X-Forwarded-For header when calling from a backend, or call the API directly from the browser client side.
Inaccurate geolocation IP geolocation databases have inherent accuracy limitations, especially for mobile or VPN users.
Use the result as an approximation only. For precision location, complement with browser Geolocation API (with user consent).
CORS blocked in browser CORS support is listed as unknown and may not be enabled for all origins.
Make the request from a backend/proxy rather than directly from browser JavaScript, or check the response headers first with curl.

Matrix Score Breakdown

🌐 Reachability 30/30
⚡ Speed 15/20
🔒 Security 15/15
🛠 Developer XP 15/20
✓ Reliability 7/15
Response Time 212ms

Fully tested on Apr 5, 2026

Technical Specifications

Auth No Auth
HTTPS REQUIRED
CORS UNKNOWN
Category Development
Difficulty Beginner
Verified: 2026-04-04

Similar APIs

View All →