API Documentation
Complete guide to using the IP Geolocation API
Getting Started
Learn how to authenticate and make your first API request
1. Create an Account
Sign up for a free account to receive 10 free credits. Each credit allows one IP lookup.
2. Generate an API Key
Go to your dashboard and create an API key. This key must be included in all API requests.
3. Make a Request
Send a GET request with your API key in the header and the IP address as a query parameter.
Endpoint
GET http://localhost:45678/api/ip-lookupAuthentication
You can provide your API key in two ways:
Option 1: Query Parameter (Recommended)
?apikey=YOUR_API_KEYOption 2: Header
x-api-key: YOUR_API_KEYQuery Parameters
apikey(optional) Your API key for authentication. Can also be provided via x-api-key header.
ip(optional) The IP address to lookup. If not provided, returns info for the requester's IP.
Code Examples
Example implementations in various programming languages
curl -X GET "http://localhost:45678/api/ip-lookup?ip=8.8.8.8&apikey=YOUR_API_KEY"Response Format
Example JSON response from a successful API call
{
"success": true,
"data": {
"ip": "8.8.8.8",
"city": "Mountain View",
"region": "California",
"region_code": "CA",
"country": "US",
"country_name": "United States",
"country_code": "US",
"country_code_iso3": "USA",
"country_capital": "Washington",
"country_tld": ".us",
"continent_code": "NA",
"in_eu": false,
"postal": "94035",
"latitude": 37.386,
"longitude": -122.0838,
"timezone": "America/Los_Angeles",
"utc_offset": "-0800",
"country_calling_code": "+1",
"currency": "USD",
"currency_name": "Dollar",
"languages": "en-US,es-US,haw,fr",
"country_area": 9629091.0,
"country_population": 327167434,
"asn": "AS15169",
"org": "Google LLC"
},
"credits_remaining": 9
}Rate Limits & Pricing
Credits System
Each API call costs 1 credit. New accounts receive 10 free credits.
User Levels
- New: Newly registered users with 10 free credits
- Normal: Standard users with purchased credits
- Admin: Full access to all features and analytics