API Documentation

Complete reference for Iploc's IP geolocation API.

Quick Start

Get started with IP geolocation in under a minute.

1

Create Account

Sign up for free — no credit card required.

2

Get API Key

Copy your key from the dashboard.

3

Make a Request

Call the API with your key.

Example Request

curl -H "Authorization: Bearer YOUR_API_KEY" \
  https://api.iploc.ai/v1/8.8.8.8

Authentication

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_KEY

Rate Limits & Pricing

All plans include every geolocation field. Tiers differ by volume, daily caps, and tool credits.

TierPriceAPI RequestsDaily CapTool CreditsOverage
FreeFree50,000/mo2,000/day(hard)50/moBlocked
Starter$15/mo250,000/mo10,000/day(soft)500/mo$5/50K
Pro$39/mo750,000/mo30,000/day(soft)2,000/mo$5/75K
Business$99/mo3,000,000/mo100,000/day(soft)10,000/mo$5/100K
EnterpriseCustomUnlimitedUnlimitedUnlimitedCustom

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

MethodEndpoint
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

Try endpoints interactively

Test every endpoint with your credentials, see live responses, and get code snippets.

Response Headers

Every API response includes rate limit headers:

HeaderDescription
X-RateLimit-LimitYour daily request limit
X-RateLimit-RemainingRequests remaining today
X-RateLimit-ResetUnix timestamp when limit resets

Error Codes

Common HTTP status codes returned by the API.

CodeMeaningWhat to Do
200SuccessRequest completed successfully
400Bad RequestInvalid IP format or malformed request
401UnauthorizedMissing or invalid API key
403ForbiddenQuota exceeded or feature not available on your tier
404Not FoundIP not in database (private/reserved range)
429Rate LimitedToo many requests — wait and retry
500Server ErrorInternal 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.

Want this data in your app?

Get a free API key and make 1,000 requests per day. All geolocation fields included, no credit card required.