API Documentation
Complete reference for Iploc's IP geolocation API.
Quick Start
Get started with IP geolocation in under a minute.
Example Request
curl -H "Authorization: Bearer YOUR_API_KEY" \
https://api.iploc.ai/v1/8.8.8.8Authentication
All API requests require a Bearer token in the Authorization header. Get your free API key from the dashboard.
HTTP Header
Authorization: Bearer YOUR_API_KEYRate Limits & Pricing
All plans include every geolocation field. Tiers differ by volume, daily caps, and tool credits.
| Tier | Price | API Requests | Daily Cap | Tool Credits | Overage |
|---|---|---|---|---|---|
| Free | Free | 50,000/mo | 2,000/day(hard) | 50/mo | Blocked |
| Starter | $15/mo | 250,000/mo | 10,000/day(soft) | 500/mo | $5/50K |
| Pro | $39/mo | 750,000/mo | 30,000/day(soft) | 2,000/mo | $5/75K |
| Business | $99/mo | 3,000,000/mo | 100,000/day(soft) | 10,000/mo | $5/100K |
| Enterprise | Custom | Unlimited | Unlimited | Unlimited | Custom |
Daily Caps
Hard cap (Free): Requests blocked after daily limit.
Soft cap (Paid): Temporary spikes allowed, rate limiting if consistently exceeded.
Batch Requests
A batch request with N IPs counts as N API requests, not 1. This ensures fair usage across all customers.
Tool Credits
Tool credits are a separate quota for I/O-heavy operations that cost significantly more server resources than IP geolocation lookups.
Endpoints that consume tool credits:
/v1/network/dns/{domain}/v1/network/rdns/{ip}/v1/network/ping/{host}/v1/network/ports/{host}/v1/network/ssl/{domain}/v1/network/headers?url={url}/v1/registry/whois/{query}/v1/registry/blacklist/{ip}DNS lookup, Reverse DNS, WHOIS, Blacklist check, SSL certificate check, Port scan, and Ping all consume 1 tool credit each.
Important: API requests (IP geolocation) and tool credits are tracked separately. Running out of tool credits does not affect your ability to perform IP lookups.
API Endpoints
Base URL: https://api.iploc.ai
| Method | Endpoint | |
|---|---|---|
| Lookup | ||
| GET | /v1/lookup/ip/{ip} | |
| GET | /v1/lookup/me | |
| POST | /v1/lookup/batch | |
| GET | /v1/lookup/security/{ip} | |
| GET | /v1/lookup/asn/{asn} | |
| GET | /v1/lookup/country/{countryCode} | |
| Network | ||
| GET | /v1/network/dns/{domain} | |
| GET | /v1/network/rdns/{ip} | |
| GET | /v1/network/ping/{host} | |
| GET | /v1/network/ports/{host} | |
| GET | /v1/network/ssl/{domain} | |
| GET | /v1/network/headers | |
| Registry | ||
| GET | /v1/registry/whois/{query} | |
| GET | /v1/registry/blacklist/{ip} | |
| Data | ||
| GET | /v1/data/asns/top | |
| GET | /v1/data/countries/top | |
| Authentication | ||
| POST | /auth/register | |
| POST | /auth/login | |
| POST | /auth/oauth | |
| POST | /auth/refresh | |
| GET | /auth/me | |
| Account | ||
| GET | /dashboard/usage | |
| GET | /dashboard/usage/history | |
| GET | /dashboard/keys | |
| POST | /dashboard/keys | |
| DELETE | /dashboard/keys/{id} | |
| GET | /dashboard/subscription | |
| System | ||
| GET | /v1/health | |
Response Headers
Every API response includes rate limit headers:
| Header | Description |
|---|---|
| X-RateLimit-Limit | Your daily request limit |
| X-RateLimit-Remaining | Requests remaining today |
| X-RateLimit-Reset | Unix timestamp when limit resets |
Error Codes
Common HTTP status codes returned by the API.
| Code | Meaning | What to Do |
|---|---|---|
| 200 | Success | Request completed successfully |
| 400 | Bad Request | Invalid IP format or malformed request |
| 401 | Unauthorized | Missing or invalid API key |
| 403 | Forbidden | Quota exceeded or feature not available on your tier |
| 404 | Not Found | IP not in database (private/reserved range) |
| 429 | Rate Limited | Too many requests — wait and retry |
| 500 | Server Error | Internal error — retry or contact support |
Ready to Start?
Create a free account and get your API key in seconds. 50,000 requests per month, no credit card required.
IP Geolocation API Overview
Iploc provides a fast, accurate IP geolocation API that returns country, region, city, postal code, coordinates, timezone, ISP, ASN, and connection type for any IPv4 or IPv6 address. The API is designed for sub-millisecond lookups using an in-memory database with binary search — no disk I/O on the hot path, no external dependencies.
All geolocation fields are available on every plan, including the free tier. There's no feature gating — you get the same data whether you're on Free or Business. Tiers differ only by volume (monthly request limits), daily caps, tool credits, and overage pricing.
Two Separate Quotas
Iploc uses two independent quotas: API requests and tool credits. API requests cover IP geolocation lookups — the core product. Tool credits cover I/O-heavy operations like DNS lookups, WHOIS queries, SSL certificate checks, port scans, and ping tests.
These tools cost 10,000–500,000× more server resources than a simple IP lookup, so they're tracked separately. This allows us to offer competitive pricing for the core geolocation product while still providing powerful network diagnostic tools.
Rate Limiting and Overages
The free tier has a hard daily cap of 2,000 requests — once you hit it, additional requests are blocked until midnight UTC. Paid tiers have soft daily caps that allow temporary spikes but may trigger rate limiting if consistently exceeded.
When you exceed your monthly API request limit on a paid tier, overage billing kicks in automatically. Overage is billed in blocks ($5 per block), with block size increasing with tier: 50K for Starter, 75K for Pro, 100K for Business. Free tier users are simply blocked when they reach their monthly limit.
Getting Started
Create a free account to get your API key. No credit card required. The free tier includes 50,000 API requests per month, 50 tool credits, and all geolocation fields. Use the API Playground to test endpoints with your credentials, or connect your AI agent via the MCP server.