SeeMyIP API Documentation
The SeeMyIP API allows you to lookup information for any IP address (IPv4 or IPv6), including ISP, ASN, City, Country, and Latitude/Longitude. It's free for community use with no API key required. Please use responsibly to avoid abuse.
Endpoint
GET /api/lookup.php
Parameters:
- ip (optional): The IP address to lookup. If omitted, uses the caller's IP.
Example Request:
GET https://seemyip.com/api/lookup.php?ip=8.8.8.8
Example Response (JSON):
{ "isp": "Google LLC", "asn": "15169", "city": "Mountain View", "country": "US", "lat": "37.4056", "long": "-122.0775" }
If an invalid IP is provided, returns:
{"error": "Invalid IP address"}
Usage Notes
- Supports both IPv4 and IPv6.
- No rate limits currently, but please limit to 1 request per second to keep it free.
- Data sourced from DB-IP (updated monthly).
- For Lat/Long, values are approximate for privacy.
- CORS enabled for easy client-side use.
Examples
Using curl:
curl "https://seemyip.com/api/lookup.php?ip=8.8.8.8"
Using JavaScript (fetch):
fetch('https://seemyip.com/api/lookup.php?ip=8.8.8.8') .then(response => response.json()) .then(data => console.log(data));