IP Lookup API
Authentication
All API requests require authentication using an API key. You can create an API key in your dashboard.
Include your API key in the Authorization header of your requests:
Authorization: Bearer your_api_key
Credit Usage
Each API call consumes credits from your account. This service costs 2 credits per call.
Endpoints
Retrieve detailed information about a specified IP address
Basic IP Lookup
Lookup detailed information about a specific IP address.
curl -X POST "https://api.goonlinetools.com/api/v1/ip-lookup" \
-H "Authorization: Bearer your_api_key" \
-H "Content-Type: application/json" \
-d '{"ip": "8.8.8.8"}'
Detailed IP Lookup with Analysis
Include detailed analysis and security information about the IP address.
curl -X POST "https://api.goonlinetools.com/api/v1/ip-lookup" \
-H "Authorization: Bearer your_api_key" \
-H "Content-Type: application/json" \
-d '{
"ip": "8.8.8.8",
"includeDetails": true
}'
Simple IP Lookup
Get basic information without detailed analysis to save processing time.
curl -X POST "https://api.goonlinetools.com/api/v1/ip-lookup" \
-H "Authorization: Bearer your_api_key" \
-H "Content-Type: application/json" \
-d '{
"ip": "1.1.1.1",
"includeDetails": false
}'
Request Parameters
Parameter | Type | Required | Description |
---|---|---|---|
ip | string | Yes | The IP address to lookup (IPv4 or IPv6) |
includeDetails | boolean | No | Include detailed analysis (default: true) |
Example Response
{
"success": true,
"data": {
"ip": "8.8.8.8",
"location": {
"country": {
"code": "US",
"name": "United States"
},
"region": {
"code": "CA",
"name": "California"
},
"city": "Mountain View",
"postal": "94043",
"latitude": 37.4056,
"longitude": -122.0775,
"timezone": "America/Los_Angeles",
"continent": {
"code": "NA",
"name": "North America"
}
},
"network": {
"asn": 15169,
"organization": "GOOGLE"
},
"lookup": {
"requestedIp": "8.8.8.8",
"ipType": "IPv4",
"isPublic": true,
"isPrivate": false,
"reverseDns": null
},
"analysis": {
"geolocation": {
"accuracy": "city-level",
"confidence": "high",
},
"network": {
"type": "identified",
"provider": "GOOGLE",
"asnInfo": "AS15169"
},
"security": {
"riskLevel": "unknown",
"isKnownProxy": false,
"isKnownVpn": false
},
"usage": {
"commonUse": "Search Engine / Cloud Services",
"category": "Hosting"
}
},
"timestamp": "2025-01-18T16:02:58.128Z"
},
"meta": {
"requestTime": "2025-01-18T16:02:58.128Z",
"processingTime": 245,
"creditsUsed": 1
}
}
Response Fields
Location Information
country
: Country code and nameregion
: State/province code and namecity
: City namepostal
: Postal/ZIP codelatitude/longitude
: Geographic coordinatestimezone
: IANA timezone identifiercontinent
: Continent code and name
Network Information
asn
: Autonomous System Numberorganization
: Network organization name
Lookup Information
requestedIp
: The IP address that was looked upipType
: IPv4 or IPv6isPublic
: Whether the IP is publicly routableisPrivate
: Whether the IP is in a private rangereverseDns
: Reverse DNS lookup result (if available)
Analysis Information (when includeDetails=true)
geolocation
: Accuracy and confidence informationnetwork
: Network provider and ASN detailssecurity
: Security-related informationusage
: Common use cases and IP category
Error Handling
The API uses standard HTTP status codes to indicate the success or failure of a request. Error responses include a JSON object with an error message.
{
"error": "Error message"
}
Common Status Codes
200 OK
: The request was successful400 Bad Request
: Invalid IP address format or missing IP parameter401 Unauthorized
: Invalid or missing API key402 Payment Required
: Insufficient credits429 Too Many Requests
: Rate limit exceeded500 Internal Server Error
: Something went wrong on the server
Use Cases
Security Analysis
Analyze IP addresses for security threats, proxy detection, and risk assessment.
Geolocation Services
Provide location-based services and content localization based on IP geolocation.
Network Analysis
Identify network providers, ASN information, and network infrastructure details.
Fraud Prevention
Detect suspicious IP addresses and implement fraud prevention measures.