Developer Resources

API Documentation

Integrate powerful IP intelligence and network diagnostic tools into your applications with our RESTful API

Introduction

Welcome to the Trace My IP API documentation. Our API provides programmatic access to our comprehensive suite of IP intelligence and network diagnostic tools. Build custom integrations, automate lookups, or enhance your applications with real-time IP data.

Base URL

https://tracemyip.com/api/v1
🚀

Fast & Reliable

Sub-100ms response times

🔒

Secure

HTTPS encryption required

📊

Rich Data

Comprehensive IP intelligence

Authentication

All API requests require authentication using an API key. Include your key in the request header:

Authorization: Bearer YOUR_API_KEY

⚠️ Security Best Practices

  • Never expose your API key in client-side code
  • Use environment variables to store your key
  • Rotate your keys regularly
  • Set up usage alerts to monitor quota

Rate Limits

Plan Requests/Hour Requests/Day Price
Free 100 1,000 $0
Basic 1,000 10,000 $29/mo
Pro 10,000 100,000 $99/mo
Enterprise Unlimited Unlimited Contact Us

IP Geolocation API

Retrieve detailed geolocation data for any IP address including country, region, city, coordinates, ISP, and more.

GET /geo/{ip_address}

Example Request:

curl -X GET "https://tracemyip.com/api/v1/geo/8.8.8.8" \ -H "Authorization: Bearer YOUR_API_KEY"

Response:

{ "ip": "8.8.8.8", "country": "United States", "country_code": "US", "region": "California", "city": "Mountain View", "latitude": 37.40599, "longitude": -122.078514, "timezone": "America/Los_Angeles", "isp": "Google LLC", "organization": "Google Public DNS", "asn": "AS15169" }

Parameters:

Parameter Type Description
ip_address string IPv4 or IPv6 address to lookup

DNS Lookup API

Query DNS records for any domain. Supports A, AAAA, MX, NS, TXT, SOA, CNAME, and PTR records.

GET /dns/{domain}

Example Request:

curl -X GET "https://tracemyip.com/api/v1/dns/google.com" \ -H "Authorization: Bearer YOUR_API_KEY"

Query Parameters:

Parameter Type Description
type string DNS record type (A, AAAA, MX, NS, TXT, SOA, CNAME). Default: ALL

Response:

{ "domain": "google.com", "records": { "A": [ "142.250.185.78" ], "MX": [ "smtp.google.com" ], "NS": [ "ns1.google.com", "ns2.google.com" ] } }

WHOIS API

Retrieve domain registration details including owner information, creation date, expiry, and registrar.

GET /whois/{domain}

Example Request:

curl -X GET "https://tracemyip.com/api/v1/whois/google.com" \ -H "Authorization: Bearer YOUR_API_KEY"

Response:

{ "domain": "google.com", "registrar": "MarkMonitor Inc.", "created_date": "1997-09-15", "expiry_date": "2028-09-14", "updated_date": "2019-09-09", "status": ["clientDeleteProhibited", "clientTransferProhibited"], "name_servers": [ "ns1.google.com", "ns2.google.com" ], "registrant": { "organization": "Google LLC", "country": "US" } }

Error Handling

The API uses standard HTTP status codes and returns detailed error messages in JSON format.

Status Code Meaning Description
200 OK Request successful
400 Bad Request Invalid parameters or malformed request
401 Unauthorized Missing or invalid API key
404 Not Found Resource not found
429 Too Many Requests Rate limit exceeded
500 Server Error Internal server error

Error Response Format:

{ "error": { "code": 401, "message": "Invalid API key provided", "type": "authentication_error" } }

Ready to Get Started?

Sign up for a free API key and start integrating powerful IP intelligence into your applications today.